From 838101c1e4844fde343b2c7db9b0875595df6960 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 8 Jan 2024 17:53:45 +0100 Subject: [PATCH] update dependencies --- .github/workflows/test-application.yaml | 10 +++++++--- CHANGELOG.md | 2 ++ composer.json | 6 +++--- src/DependencyInjection/Configuration.php | 1 - src/DependencyInjection/DoctrinePHPCRExtension.php | 5 +---- tests/Fixtures/App/DataFixtures/PHPCR/LoadData.php | 3 --- tests/Fixtures/App/Document/TestDocument.php | 3 --- tests/Fixtures/App/Kernel.php | 2 +- tests/Fixtures/fixtures/config/single.php | 1 - tests/Fixtures/fixtures/config/single.xml | 1 - tests/Fixtures/fixtures/config/single.yml | 1 - tests/Unit/DependencyInjection/ConfigurationTest.php | 1 - 12 files changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 15f49239..ca964829 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -12,6 +12,8 @@ jobs: test: name: "PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-version }}" runs-on: "ubuntu-20.04" + env: + SYMFONY_REQUIRE: ${{matrix.symfony-require}} strategy: fail-fast: false @@ -47,11 +49,13 @@ jobs: extensions: "pdo, pdo_sqlite" tools: "composer:v2" - - name: "Require Specific Symfony Version" + - name: "Require specific symfony version" if: "${{ matrix.symfony-version }}" - run: "composer require --no-update symfony/symfony:${{ matrix.symfony-version }}" + run: | + composer require --no-update symfony/flex + composer config --no-plugins allow-plugins.symfony/flex true - - name: "Require Additional dependencies" + - name: "Require additional dependencies" if: "${{ matrix.composer-require }}" run: "composer require --no-update ${{ matrix.composer-require }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2f4047..7155e991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Changelog The configuration of metadata_cache_driver changed. By default, it creates an `array` cache. To configure a service, specify `type: service` and specify your service in the `id` property. To use a cache pool, specify the service id of that pool. +* Removed support for namespace alias, use the FQN names. * Introduced the ManagerRegistryInterface for the ManagerRegistry and adjusted the service alias for autowiring to the interface. * The following container parameters are no longer taken into account (memcache and apc seem to have never been used anyways). If you have customised the array cache class, please check if this is still needed - and note that starting from this version, @@ -27,6 +28,7 @@ Changelog doctrine_phpcr.odm.cache.memcached_port doctrine_phpcr.odm.cache.memcached_instance.class doctrine_phpcr.odm.cache.xcache.class + * If no username is defined for a session, and if you use Jackalope >= 2.0, the credentials service for this session is no longer created and `null` is passed as credentials. diff --git a/composer.json b/composer.json index 3370ef85..e6bd4251 100644 --- a/composer.json +++ b/composer.json @@ -37,14 +37,14 @@ }, "require-dev": { "doctrine/doctrine-bundle": "^2.0.3", - "doctrine/phpcr-odm": "^2.0", + "doctrine/phpcr-odm": "2.x-dev", "doctrine/orm": "^2.0 || ^3.0", "jackalope/jackalope-doctrine-dbal": "^2.0", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", + "matthiasnoback/symfony-dependency-injection-test": "^4.3.1 || ^5.0", "symfony/asset": "^5.4 || ^6.0 || ^7.0", "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0", "symfony/css-selector": "^5.4 || ^6.0 || ^7.0", - "symfony/error-handler": "^4.4 || ^5.0 || ^6.0", + "symfony/error-handler": "^5.4 || ^6.0 || ^7.0", "symfony/form": "^5.4 || ^6.0 || ^7.0", "symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0", "symfony/monolog-bundle": "^3.4", diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 012c68fb..a11da3ef 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -331,7 +331,6 @@ private function getOdmDocumentManagersNode(): NodeDefinition ->scalarNode('mapping')->defaultValue(true)->end() ->scalarNode('type')->end() ->scalarNode('dir')->end() - ->scalarNode('alias')->end() ->scalarNode('prefix')->end() ->booleanNode('is_bundle')->end() ->end() diff --git a/src/DependencyInjection/DoctrinePHPCRExtension.php b/src/DependencyInjection/DoctrinePHPCRExtension.php index 92efaa6f..a6c8fc34 100644 --- a/src/DependencyInjection/DoctrinePHPCRExtension.php +++ b/src/DependencyInjection/DoctrinePHPCRExtension.php @@ -500,9 +500,8 @@ private function loadOdmDocumentManager(array $documentManager, ContainerBuilder private function loadOdmDocumentManagerMappingInformation(array $documentManager, Definition $odmConfig, ContainerBuilder $container): void { - // reset state of drivers and alias map. They are only used by this methods and children. + // reset state of drivers map. It is only used by this methods and children. $this->drivers = []; - $this->aliasMap = []; if (!class_exists(Generic::class)) { throw new \RuntimeException('PHPCR ODM is activated in the config but does not seem loadable.'); @@ -519,8 +518,6 @@ private function loadOdmDocumentManagerMappingInformation(array $documentManager ]; $this->loadMappingInformation($documentManager, $container); $this->registerMappingDrivers($documentManager, $container); - - $odmConfig->addMethodCall('setDocumentNamespaces', [$this->aliasMap]); } /** diff --git a/tests/Fixtures/App/DataFixtures/PHPCR/LoadData.php b/tests/Fixtures/App/DataFixtures/PHPCR/LoadData.php index 84c22efb..6d30d9dd 100644 --- a/tests/Fixtures/App/DataFixtures/PHPCR/LoadData.php +++ b/tests/Fixtures/App/DataFixtures/PHPCR/LoadData.php @@ -20,9 +20,6 @@ class LoadData implements FixtureInterface { - /** - * @param DocumentManager $manager - */ public function load(ObjectManager $manager): void { $base = new Generic(); diff --git a/tests/Fixtures/App/Document/TestDocument.php b/tests/Fixtures/App/Document/TestDocument.php index e2dee0a4..292f7d84 100644 --- a/tests/Fixtures/App/Document/TestDocument.php +++ b/tests/Fixtures/App/Document/TestDocument.php @@ -6,9 +6,6 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ODM\PHPCR\Mapping\Attributes as PHPCR; -/** - * @PHPCR\Document(referenceable=true) - */ #[PHPCR\Document(referenceable: true)] class TestDocument { diff --git a/tests/Fixtures/App/Kernel.php b/tests/Fixtures/App/Kernel.php index 41548279..74b2b65e 100644 --- a/tests/Fixtures/App/Kernel.php +++ b/tests/Fixtures/App/Kernel.php @@ -32,7 +32,7 @@ public function registerBundles(): iterable } } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(__DIR__.'/config/config.php'); } diff --git a/tests/Fixtures/fixtures/config/single.php b/tests/Fixtures/fixtures/config/single.php index 528c890c..4c565712 100644 --- a/tests/Fixtures/fixtures/config/single.php +++ b/tests/Fixtures/fixtures/config/single.php @@ -38,7 +38,6 @@ 'mapping' => true, 'type' => null, 'dir' => null, - 'alias' => null, 'prefix' => null, 'is-bundle' => null, ], diff --git a/tests/Fixtures/fixtures/config/single.xml b/tests/Fixtures/fixtures/config/single.xml index 6271b319..c1ba2df8 100644 --- a/tests/Fixtures/fixtures/config/single.xml +++ b/tests/Fixtures/fixtures/config/single.xml @@ -43,7 +43,6 @@ mapping="true" type="null" dir="null" - alias="null" prefix="null" is-bundle="null" /> diff --git a/tests/Fixtures/fixtures/config/single.yml b/tests/Fixtures/fixtures/config/single.yml index fbdf441b..48ef201f 100644 --- a/tests/Fixtures/fixtures/config/single.yml +++ b/tests/Fixtures/fixtures/config/single.yml @@ -26,7 +26,6 @@ doctrine_phpcr: mapping: true type: ~ dir: ~ - alias: ~ prefix: ~ is_bundle: ~ auto_generate_proxy_classes: true diff --git a/tests/Unit/DependencyInjection/ConfigurationTest.php b/tests/Unit/DependencyInjection/ConfigurationTest.php index 5e4a1bc4..0c57b435 100644 --- a/tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/tests/Unit/DependencyInjection/ConfigurationTest.php @@ -93,7 +93,6 @@ public function configurations(): array 'mapping' => true, 'type' => null, 'dir' => null, - 'alias' => null, 'prefix' => null, 'is_bundle' => true, ],