Skip to content

Commit

Permalink
Merge d993f91 into 9aeaa5e
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpoulain committed Oct 8, 2021
2 parents 9aeaa5e + d993f91 commit 91ebeaf
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 150 deletions.
19 changes: 0 additions & 19 deletions features/main/operation.feature
Expand Up @@ -64,22 +64,3 @@ Feature: Operation support
Scenario: Get a 404 response for the disabled item operation
When I send a "GET" request to "/disable_item_operations/1"
Then the response status code should be 404

@createSchema
Scenario: Get a book by its ISBN
Given there is a book
When I send a "GET" request to "books/by_isbn/9780451524935"
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the JSON should be equal to:
"""
{
"@context": "/contexts/Book",
"@id": "/books/1",
"@type": "Book",
"name": "1984",
"isbn": "9780451524935",
"id": 1
}
"""
2 changes: 0 additions & 2 deletions src/Metadata/Resource/DeprecationMetadataTrait.php
Expand Up @@ -72,8 +72,6 @@ public function getKeyValue(string $key, $value)
} elseif ('graphql' === $key) {
trigger_deprecation('api-platform/core', '2.7', 'The "graphql" option is deprecated and will be renamed to "graphQlOperations".');
$key = 'graphQlOperations';
} elseif ('identifiers' === $key) {
$key = 'uriVariables';
}

return [$this->camelCaseToSnakeCaseNameConverter->denormalize($key), $value];
Expand Down
22 changes: 0 additions & 22 deletions tests/Core/Behat/DoctrineContext.php
Expand Up @@ -18,7 +18,6 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Document\AbsoluteUrlRelationDummy as AbsoluteUrlRelationDummyDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\Address as AddressDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\Answer as AnswerDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\Book as BookDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\CompositeItem as CompositeItemDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\CompositeLabel as CompositeLabelDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\CompositePrimitiveItem as CompositePrimitiveItemDocument;
Expand Down Expand Up @@ -91,7 +90,6 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\AbsoluteUrlRelationDummy;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Address;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Answer;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Book;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositeItem;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositeLabel;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositePrimitiveItem;
Expand Down Expand Up @@ -1855,18 +1853,6 @@ public function thereIsAPatchDummyRelation()
$this->manager->flush();
}

/**
* @Given there is a book
*/
public function thereIsABook()
{
$book = $this->buildBook();
$book->name = '1984';
$book->isbn = '9780451524935';
$this->manager->persist($book);
$this->manager->flush();
}

/**
* @Given there is a custom multiple identifier dummy
*/
Expand Down Expand Up @@ -2364,14 +2350,6 @@ private function buildPatchDummyRelation()
return $this->isOrm() ? new PatchDummyRelation() : new PatchDummyRelationDocument();
}

/**
* @return BookDocument|Book
*/
private function buildBook()
{
return $this->isOrm() ? new Book() : new BookDocument();
}

/**
* @return CustomMultipleIdentifierDummy|CustomMultipleIdentifierDummyDocument
*/
Expand Down
51 changes: 0 additions & 51 deletions tests/Fixtures/TestBundle/Document/Book.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Document/SlugParentDummy.php
Expand Up @@ -23,7 +23,7 @@
/**
* Custom Identifier Dummy With Subresource.
*
* @ApiResource(attributes={"identifiers"="slug"})
* @ApiResource
* @ODM\Document
*/
class SlugParentDummy
Expand Down
53 changes: 0 additions & 53 deletions tests/Fixtures/TestBundle/Entity/Book.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Entity/SlugParentDummy.php
Expand Up @@ -23,7 +23,7 @@
/**
* Custom Identifier Dummy With Subresource.
*
* @ApiResource(attributes={"identifiers"="slug"})
* @ApiResource
* @ORM\Entity
*/
class SlugParentDummy
Expand Down
1 change: 0 additions & 1 deletion tests/Fixtures/TestBundle/Model/TaxonInterface.php
Expand Up @@ -20,7 +20,6 @@

/**
* @ApiResource(
* attributes={"identifiers"="code"},
* shortName="Taxon",
* normalizationContext={
* "groups"={"taxon_read"},
Expand Down

0 comments on commit 91ebeaf

Please sign in to comment.