Skip to content

Commit

Permalink
ci: behat context + cs (#5651)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jul 5, 2023
1 parent b8cbdb1 commit 0fe4f4d
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 42 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"psr/log": "^1.0 || ^2.0 || ^3.0",
"ramsey/uuid": "^3.7 || ^4.0",
"ramsey/uuid-doctrine": "^1.4",
"soyuka/contexts": "^3.3.6",
"soyuka/contexts": "v3.3.9",
"soyuka/stubs-mongodb": "^1.0",
"symfony/asset": "^6.1",
"symfony/browser-kit": "^6.1",
Expand Down
1 change: 1 addition & 0 deletions features/main/put_collection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Feature: Update an embed collection with PUT
Given I add "Content-Type" header equal to "application/ld+json"

@createSchema
@!mongodb
Scenario: Update embed collection
And I send a "POST" request to "/issue5584_employees" with body:
"""
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Serializer/DocumentNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @author Baptiste Meyer <baptiste.meyer@gmail.com>
*/
final class DocumentNormalizer extends ObjectNormalizer
final class DocumentNormalizer extends ObjectNormalizer // @phpstan-ignore-line
{
public const FORMAT = 'elasticsearch';

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/GetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Patch.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Put.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
array $paginationViaCursor = null,
array $hydraContext = null,
array $openapiContext = null,
bool|OpenApiOperation|null $openapi = null,
bool|OpenApiOperation $openapi = null,
array $exceptionToStatus = null,
bool $queryParameterValidationEnabled = null,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;

/**
* Triggers resource deprecations
*
* Triggers resource deprecations.
*
* @final
*
* @internal
*/
class DeprecationResourceMetadataCollectionFactory implements ResourceMetadataCollectionFactoryInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testCreateMethodReturnsProperPropertyNameCollectionForObjectWith
])
);

self::assertObjectHasAttribute('ignored', new DummyIgnoreProperty());
$this->assertTrue((new \ReflectionObject(new DummyIgnoreProperty()))->hasProperty('ignored'));

$collection = $factory->create(DummyIgnoreProperty::class, ['serializer_groups' => ['dummy']]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<?php

/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace App\State;

use ApiPlatform\Metadata\Operation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<?php

/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace App\State;

use ApiPlatform\Metadata\Operation;
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/app/config/config_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ api_platform:

parameters:
container.autowiring.strict_mode: true
container.dumper.inline_class_loader: true
.container.dumper.inline_class_loader: true

services:
test.client:
Expand Down
4 changes: 2 additions & 2 deletions tests/Symfony/Maker/MakeStateProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function testMakeStateProcessor(bool $isInteractive): void
$this->assertFileExists($newProcessorFile);

// Unify line endings
$expected = preg_replace('~\R~u', "\r\n", file_get_contents(__DIR__.'/../../Fixtures/Symfony/Maker/CustomStateProcessor.php'));
$expected = preg_replace('~\R~u', "\r\n", file_get_contents(__DIR__.'/../../Fixtures/Symfony/Maker/CustomStateProcessor.fixture'));
$result = preg_replace('~\R~u', "\r\n", file_get_contents($newProcessorFile));
$this->assertSame($expected, $result);
$this->assertStringContainsString($expected, $result);

$display = $tester->getDisplay();
$this->assertStringContainsString('Success!', $display);
Expand Down
4 changes: 2 additions & 2 deletions tests/Symfony/Maker/MakeStateProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function testMakeStateProvider(bool $isInteractive): void
$this->assertFileExists($newProviderFile);

// Unify line endings
$expected = preg_replace('~\R~u', "\r\n", file_get_contents(__DIR__.'/../../Fixtures/Symfony/Maker/CustomStateProvider.php'));
$expected = preg_replace('~\R~u', "\r\n", file_get_contents(__DIR__.'/../../Fixtures/Symfony/Maker/CustomStateProvider.fixture'));
$result = preg_replace('~\R~u', "\r\n", file_get_contents($newProviderFile));
$this->assertSame($expected, $result);
$this->assertStringContainsString($expected, $result);

$display = $tester->getDisplay();
$this->assertStringContainsString('Success!', $display);
Expand Down

0 comments on commit 0fe4f4d

Please sign in to comment.