From 14677293fb932ba84aea3ca74cb5ec06f1de83e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:58:37 +0100 Subject: [PATCH 1/4] ci: Remove Composer workaround (#279) --- .github/workflows/tests.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b55387f..d96dfb2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -154,15 +154,6 @@ jobs: composer-options: "${{ matrix.composer-flags }}" working-directory: vendor-bin/eloquent - # There is a known issue here with Composer - # see https://github.com/composer/composer/issues/10200 - # Meanwhile we break down the installation as a workaround. - # Once this is fixed the whole bin dependencies can probably be installed - # in one step with a timeout adjustment - - name: Remove Symfony from ProxyManager Composer bin dependencies - if: matrix.variant != 'no-change' - run: composer bin proxy-manager remove --dev --no-update symfony/symfony - - name: Install ProxyManager Composer bin dependencies uses: ramsey/composer-install@v3 if: "matrix.make-test == 'test_symfony_doctrine_bridge_proxy_manager' || matrix.make-test == 'test_symfony_eloquent_bridge_proxy_manager'" @@ -178,10 +169,6 @@ jobs: composer-options: "${{ matrix.composer-flags }}" working-directory: vendor-bin/proxy-manager - - name: Add back Symfony (variant) for ProxyManager Composer bin dependencies - if: matrix.variant != 'no-change' - run: composer bin proxy-manager require --dev --no-update ${{ matrix.variant }} - - name: Install Symfony for ProxyManager Composer bin dependencies uses: ramsey/composer-install@v3 if: "matrix.make-test == 'test_symfony_doctrine_bridge_proxy_manager' || matrix.make-test == 'test_symfony_eloquent_bridge_proxy_manager'" From ab0d4557463fea3831253b4a5d559cab799a3407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:13:58 +0100 Subject: [PATCH 2/4] fix: Fix Doctrine/ORM minimum compatibility (#277) --- README.md | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32aef9c..f6a0126 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ AliceDataFixtures Supports: * Symfony 6.4+ -* Doctrine ORM 2.5+ +* Doctrine ORM 2.20+ * Doctrine ODM 2.0+ * Doctrine PHPCR 2.0+ * Eloquent 8.12+ diff --git a/composer.json b/composer.json index ff30036..ecdec56 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "symfony/phpunit-bridge": "^5.3.8 || ^6.4" }, "conflict": { - "doctrine/orm": "<2.6.3", + "doctrine/data-fixtures": "<1.7.0", + "doctrine/orm": "<2.20", "doctrine/phpcr-odm": "<2.0.0", "doctrine/dbal": "<3.0", "doctrine/persistence": "<2.0", From d803b13cbe00e556efa129bc487978ddec98b3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:15:08 +0100 Subject: [PATCH 3/4] fix: Fix eloquent minimum dependency version compatibility (#278) --- README.md | 2 +- composer.json | 2 +- vendor-bin/symfony/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6a0126..76af589 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Supports: * Doctrine ORM 2.20+ * Doctrine ODM 2.0+ * Doctrine PHPCR 2.0+ -* Eloquent 8.12+ +* Eloquent 11.0+ ## Documentation diff --git a/composer.json b/composer.json index ecdec56..0632503 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "doctrine/phpcr-odm": "<2.0.0", "doctrine/dbal": "<3.0", "doctrine/persistence": "<2.0", - "illuminate/database": "<8.12", + "illuminate/database": "<10.0", "ocramius/proxy-manager": "<2.1", "symfony/framework-bundle": ">=6.0 <6.4", "zendframework/zend-code": "<3.3.1" diff --git a/vendor-bin/symfony/composer.json b/vendor-bin/symfony/composer.json index 5757001..c7543d0 100644 --- a/vendor-bin/symfony/composer.json +++ b/vendor-bin/symfony/composer.json @@ -18,7 +18,7 @@ "doctrine/phpcr-bundle": "*", "doctrine/phpcr-odm": "*", "jackalope/jackalope-doctrine-dbal": "*", - "monolog/monolog": "*", + "monolog/monolog": "^2.0", "symfony/symfony": "^5.4 || ^6.4", "theofidry/composer-inheritance-plugin": "^1.2", "wouterj/eloquent-bundle": "*" From 821a4bb18f9a4e58a901fec8550062f8d1db5ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:23:49 +0100 Subject: [PATCH 4/4] fix: Fix Symfony bundles minimum compatibility (#280) --- .github/workflows/tests.yaml | 6 +++--- composer.json | 4 ++++ doctrine-phpcr-db-settings.php | 2 +- fixtures/Bridge/Symfony/SymfonyApp/config/config.yml | 5 +++++ .../Bridge/Symfony/SymfonyApp/config/config_doctrine.yml | 3 +++ .../Bridge/Symfony/SymfonyApp/config/config_symfony_3.yml | 5 +++++ .../Symfony/Doctrine/PhpcrLoaderIntegrationTest.php | 8 -------- vendor-bin/proxy-manager/composer.json | 4 ++-- vendor-bin/symfony/composer.json | 7 +++---- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d96dfb2..a5cb293 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -38,7 +38,7 @@ jobs: - test_symfony_eloquent_bridge_proxy_manager variant: - 'no-change' - - '"symfony/symfony:^6.4"' + - '"symfony/symfony:^6.4.14"' # To keep in sync with docker-compose.yml services: mysql: @@ -126,14 +126,14 @@ jobs: - name: Install Doctrine PHPCR Composer bin dependencies uses: ramsey/composer-install@v3 - if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge'" + if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge' || matrix.make-test == 'test_symfony_doctrine_bridge'" with: dependency-versions: "${{ matrix.dependencies }}" composer-options: "${{ matrix.composer-flags }}" working-directory: vendor-bin/doctrine_phpcr - name: Repeat "Install Doctrine PHPCR Composer bin dependencies" uses: ramsey/composer-install@v3 - if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge'" + if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge' || matrix.make-test == 'test_symfony_doctrine_bridge'" with: dependency-versions: "${{ matrix.dependencies }}" composer-options: "${{ matrix.composer-flags }}" diff --git a/composer.json b/composer.json index 0632503..997ef9b 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,10 @@ "conflict": { "doctrine/data-fixtures": "<1.7.0", "doctrine/orm": "<2.20", + "doctrine/doctrine-bundle": "<2.11.0", + "doctrine/mongodb-odm-bundle": "<5.1.0", + "doctrine/mongodb-odm": "<2.6.0", + "doctrine/phpcr-bundle": "<3.0", "doctrine/phpcr-odm": "<2.0.0", "doctrine/dbal": "<3.0", "doctrine/persistence": "<2.0", diff --git a/doctrine-phpcr-db-settings.php b/doctrine-phpcr-db-settings.php index ac5f0f6..1e32f4f 100644 --- a/doctrine-phpcr-db-settings.php +++ b/doctrine-phpcr-db-settings.php @@ -10,5 +10,5 @@ 'dbname' => get_param('DOCTRINE_PHPCR_DB_NAME', 'fidry_alice_data_fixtures'), 'host' => get_param('DOCTRINE_PHPCR_DB_HOST', '127.0.0.1'), 'port' => get_param('DOCTRINE_PHPCR_DB_PORT', 3307), - 'charset' => get_param('DOCTRINE_PHPCR_DB_CHARSET', 'utf8mb4'), + 'charset' => get_param('DOCTRINE_PHPCR_DB_CHARSET', 'UTF8'), ]; diff --git a/fixtures/Bridge/Symfony/SymfonyApp/config/config.yml b/fixtures/Bridge/Symfony/SymfonyApp/config/config.yml index dd2f454..a4b6c55 100644 --- a/fixtures/Bridge/Symfony/SymfonyApp/config/config.yml +++ b/fixtures/Bridge/Symfony/SymfonyApp/config/config.yml @@ -8,6 +8,10 @@ # framework: + http_method_override: false + handle_all_throwables: false + php_errors: + log: true secret: test router: resource: ~ @@ -16,6 +20,7 @@ framework: enabled: false validation: enabled: true + email_validation_mode: html5 session: enabled: false test: ~ diff --git a/fixtures/Bridge/Symfony/SymfonyApp/config/config_doctrine.yml b/fixtures/Bridge/Symfony/SymfonyApp/config/config_doctrine.yml index 920101b..70aeeba 100644 --- a/fixtures/Bridge/Symfony/SymfonyApp/config/config_doctrine.yml +++ b/fixtures/Bridge/Symfony/SymfonyApp/config/config_doctrine.yml @@ -24,6 +24,9 @@ doctrine: 1002: "SET NAMES 'UTF8' COLLATE 'utf8_unicode_ci'" orm: auto_mapping: true + controller_resolver: + auto_mapping: false + enable_lazy_ghost_objects: true mappings: fixture_entities: type: xml diff --git a/fixtures/Bridge/Symfony/SymfonyApp/config/config_symfony_3.yml b/fixtures/Bridge/Symfony/SymfonyApp/config/config_symfony_3.yml index 7b483c1..7ca0318 100644 --- a/fixtures/Bridge/Symfony/SymfonyApp/config/config_symfony_3.yml +++ b/fixtures/Bridge/Symfony/SymfonyApp/config/config_symfony_3.yml @@ -8,6 +8,10 @@ # framework: + http_method_override: false + handle_all_throwables: false + php_errors: + log: true secret: test router: resource: ~ @@ -15,5 +19,6 @@ framework: enabled: false validation: enabled: true + email_validation_mode: html5 session: ~ test: ~ diff --git a/tests/Bridge/Symfony/Doctrine/PhpcrLoaderIntegrationTest.php b/tests/Bridge/Symfony/Doctrine/PhpcrLoaderIntegrationTest.php index f7d4b90..7fabf32 100644 --- a/tests/Bridge/Symfony/Doctrine/PhpcrLoaderIntegrationTest.php +++ b/tests/Bridge/Symfony/Doctrine/PhpcrLoaderIntegrationTest.php @@ -46,14 +46,6 @@ public static function setUpBeforeClass(): void public function setUp(): void { - if (PHP_VERSION_ID < 80000) { - $this->markTestSkipped('The annotation reader is not available: the "enable_annotations" on the validator cannot be set as the PHP version is lower than 8'); - } - - if (PHP_VERSION_ID >= 80000) { - $this->markTestSkipped('Not compatible yet with PHP 8.0'); - } - $this->kernel = new DoctrinePhpcrKernel(static::$seed, true); $this->kernel->boot(); diff --git a/vendor-bin/proxy-manager/composer.json b/vendor-bin/proxy-manager/composer.json index e74bf6f..a4e1688 100644 --- a/vendor-bin/proxy-manager/composer.json +++ b/vendor-bin/proxy-manager/composer.json @@ -16,8 +16,8 @@ "doctrine/phpcr-odm": "*", "jackalope/jackalope-doctrine-dbal": "*", "friendsofphp/proxy-manager-lts": "*", - "monolog/monolog": "*", - "symfony/symfony": "^5.4 || ^6.4", + "monolog/monolog": ">=2.0", + "symfony/symfony": "^6.4.14", "theofidry/composer-inheritance-plugin": "^1.2", "wouterj/eloquent-bundle": "*" }, diff --git a/vendor-bin/symfony/composer.json b/vendor-bin/symfony/composer.json index c7543d0..e212dcf 100644 --- a/vendor-bin/symfony/composer.json +++ b/vendor-bin/symfony/composer.json @@ -5,21 +5,20 @@ ] }, "require": { - "symfony/doctrine-messenger": "^4.4 || ^5.4 || ^6.0" + "symfony/doctrine-messenger": "^4.4 || ^5.4 || ^6.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "*", "doctrine/annotations": "*", "doctrine/data-fixtures": "*", "doctrine/doctrine-bundle": "*", - "doctrine/mongodb-odm": "*", "doctrine/mongodb-odm-bundle": "*", "doctrine/orm": "*", "doctrine/phpcr-bundle": "*", "doctrine/phpcr-odm": "*", "jackalope/jackalope-doctrine-dbal": "*", - "monolog/monolog": "^2.0", - "symfony/symfony": "^5.4 || ^6.4", + "monolog/monolog": ">=2.0", + "symfony/symfony": "^6.4.14", "theofidry/composer-inheritance-plugin": "^1.2", "wouterj/eloquent-bundle": "*" },