Skip to content

 add return type hints to EntityFactory #52234

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

Merged
merged 1 commit into from
Oct 22, 2023
Merged
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
24 changes: 0 additions & 24 deletions .github/expected-missing-return-types.diff
Original file line number Diff line number Diff line change
Expand Up @@ -151,30 +151,6 @@ diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/Regist
+ public function process(ContainerBuilder $container): void
{
if (!$this->enabled($container)) {
diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
+++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
@@ -34,5 +34,5 @@ class EntityFactory implements UserProviderFactoryInterface
* @return void
*/
- public function create(ContainerBuilder $container, string $id, array $config)
+ public function create(ContainerBuilder $container, string $id, array $config): void
{
$container
@@ -47,5 +47,5 @@ class EntityFactory implements UserProviderFactoryInterface
* @return string
*/
- public function getKey()
+ public function getKey(): string
{
return $this->key;
@@ -55,5 +55,5 @@ class EntityFactory implements UserProviderFactoryInterface
* @return void
*/
- public function addConfiguration(NodeDefinition $node)
+ public function addConfiguration(NodeDefinition $node): void
{
$node
diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
--- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
+++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Expand Down
1 change: 1 addition & 0 deletions UPGRADE-6.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ DependencyInjection
DoctrineBridge
--------------

* [BC Break] Add return type-hints to `EntityFactory`
* Deprecate `DbalLogger`, use a middleware instead
* Deprecate not constructing `DoctrineDataCollector` with an instance of `DebugDataHolder`
* Deprecate `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
6.4
---

* [BC BREAK] Add return type-hints to `EntityFactory`
* Deprecate `DbalLogger`, use a middleware instead
* Deprecate not constructing `DoctrineDataCollector` with an instance of `DebugDataHolder`
* Deprecate `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/**
* EntityFactory creates services for Doctrine user provider.
*
* @final since Symfony 6.4
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Christophe Coevoet <stof@notk.org>
*/
Expand All @@ -30,10 +32,7 @@ public function __construct(
) {
}

/**
* @return void
*/
public function create(ContainerBuilder $container, string $id, array $config)
public function create(ContainerBuilder $container, string $id, array $config): void
{
$container
->setDefinition($id, new ChildDefinition($this->providerId))
Expand All @@ -43,18 +42,12 @@ public function create(ContainerBuilder $container, string $id, array $config)
;
}

/**
* @return string
*/
public function getKey()
public function getKey(): string
{
return $this->key;
}

/**
* @return void
*/
public function addConfiguration(NodeDefinition $node)
public function addConfiguration(NodeDefinition $node): void
{
$node
->children()
Expand Down