Skip to content

Commit a52deab

Browse files
committed
Merge branch 'cleanup'
2 parents 8450cac + b68c29e commit a52deab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+781
-960
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
- name: Checkout
4141
uses: actions/checkout@v4
4242

43+
# PHP 8.3 is needed to parse DNF types in test fixtures, and
44+
# php-cs-fixer doesn't support PHP 8.4
4345
- name: Setup PHP and Composer
4446
uses: shivammathur/setup-php@v2
4547
with:
@@ -81,7 +83,7 @@ jobs:
8183
fail-fast: false
8284
matrix:
8385
php-version:
84-
- "8.3"
86+
- "8.4"
8587
- "7.4"
8688

8789
runs-on: ubuntu-latest
@@ -136,8 +138,10 @@ jobs:
136138
- windows-latest
137139
- macos-latest
138140
php-version:
139-
- "8.3"
141+
- "8.4"
140142
include:
143+
- os: ubuntu-latest
144+
php-version: "8.3"
141145
- os: ubuntu-latest
142146
php-version: "8.2"
143147
- os: ubuntu-latest
@@ -201,13 +205,20 @@ jobs:
201205
shell: bash
202206
run: |
203207
scripts/delete-covers.php --force
204-
vendor/bin/phpunit ${RUNNER_DEBUG+--debug} --no-extensions --no-coverage --coverage-clover=coverage.xml && status=0 || status=$?
205-
printf 'coverage_report_generated=%d\n' "$([[ -s coverage.xml ]] && echo 1 || echo 0)" >>"$GITHUB_OUTPUT"
208+
vendor/bin/phpunit ${RUNNER_DEBUG+--debug} ${RUNNER_DEBUG+--no-extensions} --no-coverage --coverage-clover=coverage.xml --log-junit=junit.xml && status=0 || status=$?
209+
printf 'coverage_generated=%d\n' "$([[ -s coverage.xml ]] && echo 1 || echo 0)" >>"$GITHUB_OUTPUT"
210+
printf 'results_generated=%d\n' "$([[ -s junit.xml ]] && echo 1 || echo 0)" >>"$GITHUB_OUTPUT"
206211
(exit $status)
207212
208-
- name: Upload code coverage report to Codecov
209-
if: ${{ !cancelled() && steps.run-phpunit-tests.outputs.coverage_report_generated == 1 }}
210-
uses: codecov/codecov-action@v4
213+
- name: Upload coverage to Codecov
214+
if: ${{ !cancelled() && steps.run-phpunit-tests.outputs.coverage_generated == 1 }}
215+
uses: codecov/codecov-action@v5
216+
with:
217+
token: ${{ secrets.CODECOV_TOKEN }}
218+
219+
- name: Upload test results to Codecov
220+
if: ${{ !cancelled() && steps.run-phpunit-tests.outputs.results_generated == 1 }}
221+
uses: codecov/test-results-action@v1
211222
with:
212223
token: ${{ secrets.CODECOV_TOKEN }}
213224

phpstan-baseline-7.4.neon

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan-baseline-8.3.neon

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/run-tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function run() {
2020

2121
function run_with_php_versions() {
2222
local php versions=()
23-
while [[ $1 == [78][0-9] ]]; do
23+
while [[ -z $1 ]] || [[ $1 == [78][0-9] ]]; do
2424
if type -P "php$1" >/dev/null; then
2525
versions[${#versions[@]}]=php$1
2626
fi
@@ -35,10 +35,10 @@ function run_with_php_versions() {
3535
die "must run from root of package folder"
3636

3737
run scripts/generate.php --check
38-
run tools/php-cs-fixer check --diff --verbose
38+
run php83 tools/php-cs-fixer check --diff --verbose
3939
run tools/pretty-php --diff
40-
run_with_php_versions 83 74 vendor/bin/phpstan
40+
run_with_php_versions '' 74 vendor/bin/phpstan
4141
run scripts/stop-mockoon.sh || (($? == 1)) || die 'error stopping mockoon'
4242
run scripts/start-mockoon.sh >/dev/null
4343
trap 'run scripts/stop-mockoon.sh' EXIT
44-
run_with_php_versions 83 74 82 81 80 vendor/bin/phpunit
44+
run_with_php_versions 84 74 83 82 81 80 vendor/bin/phpunit

src/Toolkit/Collection/AbstractTypedCollection.php

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

src/Toolkit/Collection/AbstractTypedList.php

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

src/Toolkit/Collection/Collection.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
use Salient\Contract\Collection\CollectionInterface;
66

77
/**
8-
* An array-like collection of items
9-
*
108
* @api
119
*
1210
* @template TKey of array-key
1311
* @template TValue
1412
*
1513
* @implements CollectionInterface<TKey,TValue>
1614
*/
17-
final class Collection implements CollectionInterface
15+
class Collection implements CollectionInterface
1816
{
1917
/** @use CollectionTrait<TKey,TValue> */
2018
use CollectionTrait;

0 commit comments

Comments
 (0)