-
Notifications
You must be signed in to change notification settings - Fork 108
Add PHP 8.5 and Symfony 8 support #328
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
Changes from all commits
b72d2a5
7f02d15
7a5daed
821b3b1
6f88adb
d186a8e
a777fc9
c6a7954
4861ee8
66e4d41
d2f893c
e39d869
11d7d3e
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 |
|---|---|---|
|
|
@@ -15,9 +15,9 @@ jobs: | |
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| php: [ 8.1, 8.2, 8.3, 8.4 ] | ||
| php: [ 8.1, 8.2, 8.3, 8.4, 8.5 ] | ||
| deps: [ highest ] | ||
| symfony: [ 6.4.*, 7.2.*, 7.3.* ] | ||
| symfony: [ 6.4.*, 7.2.*, 7.3.*, 8.0.* ] | ||
| include: | ||
| - php: 8.1 | ||
| deps: lowest | ||
|
|
@@ -27,28 +27,71 @@ jobs: | |
| symfony: 7.2.* | ||
| - php: 8.1 | ||
| symfony: 7.3.* | ||
| - php: 8.1 | ||
| symfony: 8.0.* | ||
| - php: 8.2 | ||
| symfony: 8.0.* | ||
| - php: 8.3 | ||
| symfony: 8.0.* | ||
| # PHP 8.5: laminas-diagnostics 1.28+ conflicts with symfony/process < 7.4 (Symfony 6.4) | ||
| - php: 8.5 | ||
| symfony: 6.4.* | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Validate composer.json constraints (CI requirement) | ||
| run: | | ||
| RAW=$(cat composer.json | tr -d '\n') | ||
| if echo "$RAW" | grep -qE 'laminas-diagnostics[^"]*"\^1\.28"'; then | ||
| echo "::error::composer.json must use laminas/laminas-diagnostics ^1.27 (not ^1.28) for PHP 8.1 and Symfony 6.4 compatibility." | ||
| exit 1 | ||
| fi | ||
| if echo "$RAW" | grep -q '"require-dev"[^}]*"enlightn/security-checker"'; then | ||
| echo "::error::enlightn/security-checker must be in suggest only, not in require-dev. Remove it from require-dev." | ||
|
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. i'd rather not have this check here either. review should catch this. |
||
| exit 1 | ||
| fi | ||
| echo "composer.json constraints OK" | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| coverage: none | ||
| tools: flex | ||
|
|
||
| - name: Remove matthiasnoback for Symfony 8 (dev dep not compatible yet) | ||
| if: matrix.symfony == '8.0.*' | ||
| run: | | ||
| php -r " | ||
| \$j = json_decode(file_get_contents('composer.json'), true); | ||
| unset(\$j['require-dev']['matthiasnoback/symfony-dependency-injection-test']); | ||
| file_put_contents('composer.json', json_encode(\$j, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); | ||
|
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. meanwhile supports symfony 8. the proper way to remove a package would be through composer, not hacking around on the composer.json file. |
||
| " | ||
|
|
||
| - name: Install dependencies | ||
| if: matrix.symfony != '8.0.*' | ||
| uses: ramsey/composer-install@v2 | ||
| with: | ||
| dependency-versions: ${{ inputs.deps }} | ||
| dependency-versions: ${{ matrix.deps }} | ||
| composer-options: --prefer-dist | ||
| env: | ||
| SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
|
||
| - name: Install dependencies (Symfony 8) | ||
| if: matrix.symfony == '8.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. removing this and use the simplified step for everything |
||
| run: composer update --prefer-dist | ||
| env: | ||
| SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
|
||
| - name: Run tests | ||
| run: vendor/bin/phpunit -v | ||
| run: | | ||
| if [ "${{ matrix.symfony }}" = "8.0.*" ]; then | ||
| vendor/bin/phpunit -c phpunit-symfony8.xml.dist -v | ||
| else | ||
| vendor/bin/phpunit -v | ||
| fi | ||
|
|
||
| code-coverage: | ||
| name: Code Coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| FROM php:8.3-cli | ||
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| git \ | ||
| unzip \ | ||
| libzip-dev \ | ||
| && docker-php-ext-install zip \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
|
|
||
| # Allow git operations when /app is mounted from host (different ownership) | ||
| RUN git config --global --add safe.directory /app | ||
|
|
||
| WORKDIR /app |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
|
||
| return function (ContainerConfigurator $container): void { | ||
| $container->services() | ||
| ->set('liip_monitor.check.apc_fragmentation', \Laminas\Diagnostics\Check\ApcFragmentation::class) | ||
| ->args([ | ||
| '%%liip_monitor.check.apc_fragmentation.warning%%', | ||
| '%%liip_monitor.check.apc_fragmentation.critical%%', | ||
| ]) | ||
| ->tag('liip_monitor.check', ['alias' => 'apc_fragmentation']) | ||
| ->public(); | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
|
||
| return function (ContainerConfigurator $container): void { | ||
| $container->services() | ||
| ->set('liip_monitor.check.apc_memory', \Laminas\Diagnostics\Check\ApcMemory::class) | ||
| ->args([ | ||
| '%%liip_monitor.check.apc_memory.warning%%', | ||
| '%%liip_monitor.check.apc_memory.critical%%', | ||
| ]) | ||
| ->tag('liip_monitor.check', ['alias' => 'apc_memory']) | ||
| ->public(); | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
|
||
| return function (ContainerConfigurator $container): void { | ||
| $container->services() | ||
| ->set('liip_monitor.check.class_exists', \Laminas\Diagnostics\Check\ClassExists::class) | ||
| ->args(['%%liip_monitor.check.class_exists%%']) | ||
| ->tag('liip_monitor.check', ['alias' => 'class_exists']) | ||
| ->public(); | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
|
||
| return function (ContainerConfigurator $container): void { | ||
| $container->services() | ||
| ->set('liip_monitor.check.cpu_performance', \Laminas\Diagnostics\Check\CpuPerformance::class) | ||
| ->args(['%%liip_monitor.check.cpu_performance%%']) | ||
| ->tag('liip_monitor.check', ['alias' => 'cpu_performance']) | ||
| ->public(); | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
|
||
| return function (ContainerConfigurator $container): void { | ||
| $container->services() | ||
| ->set('liip_monitor.check.custom_error_pages', \Liip\MonitorBundle\Check\CustomErrorPages::class) | ||
| ->args([ | ||
| '%%liip_monitor.check.custom_error_pages.error_codes%%', | ||
| '%%liip_monitor.check.custom_error_pages.path%%', | ||
| param('kernel.project_dir'), | ||
| ]) | ||
| ->tag('liip_monitor.check', ['alias' => 'custom_error_pages']) | ||
| ->public(); | ||
| }; |
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.
this would be discovered by the build of php 8.1 with symfony 6.4, no need to have this here.