Repository navigation
[!!!][TASK] Support PHP 8.5 and require TYPO3 13.4 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5e08164
46f5145
86c3175
0bbe32a
382f09a
3bc4830
5339c16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,41 @@ | ||
| name: Tasks | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| 'on': | ||
| - push | ||
| - pull_request | ||
| jobs: | ||
| lint-php: | ||
| name: "php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }}" | ||
| compatibility: | ||
| name: Compatibility PHP ${{ matrix.php }} / TYPO3 ${{ matrix.typo3 }} / ${{ matrix.dependencies }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: [ '8.2', '8.3', '8.4' ] | ||
| typo3: [ '12', '13' ] | ||
| include: | ||
| - php: '8.2' | ||
| typo3: '13' | ||
| dependencies: latest | ||
| - php: '8.3' | ||
| typo3: '13' | ||
| dependencies: latest | ||
| - php: '8.4' | ||
| typo3: '13' | ||
| dependencies: latest | ||
| - php: '8.5' | ||
| typo3: '13' | ||
| dependencies: latest | ||
| - php: '8.2' | ||
| typo3: '13' | ||
| dependencies: lowest | ||
| - php: '8.5' | ||
| typo3: '13' | ||
| dependencies: lowest | ||
| steps: | ||
| - name: Setup PHP with PECL extension | ||
| uses: shivammathur/setup-php@v2 | ||
| - uses: actions/checkout@v4 | ||
| - uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/cache@v3 | ||
| with: | ||
| path: ~/.composer/cache/files | ||
| key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ matrix.php }}-composer- | ||
| - run: composer require typo3/minimal="^${{ matrix.typo3 }}" --dev --ignore-platform-req=php+ | ||
| - run: composer install --no-interaction --no-progress --ignore-platform-req=php+ | ||
| - run: ./vendor/bin/grumphp run --ansi | ||
| extensions: apcu, bcmath, gd, intl, mbstring, pdo_sqlite, sqlite3, zip | ||
| coverage: pcov | ||
| tools: composer:v2 | ||
| ini-values: apc.enable_cli=1, memory_limit=1G | ||
| - name: Resolve and check compatibility | ||
| run: sh Build/Scripts/check-compatibility.sh ${{ matrix.php }} ${{ matrix.typo3 }} ${{ matrix.dependencies }} | ||
|
Comment on lines
-19
to
+41
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should not change that much in a simple php upgrade. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| apc.enable_cli=1 | ||
| memory_limit=1G | ||
| error_reporting=E_ALL |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| #!/bin/sh | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do not want a shell script for this, we do not need this here. |
||
| set -eu | ||
|
|
||
| php_version="${1:?PHP version required}" | ||
| typo3_version="${2:?TYPO3 major required}" | ||
| dependencies="${3:-latest}" | ||
|
|
||
| php -r 'exit(PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION === $argv[1] ? 0 : 1);' "$php_version" | ||
| php -v | ||
| composer self-update --2 --no-interaction | ||
| composer --version | ||
| case "$php_version:$typo3_version" in | ||
| 8.2:13|8.3:13|8.4:13|8.5:13) ;; | ||
| *) printf 'Unsupported PHP/TYPO3 pair: %s / %s\n' "$php_version" "$typo3_version"; exit 1 ;; | ||
| esac | ||
| case "$dependencies" in latest|lowest) ;; *) exit 1 ;; esac | ||
|
|
||
| export GRUMPHP_GIT_HOOKS_ENABLED=0 | ||
| export typo3DatabaseDriver=pdo_sqlite | ||
| export XDEBUG_MODE=off | ||
| export PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR:-}:$(pwd)/Build/Configuration/PHP" | ||
|
|
||
| composer validate --no-check-publish --no-interaction | ||
| composer config lock true | ||
| composer require --dev --sort-packages 'squizlabs/php_codesniffer:^3.8.0 || ^4.0' --no-update --no-interaction | ||
| case "$typo3_version" in | ||
| 13) | ||
| constraint='^13.4' | ||
| composer require --dev --sort-packages 'saschaegerer/phpstan-typo3:^2.2.0' 'ssch/typo3-rector:^3.16.0' 'rector/rector:^2.7.0' 'pluswerk/grumphp-config:^11.2.0' --no-update --no-interaction | ||
| ;; | ||
| esac | ||
| composer require --dev --sort-packages "typo3/minimal:$constraint" --no-update --no-interaction | ||
| if [ "$php_version" = 8.5 ]; then | ||
| composer require --dev --sort-packages 'phpunit/phpunit:^10.5.62 || ^11.5.50 || ^12.5.0 || ^13.0.2' --no-update --no-interaction | ||
| fi | ||
| if [ "$dependencies" = lowest ]; then | ||
| composer update --with-all-dependencies --prefer-lowest --prefer-stable --no-interaction --no-progress --no-scripts | ||
| else | ||
| composer update --with-all-dependencies --prefer-stable --no-interaction --no-progress --no-scripts | ||
| fi | ||
| composer check-platform-reqs | ||
| if [ "$php_version" = 8.5 ]; then | ||
| composer prohibits php 8.5.0 || true | ||
| fi | ||
|
|
||
| php vendor/bin/grumphp run --no-interaction | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,12 @@ | |
| ], | ||
| "type": "typo3-cms-extension", | ||
| "require": { | ||
| "php": "~8.2.0 || ~8.3.0 || ~8.4.0", | ||
| "typo3/cms-core": "^12.4 || ^13.4", | ||
| "typo3/cms-frontend": "^12.4 || ^13.4" | ||
| "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", | ||
| "typo3/cms-core": "^13.4", | ||
| "typo3/cms-frontend": "^13.4" | ||
| }, | ||
| "require-dev": { | ||
| "pluswerk/grumphp-config": "^7.2.0 || ^10.1.4", | ||
| "pluswerk/grumphp-config": "^7.2.0 || ^10.1.4 || ^11.2.0", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we remove version 7 or even version 10? |
||
| "saschaegerer/phpstan-typo3": "^1.10.2 || ^2.1.1", | ||
| "ssch/typo3-rector": "*" | ||
| }, | ||
|
|
@@ -22,6 +22,7 @@ | |
| }, | ||
| "config": { | ||
| "allow-plugins": { | ||
| "a9f/fractor-extension-installer": true, | ||
| "ergebnis/composer-normalize": true, | ||
| "phpro/grumphp": true, | ||
| "phpstan/extension-installer": true, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| imports: | ||
| - { resource: vendor/pluswerk/grumphp-config/grumphp.yml } | ||
| grumphp: | ||
| parallel: | ||
| enabled: false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we disable parallel runs? |
||
| parameters: | ||
| convention.fractor_enable: false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did we disable fractor? |
||
| convention.process_timeout: 240 | ||
| convention.security_checker_blocking: false | ||
| convention.jsonlint_ignore_pattern: { } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,13 +4,12 @@ | |
|
|
||
| use PLUS\GrumPHPConfig\RectorSettings; | ||
| use Rector\Config\RectorConfig; | ||
| use Rector\Caching\ValueObject\Storage\FileCacheStorage; | ||
|
|
||
| return static function (RectorConfig $rectorConfig): void { | ||
| $rectorConfig->phpVersion(80200); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not want a fixed version. We have the automated php version configuration. |
||
| $rectorConfig->parallel(); | ||
| $rectorConfig->importNames(); | ||
| $rectorConfig->importShortClasses(); | ||
| $rectorConfig->cacheClass(FileCacheStorage::class); | ||
| $rectorConfig->cacheDirectory('./var/cache/rector'); | ||
|
|
||
| $rectorConfig->paths( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependencies: latest
This isn't necessary; we didn't have it before, and we don't need it now either.