Skip to content

Commit 86be7df

Browse files
chore: fix CI (api-platform#6143)
* chore: fix wrong namespace in test document * chore: fix CS nullable_type_declaration_for_default_null_value * chore: update GitHub Actions versions
1 parent 0710361 commit 86be7df

File tree

284 files changed

+1269
-1269
lines changed

Some content is hidden

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

284 files changed

+1269
-1269
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

.github/workflows/guides.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Setup PHP with pre-release PECL extension
2020
uses: shivammathur/setup-php@v2
2121
with:
@@ -35,7 +35,7 @@ jobs:
3535
composer global config --no-plugins allow-plugins.symfony/runtime true
3636
composer global require php-documentation-generator/php-documentation-generator:dev-main
3737
- name: Cache dependencies
38-
uses: actions/cache@v3
38+
uses: actions/cache@v4
3939
with:
4040
path: ${{ steps.composercache.outputs.dir }}
4141
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}

.github/workflows/subtree.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
split:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
token: ${{ secrets.GITHUB_TOKEN }}

docs/src/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Kernel extends BaseKernel
4545
private $declaredClasses = [];
4646
private string $guide;
4747

48-
public function __construct(string $environment, bool $debug, string $guide = null)
48+
public function __construct(string $environment, bool $debug, ?string $guide = null)
4949
{
5050
parent::__construct($environment, $debug);
5151

@@ -118,7 +118,7 @@ private function configureContainer(ContainerConfigurator $container, LoaderInte
118118
}
119119
}
120120

121-
public function request(Request $request = null): Response
121+
public function request(?Request $request = null): Response
122122
{
123123
if (null === $request && \function_exists('App\Playground\request')) {
124124
$request = request();

src/Action/EntrypointAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
/**
4242
* @return Entrypoint|Response
4343
*/
44-
public function __invoke(Request $request = null)
44+
public function __invoke(?Request $request = null)
4545
{
4646
if ($this->provider && $this->processor) {
4747
$context = ['request' => $request];

src/Action/ExceptionAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class ExceptionAction
4242
* @param array $errorFormats A list of enabled error formats
4343
* @param array $exceptionToStatus A list of exceptions mapped to their HTTP status code
4444
*/
45-
public function __construct(private readonly SerializerInterface $serializer, private readonly array $errorFormats, private readonly array $exceptionToStatus = [], ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory = null)
45+
public function __construct(private readonly SerializerInterface $serializer, private readonly array $errorFormats, private readonly array $exceptionToStatus = [], ?ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory = null)
4646
{
4747
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
4848
}

src/Api/FilterLocatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private function setFilterLocator(?ContainerInterface $filterLocator, bool $allo
4545
/**
4646
* Gets a filter with a backward compatibility.
4747
*/
48-
private function getFilter(string $filterId): null|FilterInterface|MetadataFilterInterface
48+
private function getFilter(string $filterId): FilterInterface|MetadataFilterInterface|null
4949
{
5050
if ($this->filterLocator && $this->filterLocator->has($filterId)) {
5151
return $this->filterLocator->get($filterId);

src/Api/IdentifiersExtractor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class IdentifiersExtractor implements IdentifiersExtractorInterface
3737
use ResourceClassInfoTrait;
3838
private readonly PropertyAccessorInterface $propertyAccessor;
3939

40-
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ResourceClassResolverInterface $resourceClassResolver, private readonly PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, private readonly PropertyMetadataFactoryInterface $propertyMetadataFactory, PropertyAccessorInterface $propertyAccessor = null)
40+
public function __construct(ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ResourceClassResolverInterface $resourceClassResolver, private readonly PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, private readonly PropertyMetadataFactoryInterface $propertyMetadataFactory, ?PropertyAccessorInterface $propertyAccessor = null)
4141
{
4242
$this->resourceMetadataFactory = $resourceMetadataFactory;
4343
$this->resourceClassResolver = $resourceClassResolver;
@@ -49,7 +49,7 @@ public function __construct(ResourceMetadataCollectionFactoryInterface $resource
4949
*
5050
* TODO: 3.0 identifiers should be stringable?
5151
*/
52-
public function getIdentifiersFromItem(object $item, Operation $operation = null, array $context = []): array
52+
public function getIdentifiersFromItem(object $item, ?Operation $operation = null, array $context = []): array
5353
{
5454
if (!$this->isResourceClass($this->getObjectClass($item))) {
5555
return ['id' => $this->propertyAccessor->getValue($item, 'id')];
@@ -96,7 +96,7 @@ private function getIdentifiersFromOperation(object $item, Operation $operation,
9696
/**
9797
* Gets the value of the given class property.
9898
*/
99-
private function getIdentifierValue(object $item, string $class, string $property, string $parameterName, string $toProperty = null): float|bool|int|string
99+
private function getIdentifierValue(object $item, string $class, string $property, string $parameterName, ?string $toProperty = null): float|bool|int|string
100100
{
101101
if ($item instanceof $class) {
102102
try {

src/Api/IdentifiersExtractorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ interface IdentifiersExtractorInterface
2828
*
2929
* @throws RuntimeException
3030
*/
31-
public function getIdentifiersFromItem(object $item, Operation $operation = null, array $context = []): array;
31+
public function getIdentifiersFromItem(object $item, ?Operation $operation = null, array $context = []): array;
3232
}

src/Api/IriConverterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface IriConverterInterface
3131
* @throws InvalidArgumentException
3232
* @throws ItemNotFoundException
3333
*/
34-
public function getResourceFromIri(string $iri, array $context = [], Operation $operation = null): object;
34+
public function getResourceFromIri(string $iri, array $context = [], ?Operation $operation = null): object;
3535

3636
/**
3737
* Gets the IRI associated with the given item.
@@ -41,5 +41,5 @@ public function getResourceFromIri(string $iri, array $context = [], Operation $
4141
* @throws InvalidArgumentException
4242
* @throws RuntimeException
4343
*/
44-
public function getIriFromResource(object|string $resource, int $referenceType = UrlGeneratorInterface::ABS_PATH, Operation $operation = null, array $context = []): ?string;
44+
public function getIriFromResource(object|string $resource, int $referenceType = UrlGeneratorInterface::ABS_PATH, ?Operation $operation = null, array $context = []): ?string;
4545
}

0 commit comments

Comments
 (0)