Skip to content

Commit

Permalink
Allow to install symfony 7 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 16, 2023
1 parent 75687bd commit 2f88375
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.0.*
variant: symfony/symfony:"7.0.*"

steps:
- name: Checkout
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"doctrine/persistence": "^3.0.2",
"friendsofphp/php-cs-fixer": "^3.4",
"gedmo/doctrine-extensions": "^3.11",
"knplabs/doctrine-behaviors": "^2.2",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"knplabs/doctrine-behaviors": "^2.6.2",
"matthiasnoback/symfony-config-test": "^4.2 || ^5.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-doctrine": "^1.0",
Expand All @@ -54,18 +54,18 @@
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^0.18",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"symfony/browser-kit": "^5.4 || ^6.2",
"symfony/css-selector": "^5.4 || ^6.2",
"symfony/doctrine-bridge": "^5.4 || ^6.2",
"symfony/filesystem": "^5.4 || ^6.2",
"symfony/phpunit-bridge": "^6.2",
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
"symfony/css-selector": "^5.4 || ^6.2 || ^7.0",
"symfony/doctrine-bridge": "^5.4 || ^6.2 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.2 || ^7.0",
"symfony/phpunit-bridge": "^7.0",
"vimeo/psalm": "^5.8",
"weirdan/doctrine-psalm-plugin": "^2.0"
},
"conflict": {
"doctrine/persistence": "<3.0.2",
"gedmo/doctrine-extensions": "<3.11",
"knplabs/doctrine-behaviors": "<2.2 || >=3.0"
"knplabs/doctrine-behaviors": "<2.6.2 || >=3.0"
},
"suggest": {
"gedmo/doctrine-extensions": "if you translate orm entities with the gedmo extensions",
Expand Down
11 changes: 10 additions & 1 deletion tests/App/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Gedmo\Translatable\TranslatableListener;
use Knp\DoctrineBehaviors\EventSubscriber\TranslatableEventSubscriber;
use Knp\DoctrineBehaviors\Provider\UserProvider;
use Sonata\TranslationBundle\Tests\App\Admin\GedmoCategoryAdmin;
use Sonata\TranslationBundle\Tests\App\Admin\KnpCategoryAdmin;
Expand Down Expand Up @@ -55,5 +56,13 @@

// Temporary fix to decorate User Provider from KNP (see https://github.com/KnpLabs/DoctrineBehaviors/pull/727)
->set(DummyUserProvider::class)
->decorate(UserProvider::class);
->decorate(UserProvider::class)

// Temporary fix to use event listeners instead of subscriber (see https://github.com/KnpLabs/DoctrineBehaviors/pull/738)
->set('app.knplabs.translation_listener', TranslatableEventSubscriber::class)
->arg('$translatableFetchMode', 'LAZY')
->arg('$translationFetchMode', 'LAZY')
->tag('doctrine.event_listener', ['event' => 'postLoad'])
->tag('doctrine.event_listener', ['event' => 'loadClassMetadata'])
->tag('doctrine.event_listener', ['event' => 'prePersist']);
};

0 comments on commit 2f88375

Please sign in to comment.