Skip to content

Commit 28c9ae9

Browse files
authored
Remove static usage (#180)
* tweak: remove static for #179 * build: upgrade dependencies * ci: upgrade ci * ci: remove old articacts * tidy: clean up phpstan * ci: codecov * docs: drop scrutinizer
1 parent 03fca6d commit 28c9ae9

File tree

10 files changed

+146
-116
lines changed

10 files changed

+146
-116
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: [ 8.1, 8.2, 8.3, 8.4 ]
10+
php: [ 8.2, 8.3, 8.4 ]
1111

1212
steps:
1313
- uses: actions/checkout@v4
@@ -24,7 +24,7 @@ jobs:
2424
php_version: ${{ matrix.php }}
2525

2626
- name: Archive build
27-
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
27+
run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./
2828

2929
- name: Upload build archive for test runners
3030
uses: actions/upload-artifact@v4
@@ -37,7 +37,7 @@ jobs:
3737
needs: [ composer ]
3838
strategy:
3939
matrix:
40-
php: [ 8.1, 8.2, 8.3, 8.4 ]
40+
php: [ 8.2, 8.3, 8.4 ]
4141

4242
outputs:
4343
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
@@ -72,7 +72,7 @@ jobs:
7272
needs: [ phpunit ]
7373
strategy:
7474
matrix:
75-
php: [ 8.1, 8.2, 8.3, 8.4 ]
75+
php: [ 8.2, 8.3, 8.4 ]
7676

7777
steps:
7878
- uses: actions/checkout@v4
@@ -87,13 +87,16 @@ jobs:
8787

8888
- name: Upload to Codecov
8989
uses: codecov/codecov-action@v5
90+
with:
91+
token: ${{ secrets.CODECOV_TOKEN }}
92+
slug: PhpGt/ProtectedGlobal
9093

9194
phpstan:
9295
runs-on: ubuntu-latest
9396
needs: [ composer ]
9497
strategy:
9598
matrix:
96-
php: [ 8.1, 8.2, 8.3, 8.4 ]
99+
php: [ 8.2, 8.3, 8.4 ]
97100

98101
steps:
99102
- uses: actions/download-artifact@v4
@@ -113,14 +116,18 @@ jobs:
113116
remove_old_artifacts:
114117
runs-on: ubuntu-latest
115118

119+
permissions:
120+
actions: write
121+
116122
steps:
117123
- name: Remove old artifacts for prior workflow runs on this repository
118124
env:
119125
GH_TOKEN: ${{ github.token }}
120126
run: |
121-
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
127+
gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
122128
while read id
123129
do
124130
echo -n "Deleting artifact ID $id ... "
125131
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
126132
done <artifact-id-list.txt
133+

.scrutinizer.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Assuming there are object oriented abstractions to the superglobals set up, this
99
<a href="https://github.com/PhpGt/ProtectedGlobal/actions" target="_blank">
1010
<img src="https://badge.status.php.gt/protectedglobal-build.svg" alt="Build status" />
1111
</a>
12-
<a href="https://scrutinizer-ci.com/g/PhpGt/ProtectedGlobal" target="_blank">
12+
<a href="https://app.codacy.com/gh/PhpGt/ProtectedGlobal" target="_blank">
1313
<img src="https://badge.status.php.gt/protectedglobal-quality.svg" alt="Code quality" />
1414
</a>
15-
<a href="https://scrutinizer-ci.com/g/PhpGt/ProtectedGlobal" target="_blank">
15+
<a href="https://app.codecov.io/gh/PhpGt/ProtectedGlobal" target="_blank">
1616
<img src="https://badge.status.php.gt/protectedglobal-coverage.svg" alt="Code coverage" />
1717
</a>
1818
<a href="https://packagist.org/packages/PhpGt/ProtectedGlobal" target="_blank">

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
],
77

88
"require": {
9-
"php": ">7.4"
9+
"php": ">=8.2"
1010
},
1111
"require-dev": {
12-
"phpstan/phpstan": "^1.10",
13-
"phpunit/phpunit": "^10.1"
12+
"phpstan/phpstan": "^2.1",
13+
"phpunit/phpunit": "^10.5"
1414
},
1515

1616
"autoload": {

0 commit comments

Comments
 (0)