Skip to content

Commit 2e3123c

Browse files
authored
Merge pull request #704 from driehle/feature/laminas-servicemanager
Removed signatures related to laminas-servicemanager 2.x
2 parents 7e1172f + 46b6dc2 commit 2e3123c

24 files changed

+53
-268
lines changed

src/Service/CliConfiguratorFactory.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
use DoctrineORMModule\CliConfigurator;
88
use Interop\Container\ContainerInterface;
9-
use Laminas\ServiceManager\FactoryInterface;
10-
use Laminas\ServiceManager\ServiceLocatorInterface;
9+
use Laminas\ServiceManager\Factory\FactoryInterface;
1110

1211
class CliConfiguratorFactory implements FactoryInterface
1312
{
@@ -18,14 +17,4 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
1817
{
1918
return new CliConfigurator($serviceLocator);
2019
}
21-
22-
/**
23-
* {@inheritDoc}
24-
*
25-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
26-
*/
27-
public function createService(ServiceLocatorInterface $serviceLocator)
28-
{
29-
return $this($serviceLocator, CliConfigurator::class);
30-
}
3120
}

src/Service/ConfigurationFactory.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use DoctrineORMModule\Service\DBALConfigurationFactory as DoctrineConfigurationFactory;
1414
use Interop\Container\ContainerInterface;
1515
use Laminas\ServiceManager\Exception\InvalidArgumentException;
16-
use Laminas\ServiceManager\ServiceLocatorInterface;
1716

1817
use function is_string;
1918
use function method_exists;
@@ -165,14 +164,6 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
165164
return $config;
166165
}
167166

168-
/**
169-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
170-
*/
171-
public function createService(ServiceLocatorInterface $serviceLocator): Configuration
172-
{
173-
return $this($serviceLocator, Configuration::class);
174-
}
175-
176167
protected function getOptionsClass(): string
177168
{
178169
return DoctrineORMModuleConfiguration::class;

src/Service/DBALConfigurationFactory.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
use Doctrine\DBAL\Types\Type;
99
use DoctrineORMModule\Options\Configuration as DoctrineORMModuleConfiguration;
1010
use Interop\Container\ContainerInterface;
11-
use Laminas\ServiceManager\FactoryInterface;
12-
use Laminas\ServiceManager\ServiceLocatorInterface;
11+
use Laminas\ServiceManager\Factory\FactoryInterface;
1312
use RuntimeException;
1413

1514
use function is_string;
@@ -40,18 +39,6 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
4039
return $config;
4140
}
4241

43-
/**
44-
* {@inheritDoc}
45-
*
46-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
47-
*
48-
* @return Configuration
49-
*/
50-
public function createService(ServiceLocatorInterface $serviceLocator)
51-
{
52-
return $this($serviceLocator, Configuration::class);
53-
}
54-
5542
public function setupDBALConfiguration(ContainerInterface $serviceLocator, Configuration $config): void
5643
{
5744
$options = $this->getOptions($serviceLocator);

src/Service/DBALConnectionFactory.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use DoctrineModule\Service\AbstractFactory;
1111
use DoctrineORMModule\Options\DBALConnection;
1212
use Interop\Container\ContainerInterface;
13-
use Laminas\ServiceManager\ServiceLocatorInterface;
1413
use PDO;
1514

1615
use function array_key_exists;
@@ -74,18 +73,6 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
7473
return $connection;
7574
}
7675

77-
/**
78-
* {@inheritDoc}
79-
*
80-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
81-
*
82-
* @return Connection
83-
*/
84-
public function createService(ServiceLocatorInterface $serviceLocator)
85-
{
86-
return $this($serviceLocator, Connection::class);
87-
}
88-
8976
/**
9077
* Get the class name of the options associated with this factory.
9178
*/

src/Service/DoctrineObjectHydratorFactory.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
use Doctrine\Laminas\Hydrator\DoctrineObject;
88
use Interop\Container\ContainerInterface;
9-
use Laminas\ServiceManager\FactoryInterface;
10-
use Laminas\ServiceManager\ServiceLocatorInterface;
9+
use Laminas\ServiceManager\Factory\FactoryInterface;
1110

1211
class DoctrineObjectHydratorFactory implements FactoryInterface
1312
{
@@ -18,14 +17,4 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
1817
{
1918
return new DoctrineObject($serviceLocator->get('doctrine.entitymanager.orm_default'));
2019
}
21-
22-
/**
23-
* {@inheritDoc}
24-
*
25-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
26-
*/
27-
public function createService(ServiceLocatorInterface $serviceLocator)
28-
{
29-
return $this($serviceLocator, DoctrineObject::class);
30-
}
3120
}

src/Service/EntityManagerAliasCompatFactory.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
use Doctrine\ORM\EntityManager;
88
use Interop\Container\ContainerInterface;
9-
use Laminas\ServiceManager\FactoryInterface;
10-
use Laminas\ServiceManager\ServiceLocatorInterface;
9+
use Laminas\ServiceManager\Factory\FactoryInterface;
1110

1211
/**
1312
* Factory that provides the `Doctrine\ORM\EntityManager` alias for `doctrine.entitymanager.orm_default`
@@ -26,18 +25,4 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
2625
{
2726
return $serviceLocator->get('doctrine.entitymanager.orm_default');
2827
}
29-
30-
/**
31-
* {@inheritDoc}
32-
*
33-
* @deprecated this method was introduced to allow aliasing of service `Doctrine\ORM\EntityManager`
34-
* from `doctrine.entitymanager.orm_default`
35-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
36-
*
37-
* @return EntityManager
38-
*/
39-
public function createService(ServiceLocatorInterface $serviceLocator)
40-
{
41-
return $this($serviceLocator, EntityManager::class);
42-
}
4328
}

src/Service/EntityManagerFactory.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $
3333
return EntityManager::create($connection, $config);
3434
}
3535

36-
/**
37-
* {@inheritDoc}
38-
*
39-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
40-
*
41-
* @return EntityManager
42-
*/
43-
public function createService(ContainerInterface $container)
44-
{
45-
return $this($container, EntityManager::class);
46-
}
47-
4836
public function getOptionsClass(): string
4937
{
5038
return DoctrineORMModuleEntityManager::class;

src/Service/EntityResolverFactory.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
use DoctrineModule\Service\AbstractFactory;
99
use DoctrineORMModule\Options\EntityResolver;
1010
use Interop\Container\ContainerInterface;
11-
use Laminas\EventManager\EventManager;
12-
use Laminas\ServiceManager\ServiceLocatorInterface;
1311

1412
use function assert;
1513

@@ -36,16 +34,6 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $
3634
return $eventManager;
3735
}
3836

39-
/**
40-
* {@inheritDoc}
41-
*
42-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
43-
*/
44-
public function createService(ServiceLocatorInterface $container)
45-
{
46-
return $this($container, EventManager::class);
47-
}
48-
4937
/**
5038
* Get the class name of the options associated with this factory.
5139
*/

src/Service/MappingCollectorFactory.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use DoctrineModule\Service\AbstractFactory;
99
use DoctrineORMModule\Collector\MappingCollector;
1010
use Interop\Container\ContainerInterface;
11-
use Laminas\ServiceManager\ServiceLocatorInterface;
1211

1312
/**
1413
* Service factory responsible for instantiating {@see \DoctrineORMModule\Collector\MappingCollector}
@@ -28,18 +27,6 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $
2827
return new MappingCollector($objectManager->getMetadataFactory(), 'doctrine.mapping_collector.' . $name);
2928
}
3029

31-
/**
32-
* {@inheritDoc}
33-
*
34-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
35-
*
36-
* @return MappingCollector
37-
*/
38-
public function createService(ServiceLocatorInterface $container)
39-
{
40-
return $this($container, MappingCollector::class);
41-
}
42-
4330
public function getOptionsClass(): string
4431
{
4532
throw new BadMethodCallException();

src/Service/MigrationsCommandFactory.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
use Doctrine\Migrations\Tools\Console\Command\DoctrineCommand;
1111
use Interop\Container\ContainerInterface;
1212
use InvalidArgumentException;
13-
use Laminas\ServiceManager\FactoryInterface;
14-
use Laminas\ServiceManager\ServiceLocatorInterface;
13+
use Laminas\ServiceManager\Factory\FactoryInterface;
1514
use RuntimeException;
1615
use Symfony\Component\Console\Input\ArgvInput;
1716

@@ -102,16 +101,6 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
102101
return new $commandClassName($dependencyFactory);
103102
}
104103

105-
/**
106-
* @deprecated 4.1.0 With laminas-servicemanager v3 this method is obsolete and will be removed in 5.0.0.
107-
*
108-
* @throws InvalidArgumentException
109-
*/
110-
public function createService(ServiceLocatorInterface $serviceLocator): DoctrineCommand
111-
{
112-
return $this($serviceLocator, $this->commandClassName);
113-
}
114-
115104
private function getObjectManagerName(): string
116105
{
117106
$arguments = new ArgvInput();

0 commit comments

Comments
 (0)