mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Add with_constructor_extractor conditionally if symofony is >=7
This commit is contained in:
parent
20e78ae3cd
commit
451d58bb07
2 changed files with 15 additions and 2 deletions
|
|
@ -4,7 +4,5 @@ framework:
|
||||||
enabled: true
|
enabled: true
|
||||||
csrf_protection: true
|
csrf_protection: true
|
||||||
http_method_override: true
|
http_method_override: true
|
||||||
property_info:
|
|
||||||
with_constructor_extractor: false
|
|
||||||
session:
|
session:
|
||||||
handler_id: ~
|
handler_id: ~
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ use Sylius\Bundle\CoreBundle\Attribute\AsUriBasedSectionResolver;
|
||||||
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
|
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
|
||||||
use Sylius\Component\Core\Filesystem\Adapter\FilesystemAdapterInterface;
|
use Sylius\Component\Core\Filesystem\Adapter\FilesystemAdapterInterface;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
use Symfony\Component\DependencyInjection\ChildDefinition;
|
use Symfony\Component\DependencyInjection\ChildDefinition;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||||
|
|
@ -110,6 +111,7 @@ final class SyliusCoreExtension extends AbstractResourceExtension implements Pre
|
||||||
$this->prependHwiOauth($container);
|
$this->prependHwiOauth($container);
|
||||||
$this->prependDoctrineMigrations($container);
|
$this->prependDoctrineMigrations($container);
|
||||||
$this->prependDoctrineIdentityGenerationPreferences($container);
|
$this->prependDoctrineIdentityGenerationPreferences($container);
|
||||||
|
$this->prependPropertyInfo($container);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getMigrationsNamespace(): string
|
protected function getMigrationsNamespace(): string
|
||||||
|
|
@ -152,6 +154,19 @@ final class SyliusCoreExtension extends AbstractResourceExtension implements Pre
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function prependPropertyInfo(ContainerBuilder $container): void
|
||||||
|
{
|
||||||
|
if (version_compare(Kernel::VERSION, '7.0.0', '<')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$container->prependExtensionConfig('framework', [
|
||||||
|
'property_info' => [
|
||||||
|
'with_constructor_extractor' => false,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
private function prependHwiOauth(ContainerBuilder $container): void
|
private function prependHwiOauth(ContainerBuilder $container): void
|
||||||
{
|
{
|
||||||
if (!$container->hasExtension('hwi_oauth')) {
|
if (!$container->hasExtension('hwi_oauth')) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue