Skip to content

Commit

Permalink
Add support for Symfony 7 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored Jul 17, 2024
1 parent d089185 commit c36a698
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 18 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
env:
SYMFONY_DEPRECATIONS_HELPER: weak

- php-version: '8.2'
dependency-versions: 'highest'
env:
SYMFONY_DEPRECATIONS_HELPER: weak

- php-version: '8.3'
dependency-versions: 'highest'
env:
SYMFONY_DEPRECATIONS_HELPER: weak

services:
mysql:
image: mysql:5.7
Expand All @@ -52,17 +62,21 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: 'imagick'
tools: 'composer:v2'

- name: Remove Lint Tools
# These tools are not required to run tests, so we are removing them to improve dependency resolving and
# testing lowest versions.
run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{matrix.dependency-versions}}

Expand All @@ -80,17 +94,16 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: 'imagick'
php-version: 8.3
tools: 'composer:v2'

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{matrix.dependency-versions}}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
if (\class_exists(Debug::class)) {
Debug::enable();
} else {
\Symfony\Component\Debug\Debug::enable();
Symfony\Component\Debug\Debug::enable();
}
}

Expand Down
3 changes: 3 additions & 0 deletions Tests/Unit/EventListener/SetThemeEventListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Sulu\Bundle\PreviewBundle\Preview\Events\PreRenderEvent;
use Sulu\Bundle\ThemeBundle\EventListener\SetThemeEventListener;
Expand All @@ -29,6 +30,8 @@

class SetThemeEventListenerTest extends TestCase
{
use ProphecyTrait;

/**
* @var ThemeRepositoryInterface|ObjectProphecy
*/
Expand Down
24 changes: 14 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@
"require": {
"php": "^7.3 || ^8.0",
"sulu/sulu": "^2.4 || ^2.5@dev",
"symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"sylius/theme-bundle": "^2.1"
"symfony/config": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
"sylius/theme-bundle": "^2.1 || ^2.4@dev"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.1",
"jackalope/jackalope-doctrine-dbal": "^1.3.4",
"jackalope/jackalope-doctrine-dbal": "^1.3.4 || ^2.0",
"jangregor/phpstan-prophecy": "^1.0",
"php-cs-fixer/shim": "^3.1",
"phpspec/prophecy": "^1.15",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-doctrine": "^1.2",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-symfony": "^1.1",
"phpunit/phpunit": "^8.5.9",
"symfony/dotenv": "^5.4 || ^6.0",
"phpunit/phpunit": "^8.5.9 || ^9.5",
"symfony/dotenv": "^5.4 || ^6.0 || ^7.0",
"symfony/monolog-bundle": "^3.1",
"symfony/phpunit-bridge": "^5.2",
"symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0",
"thecodingmachine/phpstan-strict-rules": "^1.0"
},
"conflict": {
Expand Down Expand Up @@ -87,6 +88,9 @@
]
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
}
}
}

0 comments on commit c36a698

Please sign in to comment.