Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed signatures related to laminas-servicemanager 2.x #704

Merged
merged 2 commits into from
Jan 3, 2022

Conversation

driehle
Copy link
Member

@driehle driehle commented Jan 3, 2022

In laminas-servicemanager 2.x, the FactoryInterface included the following methods:

  • public function createService(ServiceLocatorInterface $serviceLocator)
  • public function setCreationOptions(array $options)

These methods are replaced by the following method in laminas-servicemanager 3.x:

  • public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)

Since DoctrineORMModule already requires laminas-servicemanager 3.x since version 3.0.0, i.e. for nearly two years, it is time to drop the obsolete functions createService() and setCreationOptions() in all factories. All factories already implement a __invoke() method.

This is the same as done in doctrine/DoctrineModule#763

@driehle driehle added this to the 5.0.0 milestone Jan 3, 2022
@driehle driehle self-assigned this Jan 3, 2022
@driehle driehle requested review from greg0ire, SenseException and a team January 3, 2022 08:35
Copy link
Member

@TomHAnderson TomHAnderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is good except for the ->__invoke calls.

tests/Service/ConfigurationFactoryTest.php Outdated Show resolved Hide resolved
tests/Service/ConfigurationFactoryTest.php Outdated Show resolved Hide resolved
@driehle driehle force-pushed the feature/laminas-servicemanager branch from 4108702 to 46b6dc2 Compare January 3, 2022 09:42
@driehle driehle merged commit 2e3123c into doctrine:5.0.x Jan 3, 2022
@driehle driehle deleted the feature/laminas-servicemanager branch January 3, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants