Skip to content

Commit

Permalink
Feature/php83 (#13)
Browse files Browse the repository at this point in the history
* feat: update to php 8.3
  • Loading branch information
tlayh authored Mar 6, 2024
1 parent 1dee8b4 commit 12335d9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 36 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ jobs:
fail-fast: false
matrix:
typo3: [ ^11.5 ]
php: [ '8.0' , '8.1', '8.2' ]
exclude:
- typo3: ^10.4
php: '8.0'
- typo3: ^10.4
php: '8.1'
- typo3: ^10.4
php: '8.2'
- typo3: ^11.5
php: '7.3'
php: [ '8.0' , '8.1', '8.2', '8.3' ]

steps:
- name: Start database server
Expand All @@ -27,7 +18,9 @@ jobs:
mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Set up PHP Version ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand All @@ -53,39 +46,38 @@ jobs:
run: find . -name \*.php ! -path "./.Build/*" ! -path "./scripts/*" ! -path "./typo3_src/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;

- name: check code-style
if: matrix.typo3 == '^11.5' && matrix.php == '8.0'
if: matrix.typo3 == '^11.5' && matrix.php == '8.3'
run: |
composer code-check-pipeline
- name: Unit Tests without coverage
if: matrix.typo3 != '^11.5' && matrix.php != '8.0'
if: matrix.typo3 != '^11.5' && matrix.php != '8.3'
run: composer test:unit

- name: Unit Tests with coverage
if: matrix.typo3 == '^11.5' && matrix.php == '8.0'
if: matrix.typo3 == '^11.5' && matrix.php == '8.3'
run: |
cp Tests/Unit/Fixtures/LocalConfiguration.php .Build/Web/typo3conf/LocalConfiguration.php
export "UNIT_XML"=.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml
.Build/bin/phpunit --whitelist Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=coverage/unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
- name: Functional Tests without coverage
if: matrix.typo3 != '^11.5' && matrix.php != '8.0'
if: matrix.typo3 != '^11.5' && matrix.php != '8.3'
run: composer test:functional

- name: Functional Tests with coverage
if: matrix.typo3 == '^11.5' && matrix.php == '8.0'
- name: Tests with coverage
if: matrix.typo3 == '^11.5' && matrix.php == '8.3'
run: |
export "FUNCTIONAL_XML"=.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml
.Build/bin/phpunit --whitelist Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=coverage/functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root

- name: Upload coverage results to Scrutinizer
if: matrix.typo3 == '^10.4' && matrix.php == '7.4'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover
php ocular.phar code-coverage:upload --format=php-clover functional-coverage.clover
- name: Upload functional coverage results to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
if: matrix.typo3 == '^11.5' && matrix.php == '8.3'
with:
cli-args: "--format=php-clover functional-coverage.clover --revision=${{ github.event.pull_request.head.sha || github.sha }}"
6 changes: 3 additions & 3 deletions code-quality/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
__DIR__ . '/../code-quality',
])
->withPhpSets(
false,
true
true,
false
)
->withSets([
SetList::CODE_QUALITY,
Expand All @@ -39,10 +39,10 @@
SetList::EARLY_RETURN,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
SetList::PHP_74,
SetList::PHP_80,
SetList::PHP_81,
SetList::PHP_82,
SetList::PHP_83,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
])
->withRules([
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
}
],
"require": {
"php": "^8.0 || ^8.2",
"php": "^8.0 || ^8.2 || ^8.3",
"ext-mysqli": "*",
"typo3/cms-core": "^9.5 || ^10.4 || ^11.5",
"typo3/cms-extbase": "^9.5 || ^10.4 || ^11.5",
"typo3/cms-sv": "^9.5 || ^10.4 || ^11.5",
"typo3/cms-backend": "^9.5 || ^10.4 || ^11.5",
"typo3/cms-reports": "^9.5 || ^10.4 || ^11.5",
"typo3/cms-frontend": "^9.5 || ^10.4 || ^11.5"
"typo3/cms-core": "^11.5",
"typo3/cms-extbase": "^11.5",
"typo3/cms-sv": "^11.5",
"typo3/cms-backend": "^11.5",
"typo3/cms-reports": "^11.5",
"typo3/cms-frontend": "^11.5"
},
"require-dev": {
"typo3/testing-framework": "^7.0",
Expand Down Expand Up @@ -81,7 +81,7 @@
"test:coverage": [
"[ -e .Build/bin/phpunit ] || composer update",
"mkdir -p reports && rm -rf reports/*",
"TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseName=sequenzer typo3DatabaseHost=127.0.0.1 typo3DatabaseUsername=root typo3DatabasePassword=root .Build/bin/phpunit --whitelist=Classes --coverage-html=reports -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml Tests"
"TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseName=sequenzer typo3DatabaseHost=127.0.0.1 typo3DatabaseUsername=root typo3DatabasePassword=root .Build/bin/phpunit --coverage-filter Classes --coverage-html=reports -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml Tests"
],
"code-style": [
"[ -e ./.Build/bin/rector ] || composer install",
Expand Down

0 comments on commit 12335d9

Please sign in to comment.