Skip to content

Commit

Permalink
Allow Symfony 7.0 (#291)
Browse files Browse the repository at this point in the history
* Allow Symfony 7.0

* Sf7 requires 8.2

* Add ignore for PHPStan

* Fix test on PHP 8.2/SF 5.4

---------

Co-authored-by: David Greminger <david.greminger@1up.io>
  • Loading branch information
simoheinonen and bytehead committed Dec 18, 2023
1 parent fcf49c9 commit 0a1998a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2]
symfony: [4.4, 5.4, 6.0]
symfony: [4.4, 5.4, 6.0, 7.0]
exclude:
- symfony: 7.0
php: 8.0
- symfony: 7.0
php: 8.1
steps:
- name: Setup PHP
uses: shivammathur/setup-php@2.7.0
Expand All @@ -51,7 +56,7 @@ jobs:

- name: Install the dependencies
run: |
composer require symfony/framework-bundle:^${{ matrix.symfony }}
composer require symfony/framework-bundle:^${{ matrix.symfony }} symfony/translation:^${{ matrix.symfony }} symfony/console:^${{ matrix.symfony }} -W
composer install --no-interaction --no-suggest
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"royvoetman/flysystem-gitlab-storage": "^2.0 || ^3.0",
"symfony/asset": "^4.4 || ^5.3 || ^6.0",
"symfony/browser-kit": "^4.4 || ^5.3 || ^6.0",
"symfony/finder": "^4.4 || ^5.3 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
"symfony/phpunit-bridge": "^6.0",
"symfony/templating": "^4.4 || ^5.3 || ^6.0",
"symfony/translation": "^4.4 || ^5.3 || ^6.0",
"symfony/yaml": "^4.4 || ^5.3 || ^6.0"
"symfony/asset": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/browser-kit": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/finder": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^6.0 || ^7.0",
"symfony/templating": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/translation": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/yaml": "^4.4 || ^5.3 || ^6. || ^7.00"

This comment has been minimized.

Copy link
@da-dindi

da-dindi Dec 20, 2023

I think the last "0" is supposed to be behind the "6."

This comment has been minimized.

Copy link
@bytehead

bytehead Dec 20, 2023

Author Member

oof. 🙈 Good Catch! ❤️

This comment has been minimized.

Copy link
@bytehead

bytehead Dec 20, 2023

Author Member

See #292

},
"suggest": {
"ext-fileinfo": "Required for MimeType",
Expand Down
5 changes: 3 additions & 2 deletions tests/Model/ContainerAwareTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;

class ContainerAwareTestCase extends WebTestCase
{
Expand All @@ -31,9 +31,10 @@ protected function tearDown(): void
/**
* BC layer: to be removed once sf <5.3 will not be supported anymore.
*/
protected static function getContainer(): ContainerInterface
protected static function getContainer(): Container
{
if (\is_callable('parent::getContainer')) {
/* @phpstan-ignore-next-line */
return parent::getContainer();
}

Expand Down

0 comments on commit 0a1998a

Please sign in to comment.