Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"doctrine/deprecations": "^1.0",
"doctrine/persistence": "^4",
"doctrine/sql-formatter": "^1.0.1",
"symfony/cache": "^6.4 || ^7.0 || ^8.0",
"symfony/config": "^6.4 || ^7.0 || ^8.0",
"symfony/console": "^6.4 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
"symfony/doctrine-bridge": "^6.4.3 || ^7.0.3 || ^8.0",
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/cache": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/doctrine-bridge": "^6.4.3 || ^7.0.3",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/service-contracts": "^3"
},
"require-dev": {
Expand All @@ -50,18 +50,18 @@
"phpstan/phpstan-strict-rules": "^2",
"phpunit/phpunit": "^12.3.10",
"psr/log": "^3.0",
"symfony/doctrine-messenger": "^6.4 || ^7.0 || ^8.0",
"symfony/expression-language": "^6.4 || ^7.0 || ^8.0",
"symfony/messenger": "^6.4 || ^7.0 || ^8.0",
"symfony/property-info": "^6.4 || ^7.0 || ^8.0",
"symfony/security-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/stopwatch": "^6.4 || ^7.0 || ^8.0",
"symfony/string": "^6.4 || ^7.0 || ^8.0",
"symfony/twig-bridge": "^6.4 || ^7.0 || ^8.0",
"symfony/validator": "^6.4 || ^7.0 || ^8.0",
"symfony/var-exporter": "^6.4.1 || ^7.0.1 || ^8.0",
"symfony/web-profiler-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/yaml": "^6.4 || ^7.0 || ^8.0",
"symfony/doctrine-messenger": "^6.4 || ^7.0",
"symfony/expression-language": "^6.4 || ^7.0",
"symfony/messenger": "^6.4 || ^7.0",
"symfony/property-info": "^6.4 || ^7.0",
"symfony/security-bundle": "^6.4 || ^7.0",
"symfony/stopwatch": "^6.4 || ^7.0",
"symfony/string": "^6.4 || ^7.0",
"symfony/twig-bridge": "^6.4 || ^7.0",
"symfony/validator": "^6.4 || ^7.0",
"symfony/var-exporter": "^6.4.1 || ^7.0.1",
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0",
"twig/twig": "^3.21.1"
},
"conflict": {
Expand Down
4 changes: 3 additions & 1 deletion src/DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,10 @@ private function validateAutoMapping(array $managerConfigs): string|null

/**
* {@inheritDoc}
*
* @return void
*/
public function load(array $configs, ContainerBuilder $container): void
public function load(array $configs, ContainerBuilder $container)
{
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfigurationPrependingDefaults($configuration, $configs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
use PDO;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RequiresMethod;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
use Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestHydrator;
Expand All @@ -41,7 +40,6 @@
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\VarExporter\ProxyHelper;

use function array_filter;
use function array_keys;
Expand Down Expand Up @@ -1186,7 +1184,6 @@ public function testDisableSchemaValidation(): void
$this->assertFalse($collectorDefinition->getArguments()[1]);
}

#[RequiresMethod(ProxyHelper::class, 'generateLazyGhost')]
public function testNativeLazyObjectsWithoutConfig(): void
{
if (! interface_exists(EntityManagerInterface::class)) {
Expand All @@ -1211,7 +1208,6 @@ public function testNativeLazyObjectsWithConfigTrue(): void
$this->assertTrue($entityManager->getConfiguration()->isNativeLazyObjectsEnabled());
}

#[RequiresMethod(ProxyHelper::class, 'generateLazyGhost')]
public function testNativeLazyObjectsWithConfigFalse(): void
{
if (! interface_exists(EntityManagerInterface::class)) {
Expand Down
3 changes: 0 additions & 3 deletions tests/DependencyInjection/DoctrineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,6 @@ public function testEntityAttributeExcludesFromContainer(string $class): void
/** @phpstan-ignore function.alreadyNarrowedType */
$attributes = method_exists($container, 'getAttributeAutoconfigurators')
? array_map(static fn (array $arr) => $arr[0], $container->getAttributeAutoconfigurators())
/** @phpstan-ignore method.notFound */
: $container->getAutoconfiguredAttributes();
$this->assertInstanceOf(Closure::class, $attributes[$class]);

Expand Down Expand Up @@ -1003,7 +1002,6 @@ public function testAsEntityListenerAttribute(): void
/** @phpstan-ignore function.alreadyNarrowedType */
$attributes = method_exists($container, 'getAttributeAutoconfigurators')
? array_map(static fn (array $arr) => $arr[0], $container->getAttributeAutoconfigurators())
/** @phpstan-ignore method.notFound */
: $container->getAutoconfiguredAttributes();
$this->assertInstanceOf(Closure::class, $attributes[AsEntityListener::class]);

Expand Down Expand Up @@ -1043,7 +1041,6 @@ public function testAsDoctrineListenerAttribute(): void
/** @phpstan-ignore function.alreadyNarrowedType */
$attributes = method_exists($container, 'getAttributeAutoconfigurators')
? array_map(static fn (array $arr) => $arr[0], $container->getAttributeAutoconfigurators())
/** @phpstan-ignore method.notFound */
: $container->getAutoconfiguredAttributes();
$this->assertInstanceOf(Closure::class, $attributes[AsDoctrineListener::class]);

Expand Down
8 changes: 0 additions & 8 deletions tests/DependencyInjection/Fixtures/DbalTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use function md5;
use function mt_rand;
use function sys_get_temp_dir;
use function version_compare;

class DbalTestKernel extends Kernel
{
Expand Down Expand Up @@ -46,13 +45,6 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'http_method_override' => false,
]);

/** @phpstan-ignore if.alwaysFalse */
if (version_compare(Kernel::VERSION, '7.0.0', '<')) {
$container->loadFromExtension('framework', [
'annotations' => ['enabled' => true],
]);
}

$container->loadFromExtension('doctrine', [
'dbal' => $this->dbalConfig,
]);
Expand Down
5 changes: 0 additions & 5 deletions tests/DependencyInjection/XmlDoctrineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,18 @@
namespace Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection;

use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RequiresMethod;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader as LoaderXmlFileLoader;

#[IgnoreDeprecations]
#[RequiresMethod(LoaderXmlFileLoader::class, 'loadFile')]
class XmlDoctrineExtensionTest extends AbstractDoctrineExtensionTestCase
{
protected function loadFromFile(
ContainerBuilder $container,
string $file,
): void {
/** @phpstan-ignore class.notFound */
$loadXml = new XmlFileLoader($container, new FileLocator(__DIR__ . '/Fixtures/config/xml'));
/** @phpstan-ignore class.notFound */
$loadXml->import($file . '.{xml}');
}
}
1 change: 0 additions & 1 deletion tests/Polyfill/SymfonyApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function addCommand(callable|Command $command): Command|null
*/
public function add(Command $command): Command
{
/** @phpstan-ignore staticMethod.notFound */
return parent::add($command);
}
}