diff --git a/composer.json b/composer.json index 2c017d1..f7f6bc3 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,12 @@ "psr/http-client-implementation": "1.0", "psr/http-factory": "^1.0", "psr/log": "^3.0", - "symfony/framework-bundle": "^6.4|^7.0 || 8.0.3", - "symfony/http-client": "^6.4.18|^7.2 || 8.0.3", - "symfony/http-kernel": "^6.4|^7.2 || 8.0.3", - "symfony/property-access": "^6.4|^7.2 || 8.0.3", + "symfony/framework-bundle": "^7.2 || ^8.0", + "symfony/http-client": "^7.2 || ^8.0", + "symfony/http-kernel": "^7.2 || ^8.0", + "symfony/property-access": "^7.2 || ^8.0", "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4|^7.2 || 8.0.0", + "symfony/var-exporter": "^7.2 || ^8.0", "typesense/typesense-php": "^4.9|^5.0" }, "require-dev": { @@ -29,15 +29,14 @@ "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^11.5|^12.0", "rector/rector": "^2.0.8", - "symfony/console": "^6.4|^7.2 || 8.0.3", - "symfony/dotenv": "^6.4|^7.2 || 8.0.0", - "symfony/phpunit-bridge": "^7.0 || ^8.0", - "symfony/runtime": "^6.4|^7.2 || 8.0.1", - "symfony/yaml": "^6.4|^7.0 || 8.0.1" + "symfony/console": "^7.2 || ^8.0", + "symfony/dotenv": "^7.2 || ^8.0", + "symfony/phpunit-bridge": "^7.2 || ^8.0", + "symfony/runtime": "^7.2 || ^8.0", + "symfony/yaml": "^7.2 || ^8.0" }, "conflict": { - "php-http/httplug": "<1.5", - "symfony/var-exporter": ">=8" + "php-http/httplug": "<1.5" }, "config": { "sort-packages": true, @@ -61,7 +60,6 @@ "auto-scripts": { "cache:clear": "symfony-cmd" }, - "phpstan": [ "Composer\\Config::disableProcessTimeout", "./vendor/bin/phpstan analyse --memory-limit=-1" diff --git a/src/Client/ClientInterface.php b/src/Client/ClientInterface.php index 734d52a..22a62f3 100644 --- a/src/Client/ClientInterface.php +++ b/src/Client/ClientInterface.php @@ -1,5 +1,7 @@ =7) - // The constant hack is just for rector to not consider this branch as "Always true" and remove it - if (constant(Kernel::class.'::VERSION_ID') < 70000) { - return; + // symfony/var-exporter v8 removed ProxyHelper::generateLazyGhost(); on + // PHP 8.4+ Doctrine can fall back to native lazy objects instead. + if (\PHP_VERSION_ID >= 80400 && !method_exists(ProxyHelper::class, 'generateLazyGhost')) { // @phpstan-ignore-line + $containerBuilder->prependExtensionConfig('doctrine', [ + 'orm' => ['enable_native_lazy_objects' => true], + ]); } - $containerBuilder->prependExtensionConfig('framework', [ - 'property_info' => ['with_constructor_extractor' => false], - ]); } private function clearCache(): void diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9089622..bbbba61 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,7 @@