Skip to content

Commit 8a35ee2

Browse files
chore: fix CI (#6144)
* chore: disable keep_legacy_inflector in Doctrine tests * chore: fix Doctrine ORM enable_lazy_ghost_objects deprecation in tests configuration * chore: fix null value for CS * chore: fix CS post rebase from main * chore: remove useless legacy test services * chore: fix YAML with Symfony dev dependencies
1 parent 66e2672 commit 8a35ee2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+180
-193
lines changed

components.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}
8787

8888
$warned = [];
89-
$getComponentNamespace = function (ReflectionClass $r, ReflectionClass $inside = null) use ($psrMap, $warned, $ignoreList, $namespace) {
89+
$getComponentNamespace = function (ReflectionClass $r, ?ReflectionClass $inside = null) use ($psrMap, $warned, $ignoreList, $namespace) {
9090
$ns = $r->getNamespaceName();
9191
// Find this components namespace
9292
$nsParts = explode('\\', $ns);

src/Doctrine/Common/State/LinksHandlerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function getLinks(string $resourceClass, Operation $operation, array $co
9292
/**
9393
* @param array<int|string,mixed> $identifiers
9494
*/
95-
private function getIdentifierValue(array &$identifiers, string $name = null): mixed
95+
private function getIdentifierValue(array &$identifiers, ?string $name = null): mixed
9696
{
9797
if (null !== $name && isset($identifiers[$name])) {
9898
$value = $identifiers[$name];
@@ -107,7 +107,7 @@ private function getIdentifierValue(array &$identifiers, string $name = null): m
107107
/**
108108
* @return \ApiPlatform\Metadata\Link[]|array
109109
*/
110-
private function getOperationLinks(Operation $operation = null): array
110+
private function getOperationLinks(?Operation $operation = null): array
111111
{
112112
if ($operation instanceof GraphQlOperation) {
113113
return $operation->getLinks() ?? [];

src/Doctrine/Odm/State/CollectionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class CollectionProvider implements ProviderInterface
3636
/**
3737
* @param AggregationCollectionExtensionInterface[] $collectionExtensions
3838
*/
39-
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $collectionExtensions = [], ContainerInterface $handleLinksLocator = null)
39+
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $collectionExtensions = [], ?ContainerInterface $handleLinksLocator = null)
4040
{
4141
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
4242
$this->handleLinksLocator = $handleLinksLocator;

src/Doctrine/Odm/State/ItemProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class ItemProvider implements ProviderInterface
3939
/**
4040
* @param AggregationItemExtensionInterface[] $itemExtensions
4141
*/
42-
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $itemExtensions = [], ContainerInterface $handleLinksLocator = null)
42+
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $itemExtensions = [], ?ContainerInterface $handleLinksLocator = null)
4343
{
4444
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
4545
$this->handleLinksLocator = $handleLinksLocator;

src/Doctrine/Odm/State/LinksHandlerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait LinksHandlerTrait
3131

3232
private ManagerRegistry $managerRegistry;
3333

34-
private function handleLinks(Builder $aggregationBuilder, array $identifiers, array $context, string $resourceClass, Operation $operation = null): void
34+
private function handleLinks(Builder $aggregationBuilder, array $identifiers, array $context, string $resourceClass, ?Operation $operation = null): void
3535
{
3636
if (!$identifiers) {
3737
return;

src/Doctrine/Odm/Tests/Fixtures/Document/Dummy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ public function getFoo(): ?array
152152
return $this->foo;
153153
}
154154

155-
public function setFoo(array $foo = null): void
155+
public function setFoo(?array $foo = null): void
156156
{
157157
$this->foo = $foo;
158158
}
159159

160-
public function setDummyDate(\DateTime $dummyDate = null): void
160+
public function setDummyDate(?\DateTime $dummyDate = null): void
161161
{
162162
$this->dummyDate = $dummyDate;
163163
}

src/Doctrine/Odm/Tests/Fixtures/Document/RelatedDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getThirdLevel(): ?ThirdLevel
113113
return $this->thirdLevel;
114114
}
115115

116-
public function setThirdLevel(ThirdLevel $thirdLevel = null): void
116+
public function setThirdLevel(?ThirdLevel $thirdLevel = null): void
117117
{
118118
$this->thirdLevel = $thirdLevel;
119119
}

src/Doctrine/Odm/Tests/Fixtures/Document/ThirdLevel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getFourthLevel(): ?FourthLevel
7777
return $this->fourthLevel;
7878
}
7979

80-
public function setFourthLevel(FourthLevel $fourthLevel = null): void
80+
public function setFourthLevel(?FourthLevel $fourthLevel = null): void
8181
{
8282
$this->fourthLevel = $fourthLevel;
8383
}

src/Doctrine/Odm/Tests/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ api_platform:
2121
json: ['application/json']
2222
doctrine: false
2323
doctrine_mongodb_odm: true
24+
keep_legacy_inflector: false
2425
mapping:
2526
paths:
2627
- '%kernel.project_dir%/Fixtures/Document'

src/Doctrine/Orm/State/CollectionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class CollectionProvider implements ProviderInterface
3939
/**
4040
* @param QueryCollectionExtensionInterface[] $collectionExtensions
4141
*/
42-
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $collectionExtensions = [], ContainerInterface $handleLinksLocator = null)
42+
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ManagerRegistry $managerRegistry, private readonly iterable $collectionExtensions = [], ?ContainerInterface $handleLinksLocator = null)
4343
{
4444
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
4545
$this->handleLinksLocator = $handleLinksLocator;

0 commit comments

Comments
 (0)