8000 bug #52234  add return type hints to EntityFactory (xabbuh) · symfony/symfony@fafbbfa · GitHub
[go: up one dir, main page]

Skip to content

Commit fafbbfa

Browse files
committed
bug #52234  add return type hints to EntityFactory (xabbuh)
This PR was merged into the 6.4 branch. Discussion ----------  add return type hints to EntityFactory | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT see https://github.com/EasyCorp/EasyAdminBundle/actions/runs/6603120076/job/17935909075 Commits ------- 3ceed63 add return type hints to EntityFactory
2 parents f95aaed + 3ceed63 commit fafbbfa

File tree

4 files changed

+7
-36
lines changed

4 files changed

+7
-36
lines changed

.github/expected-missing-return-types.diff

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -151,30 +151,6 @@ diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/Regist
151151
+ public function process(ContainerBuilder $container): void
152152
{
153153
if (!$this->enabled($container)) {
154-
diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
155-
--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
156-
+++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
157-
@@ -34,5 +34,5 @@ class EntityFactory implements UserProviderFactoryInterface
158-
* @return void
159-
*/
160-
- public function create(ContainerBuilder $container, string $id, array $config)
161-
+ public function create(ContainerBuilder $container, string $id, array $config): void
162-
{
163-
$container
164-
@@ -47,5 +47,5 @@ class EntityFactory implements UserProviderFactoryInterface
165-
* @return string
166-
*/
167-
- public function getKey()
168-
+ public function getKey(): string
169-
{
170-
return $this->key;
171-
@@ -55,5 +55,5 @@ class EntityFactory implements UserProviderFactoryInterface
172-
* @return void
173-
*/
174-
- public function addConfiguration(NodeDefinition $node)
175-
+ public function addConfiguration(NodeDefinition $node): void
176-
{
177-
$node
178154
diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
179155
--- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
180156
+++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

UPGRADE-6.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ DependencyInjection
9595
DoctrineBridge
9696
--------------
9797

98+
* [BC Break] Add return type-hints to `EntityFactory`
9899
* Deprecate `DbalLogger`, use a middleware instead
99100
* Deprecate not constructing `DoctrineDataCollector` with an instance of `DebugDataHolder`
100101
* Deprecate `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
6.4
55
---
66

7+
* [BC BREAK] Add return type-hints to `EntityFactory`
78
* Deprecate `DbalLogger`, use a middleware instead
89
* Deprecate not constructing `DoctrineDataCollector` with an instance of `DebugDataHolder`
910
* Deprecate `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead

src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
/**
2020
* EntityFactory creates services for Doctrine user provider.
2121
*
22+
* @final since Symfony 6.4
23+
*
2224
* @author Fabien Potencier <fabien@symfony.com>
2325
* @author Christophe Coevoet <stof@notk.org>
2426
*/
@@ -30,10 +32,7 @@ public function __construct(
3032
) {
3133
}
3234

33-
/**
34-
* @return void
35-
*/
36-
public function create(ContainerBuilder $container, string $id, array $config)
35+
public function create(ContainerBuilder $container, string $id, array $config): void
3736
{
3837
$container
3938
->setDefinition($id, new ChildDefinition($this->providerId))
@@ -43,18 +42,12 @@ public function create(ContainerBuilder $container, string $id, array $config)
4342
;
4443
}
4544

46-
/**
47-
* @return string
48-
*/
49-
public function getKey()
45+
public function getKey(): string
5046
{
5147
return $this->key;
5248
}
5349

54-
/**
55-
* @return void
56-
*/
57-
public function addConfiguration(NodeDefinition $node)
50+
public function addConfiguration(NodeDefinition $node): void
5851
{
5952
$node
6053
->children()

0 commit comments

Comments
 (0)
0