The server component of API Platform: hypermedia and GraphQL APIs in minutes

Overview

API Platform Core

API Platform Core is an easy to use and powerful system to create hypermedia-driven REST and GraphQL APIs. It is a component of the API Platform framework and it can be integrated with the Symfony framework using the bundle distributed with the library.

It natively supports popular open formats including JSON for Linked Data (JSON-LD), Hydra Core Vocabulary, OpenAPI v2 (formerly Swagger) and v3, HAL and Problem Details.

Build a working and fully-featured CRUD API in minutes. Leverage the awesome features of the tool to develop complex and high performance API-first projects. Extend or override everything you want.

GitHub Actions Codecov SymfonyInsight Scrutinizer Code Quality

Documentation

The documentation of API Platform Core Library can be browsed on the official website.

Comments
  • Issues found on 2.7

    Issues found on 2.7

    Write here as comment the errors you may found on api-platform/core:2.7.x-dev installed on your project. Please mention:

    • the error message
    • the related code if possible
    • the service declaration, if specified
    • the PHP version
    • the Symfony version
    • a fix proposal, if possible
    bug 
    opened by vincentchalamon 141
  • Roadmap to version 2

    Roadmap to version 2

    • [x] Finish #375
    • [x] Rename the namespace Dunglas\ApiBundle to ApiPlatform\Core (or something better?)
    • [x] Move Symfony specific classes and config to the Bridge\Symfony namespace (including the bundle)
    • [x] Move the Composer dependency to symfony/framework-bundle in the require-dev and suggest section
    • [ ] Update the doc
    opened by dunglas 79
  • [Performance] questions and suggestions

    [Performance] questions and suggestions

    Hello folks,

    Just wanted to share a few thoughts I have. With a few big api platform I see some bad tendencies happening again and again that totally crashes the performance in both dev and prod env. In dev env it's quite difficult to live with.

    1/ custom normalizers are rarely using the CacheableSupportsMethodInterface interface.

    Normalization : we have a fully hydrated entity, it's easy to cache with some instanceof and an interface.

    Denormalization : we have an array of yet unknown data and a string representing the class to hydrate. We use class_implements on the string classname to check if it's cacheable but it's not as nice.

    If we are not able to use cache on denormalization, it's better to separate the normalizer and the denormalizer in two different classes so the normalizer can be cacheable even if the denormalizer is not.

    It's really really important that the normalizer to be cacheable.

    On our application, with a critical route we have 36000 getNormalizer calls. 4 normalizers were not cachable, so it's 360004 supportNormmosation calls. Even for simple stuff as native- stuff. Of course this route is cached in prod mode, but it's not in dev mode

    suggestion : it's so critical that perhaps it should be visible somewhere in the profiler.

    2/ IriConverter::getIriFromItem is costly when it's called.

    What happens?

    • on normalization, we arrive on ApiPlatform\Core\Serializer\ItemNormalizer so on ApiPlatform\Core\Serializer\AbstractItemNormalizer::normalize
    • as $context['resources'] seems to be always set, i calls $resource = $context['iri'] ?? $this->iriConverter->getIriFromItem($object);
    • it does two things:
      • find the identifier (in our case "id" 100% on the time). This is the worst part. For each call, it goes straight to phpdocumentor on the file itself just to be able to extract "hey the identifier property is 'id'".
      • generate the route via the router

    As we have a react app with multiples http calls to the api backend, it creates a concurence on the file read. As we are on mac os x with an nfs and very poor access disk performance, every filesystem call cost us a lot.

    There is multiple layer of caching that are all disabled in test/dev mode via the ApiPlatformExtension::registerCacheConfiguration. We can set cache back by enabling the api_platform.metadata_cache parameter to true in our app. But it enables the cache for every part of the stack. If we are in dev mode it's because we touch to the resource & serialization config a lot. But we NEVER change the identifier property. The cache removal is a very big on/off performance setback.

    Furthermore, on my demo call, I have 320 differents entities in my response, but some of them is used a lot of time. It loads and extract with phpdoc 1590 times. I supposed it's the role of ApiPlatform\Core\Api\CachedIdentifiersExtractor::getKeys but i didn't see it working. I will check.

    patch: static cache on IriConverter::getIriFromItem 1590 => 320 calls

    2/ IriConverter::getIriFromItem is called ALL. THE. TIME. Fun things is: there is no iri routes in my response. So we compute it for nothing (in our case). Did I miss something where it's useful ? Removing it give us the exact same json response whlie giving us a real performance gain.

    patch: remove forced call to the IriConverter in ApiPlatform\Core\Serializer\AbstractItemNormalizer::normalize 320 calls => 19 (generated by cyclic call and max depth config)

    // Questions

    • why iri is computed all the time? wan we safely remove it?
    • can we set the identifier once and for all in the resource config itself to avoid going to phpdocumentor?

    Do you have any advice / information / recommandation ?

    Thanks for reading.

    performance 
    opened by bastnic 69
  • Subresource feature /dummy/1/relatedDummies

    Subresource feature /dummy/1/relatedDummies

    | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no (should not be any) | Deprecations? | no | Tests pass? | yes | Fixed tickets | #634 - not really a fix but it's a start | License | MIT | Doc PR | /

    Note:

    ~~I didn't implement the DataProvider yet! I'm just proposing those first changes to see if you have comments/improvements on the way I handled the nested behavior!~~

    Related issues/PR:

    #885 #634

    What should this PR end up doing:

    Allow /entity/{id}/association operations when a flag on a resource's property is set. For example:

    
    /**
     * @ApiResource
     */
    class Dummy {
        /**
         * @ApiProperty(subcollection=true) 
        */
        public $relatedDummies; 
    }
    
    curl http://localhost/api/dummy/1/related_dummies
    

    You can chain those and have /api/dummy/1/related_dummies/2/third_levels.

    Changes:

    • Add subcollection (boolean) on the PropertyMetadata
    • Initialize a new class ApiPlatform\Util\OperationTypes (maybe the path isn't the best one, suggestions?) to ease the handling of operation types
    • NestedCollectionDataProvider

    TODO

    • [x] path customization through path resolvers (new method no breaks)
    • [x] it will help refactoring ApiLoader kinda messy right now
    • [x] query review
    • [x] tests tests tests
    enhancement [RFR] Ready for Review 
    opened by soyuka 55
  • Manage embedded fields for API Platform Filter

    Manage embedded fields for API Platform Filter

    | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #969 | License | MIT | Doc PR | N/A

    This PR is to aliment a discussion about how to manage embedded fields in API Platform Filter This PR works form Boolean Filter Only. It works recursively Entity->Embed Fields -> Embed Fields.. No Tests is developped for the moment

    bug [RFR] Ready for Review 
    opened by jsamouh 53
  • Add ExistsFilter

    Add ExistsFilter

    | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes (thanks @soyuka!) | Fixed tickets | N/A | License | MIT | Doc PR | TODO

    IS NULL / IS NOT NULL (field / single-valued association) or IS EMPTY / IS NOT EMPTY (collection-valued association)

    enhancement [RFR] Ready for Review 
    opened by teohhanhui 53
  • Improve

    Improve ":id" param normalization

    | Q | A | ------------- | --- | Bug fix? | yes | New feature? | yes/no (depends) | BC breaks? | yes | Deprecations? | yes | Tests pass? | not yet | Fixed tickets | #1309 #1476 and maybe other (#1376 start) #1234 #1309 | License | MIT | Doc PR | n/a

    Issue

    Currently, as I mentioned in #1309, our DataProviders get the raw id param coming from the request. ie https://github.com/api-platform/core/blob/183526946637ecf72ce1ddc4032ede281ee3b381/src/EventListener/ReadListener.php#L103

    There is an issue here where we sometimes want our DataProviders to get a correct instance of the given identifier (eg Ramsey\UUID for an uuid or \DateTime for a date).

    What's being done

    This is what I've come up with. Basically it adds a IdentifierNormalizer class (does not implement the NormalizerInterface because it's not one) that takes the string from $request->attributes->get('id') and returns an array with correct Types. This is not working yet because I have a train to catch haha. Going to add tests and the ability to add normalizers asap (those are NormalizerInterface, for example DateTimeNormalizer etc.)!

    There is a BC break but I've added deprecation and my goal is to keep everything working as before by getting rid of the IdentifierManagerTrait in future versions.

    Benefits

    With this fix the identifier normalization isn't linked to Doctrine anymore. This is a great improvement for future DataProviders that might need the correct types without forcing the developer to use Doctrine. Also, it allows the developper to add custom normalizers for identifiers (for example the UUID mentioned above). By having a cleaner way to parse those, it'll also help us manage errors and throw a NotFoundException when needed (mentioned by @theofidry in #1309). Last but not least, I've improved the composite identifier parser as for now something like a=test;b=bar ;foo;c=123;459; would totally fail because of the ; in the identifier value (nb try with =).

    ping @dkarlovi

    [RFR] Ready for Review 
    opened by soyuka 51
  • Make resource constructor parameters writables

    Make resource constructor parameters writables

    This is motivated because other tools are already constructor friendly (ie Symfony serializer and Doctrine).

    Also using constructors must be recommended and not supporting them is a serious feature missing.

    | Q | A | ------------- | --- | Bug fix? | somehow | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | https://github.com/api-platform/core/issues/1747 | License | MIT | Doc PR | N/A

    [WFC] Waiting for Change 
    opened by Nek- 45
  • Custom DateTime format for a property

    Custom DateTime format for a property

    @dunglas has added DateTimeNormalizer to the Symfony Serializer [symfony/symfony#16411] and we're now using it [#422], but how shall we specify the format to use for each property (other than resorting to custom normalizers)?

    enhancement 
    opened by teohhanhui 43
  • Removals from an ArrayCollection gets normalized wrong

    Removals from an ArrayCollection gets normalized wrong

    Hi,

    I just noticed that if one removes an element from a collection, the result is wrong.

    Example

    /**
     * @ORM\Entity
     */
    class Project
    {
        /**
         * @ORM\OneToMany(targetEntity="PartKeepr\ProjectBundle\Entity\ProjectPart",mappedBy="project",cascade={"persist", "remove"})
         * @Groups({"default"})
         * @var ArrayCollection
         */
        private $parts;
    
        public function __construct () {
            $this->parts = new ArrayCollection();
        }
    
        /**
         * Returns the parts array
         *
         * @return ProjectPart[] An array of ProjectPart objects
         */
        public function getParts()
        {
            return $this->parts;
        }
    
         /**
         * Adds a Project Part
         *
         * @param ProjectPart $projectPart An attachment to add
         */
        public function addPart($projectPart)
        {
            $projectPart->setProject($this);
            $this->parts->add($projectPart);
        }
    
        /**
         * Removes a Project Part
         *
         * @param ProjectPart $projectPart An attachment to remove
         */
        public function removePart($projectPart)
        {
            $projectPart->setProject(null);
            $this->parts->removeElement($projectPart);
        }
    }
    

    Note that the example class is barebones and doesn't include e.g. an identifier, which is actually the case in my project.

    When I remove any part except the first, the resulting JSON has array indexes in the result:

    {  
       "@context":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/contexts\/Project",
       "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/projects\/25",
       "@type":"Project",
       "parts":{  
          "0":{  # This index is included which is otherwise missing
             "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/project_parts\/758",
             "@type":"ProjectPart",
             "part":{  
                "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/parts\/284",
                "@type":"Part",
           }
    }
    

    I would expect the resulting JSON like this:

    {  
       "@context":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/contexts\/Project",
       "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/projects\/25",
       "@type":"Project",
       "parts":{  
          {  # No index
             "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/project_parts\/758",
             "@type":"ProjectPart",
             "part":{  
                "@id":"\/~felicitus\/PartKeepr\/web\/app_dev.php\/api\/parts\/284",
                "@type":"Part",
           }
    }
    

    If my adder/remover implementation is wrong, please let me know. If so, I must refer to https://github.com/dunglas/DunglasApiBundle/issues/153#issuecomment-119265974 again (Sample Implementation of getters/adders/removers)

    wontfix doc 
    opened by Drachenkaetzchen 43
  • Filtering by a relation's property

    Filtering by a relation's property

    Hi,

    This is affecting version 2.0.1 to current (2.0.3)

    Having the following entities:

    <?php
    
    namespace AppBundle\Entity;
    
    use ApiPlatform\Core\Annotation\ApiResource;
    use Doctrine\Common\Collections\ArrayCollection;
    use Doctrine\ORM\Mapping as ORM;
    use Symfony\Component\Validator\Constraints as Assert;
    use Symfony\Component\Serializer\Annotation as Serializer;
    
    /**
     * @ApiResource(
     *     attributes={
     *          "normalization_context"={"groups"={"foo"}},
     *          "filters"={"foo.search_filter"}
     *     }
     * )
     * @ORM\Entity
     */
    class Foo
    {
        /**
         * @var int The entity Id
         *
         * @ORM\Id
         * @ORM\GeneratedValue
         * @ORM\Column(type="integer")
         */
        private $id;
    
        /**
         * @var string Something else
         *
         * @ORM\OneToMany(targetEntity="Bar", mappedBy="foo")
         *
         * @Serializer\Groups({"foo"})
         */
        private $bars;
    
        public function __construct()
        {
            $this->bars = new ArrayCollection();
        }
    
        public function getId()
        {
            return $this->id;
        }
    
        /**
         * @return string
         */
        public function getBars()
        {
            return $this->bars;
        }
    
        /**
         * @param string $bars
         * @return static
         */
        public function setBars($bars)
        {
            $this->bars = $bars;
            return $this;
        }
    }
    
    <?php
    
    namespace AppBundle\Entity;
    
    use ApiPlatform\Core\Annotation\ApiResource;
    use Doctrine\ORM\Mapping as ORM;
    use Symfony\Component\Serializer\Annotation as Serializer;
    use Symfony\Component\Validator\Constraints as Assert;
    
    /**
     * @ApiResource
     * @ORM\Entity
     */
    class Bar
    {
        /**
         * @var int The entity Id
         *
         * @ORM\Id
         * @ORM\GeneratedValue
         * @ORM\Column(type="integer")
         */
        private $id;
    
        /**
         * @var Foo
         *
         * @ORM\ManyToOne(targetEntity="Foo", inversedBy="bars")
         * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
         * @Assert\NotBlank
         */
        private $foo;
    
        /**
         * @var string
         *
         * @ORM\Column(nullable=false)
         * @Assert\NotBlank
         *
         * @Serializer\Groups({"foo"})
         */
        private $prop = '';
    
        public function getId()
        {
            return $this->id;
        }
    
        /**
         * @return Foo|null
         */
        public function getFoo()
        {
            return $this->foo;
        }
    
        /**
         * @param Foo $foo
         * @return static
         */
        public function setFoo(Foo $foo)
        {
            $this->foo = $foo;
            return $this;
        }
    
        /**
         * @return string
         */
        public function getProp()
        {
            return $this->prop;
        }
    
        /**
         * @param string $prop
         * @return static
         */
        public function setProp($prop)
        {
            $this->prop = $prop;
            return $this;
        }
    }
    

    Services defined as:

    services:
      app.entity.filter.foo:
          parent:    'api_platform.doctrine.orm.search_filter'
          arguments:
              - { bars.prop: 'ipartial' }
          tags:
              - { name: 'api_platform.filter', id: 'foo.search_filter' }
    

    Having the following data:

    AppBundle\Entity\Foo:
      foo1:
        id: 1
        bars: ["@bar1", "@bar2"]
      
    AppBundle\Entity\Bar:
      bar1:
        id: 1
        prop: "toto"
        foo: "@foo1"
      bar2:
        id: 2
        prop: "tata"
        foo: "@foo1"
    

    Having set the proper filters in order to run that simple query: http://localhost/foos?bar.prop=toto

    Will result:

    {
      "@context": "/contexts/Foo",
      "@id": "/foos",
      "@type": "hydra:Collection",
      "hydra:member": [
        {
          "@id": "/foos/1",
          "@type": "Foo",
          "bars": [
            {
              "@id": "/bars/1",
              "@type": "Bar",
              "prop": "toto"
            }
          ]
        }
      ],
      "hydra:totalItems": 1,
      "...otherProps...": "...otherValues...."
    }
    

    I understand that the second Bar attached to foo1 gets filtered through the doctrine query, but since we're on the Foo endpoint:

    • is it still a valid behaviour ?
    • if so, how to tell api-platform/doctrine to fetch all relations upon filtering on them ?

    Regards, Yohann

    bug 
    opened by ymarillet 42
  • refactor(elasticsearch): ignore Missing404Exception instead of catching it

    refactor(elasticsearch): ignore Missing404Exception instead of catching it

    | Q | A | ------------- | --- | Branch? | main | Tickets | https://github.com/api-platform/core/pull/5297#discussion_r1060135544 | License | MIT | Doc PR | N/A

    Elasticsearch client’s first implementation for ignoring exceptions came with v0.4 and ended with v2. This was eight years ago so I didn’t add support for it.

    The implementation from v2 lasted until v8. As we are currently conflicting with "elasticsearch/elasticsearch": ">=8.0" I only used this one.

    When this constraint is removed, we’ll have to include Client::setResponseException(false) as well.

    opened by MatTheCat 0
  • Feature Request(BC?): Populate Request->query with uriTemplate/uriVariables values

    Feature Request(BC?): Populate Request->query with uriTemplate/uriVariables values

    Description
    After upgrading to 3.0 i noticed the path variables are no longer available in the Request->query part as I expected.

    Example

            $partnership = $request->query->get('id'); 
            // instead i have to do this: $request->attributes->get('id');
    

    A really minor thing, but it would be one less thing to think about, and personally I think it makes sense that uri variables are available in the query object:)

    If you agree, I would love to help out and create a PR

    opened by Richard87 0
  • Refactor $elasticsearch into a new $persistenceMeans option

    Refactor $elasticsearch into a new $persistenceMeans option

    | Q | A | ------------- | --- | Branch? | main | Tickets | #5279 | License | MIT | Doc PR | not yet

    Deprecations

    • ApiResource::$elasticsearch and Operation::$elasticsearch were deprecated
    • src/Elasticsearch/Metadata/Document/Factory/* and src/Elasticsearch/Metadata/Document/DocumentMetadata are deprecated
    • elasticsearch.mapping config option is deprecated

    Feature

    • PersistenceMeansInterface was created
    • ElasticsearchDocument was created, which implements PersistenceMeansInterface
    • ApiResource::$persistenceMeans and Operation::$persistenceMeans added
    opened by davy-beauzil 1
  • Draft: feat(normalizer): Add itemsPerPage for json-ld (hydra)

    Draft: feat(normalizer): Add itemsPerPage for json-ld (hydra)

    | Q | A | ------------- | --- | Branch? | 3.0 | Tickets | / | License | MIT | Doc PR | /

    Add the hydra:itemsPerPage property to the response of a json ld response.

    opened by SiebeVE 2
  • [Serializer] Group ignored without manual clear cache

    [Serializer] Group ignored without manual clear cache

    API Platform version(s) affected: 2.7.5 with metadata_backward_compatibility_layer: true

    Description
    If I add or remove a group serializer on a property, I must clear the symfony cache manually to the change works. This problem not appear with metadata_backward_compatibility_layer: false. I can't switch the flag for the moment.

    opened by louismariegaborit 3
  • feat(subresource): Link Security

    feat(subresource): Link Security

    | Q | A | ------------- | --- | Branch? | main | Tickets | #4819 | License | MIT | Doc PR | api-platform/docs#1692

    Here's an idea how Link Security (as described in the issue) might work. There's still an open issue with choosing the right provider programmatically and mapping the uri variables automatically but I wanted to ask if that's going in the right direction first before investing more work (and making tests)

    opened by KDederichs 0
Releases(v3.0.8)
  • v3.0.8(Dec 16, 2022)

    What's Changed

    • fix(graphql): dont add graphql operations when disabled by @dannyvw in https://github.com/api-platform/core/pull/5265
    • fix(graphql): link relations requires the property by @develth in https://github.com/api-platform/core/pull/5169
    • fix(normalizer): normalize items in related collection with concrete class by @usu in https://github.com/api-platform/core/pull/5261

    New Contributors

    • @develth made their first contribution in https://github.com/api-platform/core/pull/5169

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.7...v3.0.8

    Source code(tar.gz)
    Source code(zip)
  • v3.0.7(Dec 9, 2022)

    What's Changed

    • feat(symfony): wire Symfony JsonEncoder if it exists by @HeahDude in https://github.com/api-platform/core/pull/5240
    • perf: use symfony default cache pool config in development environment by @acirulis in https://github.com/api-platform/core/pull/5242
    • ci: fix mongod startup by @alanpoulain in https://github.com/api-platform/core/pull/5248
    • fix(metadata): include routePrefix in default operation name (#5203) by @usu in https://github.com/api-platform/core/pull/5252
    • fix: get back return phpdoc on ProviderInterface by @tyx in https://github.com/api-platform/core/pull/5253

    New Contributors

    • @HeahDude made their first contribution in https://github.com/api-platform/core/pull/5240
    • @acirulis made their first contribution in https://github.com/api-platform/core/pull/5242
    • @usu made their first contribution in https://github.com/api-platform/core/pull/5252

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.6...v3.0.7

    Source code(tar.gz)
    Source code(zip)
  • v3.0.6(Nov 28, 2022)

    What's Changed

    • fix(metadata): do not override name fixes #5235 by @soyuka in https://github.com/api-platform/core/pull/5237

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.5...v3.0.6

    Source code(tar.gz)
    Source code(zip)
  • v3.0.5(Nov 25, 2022)

    What's Changed

    • fix(metadata): operations must inherit from resource and defaults by @vincentchalamon in https://github.com/api-platform/core/pull/5194
    • fix(serializer): read groups off the root operation by @soyuka in https://github.com/api-platform/core/pull/5196
    • chore(github): update GitHub Actions by @vincentchalamon in https://github.com/api-platform/core/pull/5195
    • fix(serializer): dynamic groups should not be cached by @soyuka in https://github.com/api-platform/core/pull/5207
    • fix(metadata): route prefix in the operation name by @soyuka in https://github.com/api-platform/core/pull/5208
    • fix(metadata): getOperation cache matches arguments by @soyuka in https://github.com/api-platform/core/pull/5215
    • fix(metadata): keep configured uri variables by @soyuka in https://github.com/api-platform/core/pull/5217
    • fix: fix a missing service definition in test environment by @johnkrovitch in https://github.com/api-platform/core/pull/5206

    New Contributors

    • @gassan made their first contribution in https://github.com/api-platform/core/pull/5201
    • @johnkrovitch made their first contribution in https://github.com/api-platform/core/pull/5206

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.4...v3.0.5

    Source code(tar.gz)
    Source code(zip)
  • v2.7.5(Nov 25, 2022)

    What's Changed

    • fix(metadata): operations must inherit from resource and defaults by @vincentchalamon in https://github.com/api-platform/core/pull/5194
    • fix(serializer): read groups off the root operation by @soyuka in https://github.com/api-platform/core/pull/5196
    • Don't try to generate iri, if it is already defined in $context by @gassan in https://github.com/api-platform/core/pull/5201
    • fix(serializer): avoid call to legacy iri converter with non-resource… by @soyuka in https://github.com/api-platform/core/pull/5219
    • fix(metadata): keep configured uri variables by @soyuka in https://github.com/api-platform/core/pull/5217
    • fix: fix a missing service definition in test environment by @johnkrovitch in https://github.com/api-platform/core/pull/5206

    New Contributors

    • @gassan made their first contribution in https://github.com/api-platform/core/pull/5201
    • @johnkrovitch made their first contribution in https://github.com/api-platform/core/pull/5206

    Full Changelog: https://github.com/api-platform/core/compare/v2.7.4...v2.7.5

    Source code(tar.gz)
    Source code(zip)
  • v3.0.4(Nov 15, 2022)

    What's Changed

    • fix(graphql): add filters from the nested resource metadata by @alanpoulain in https://github.com/api-platform/core/pull/5171
    • chore: cs fixes by @soyuka in https://github.com/api-platform/core/pull/5173
    • fix(metadata): check if elasticsearch is set to false by user through ApiResource (#5115) by @jannes-io in https://github.com/api-platform/core/pull/5177
    • fix(graphql): use default nested query operations by @alanpoulain in https://github.com/api-platform/core/pull/5174
    • feat(metadata): use a custom Attribute extends ApiResource (#5076) by @yobrx in https://github.com/api-platform/core/pull/5175
    • fix(serializer): empty object as array with supports cache by @soyuka in https://github.com/api-platform/core/pull/5100
    • feat: use openapi array to validate filter parameters by @norival in https://github.com/api-platform/core/pull/5114
    • fix(metadata): Allow input/output configuration values to be bool in yaml config by @pl-github in https://github.com/api-platform/core/pull/5186
    • fix: securityPostDenormalize not working because clone is made after denormalization by @LoicBoursin in https://github.com/api-platform/core/pull/5182
    • fix(metadata): item uri template with another resource by @soyuka in https://github.com/api-platform/core/pull/5176
    • fix(metadata): _format broken bc promise on #5080 by @soyuka in https://github.com/api-platform/core/pull/5187
    • fix: use legacy iri converter for legacy resources by @soyuka in https://github.com/api-platform/core/pull/5172

    New Contributors

    • @jannes-io made their first contribution in https://github.com/api-platform/core/pull/5177
    • @yobrx made their first contribution in https://github.com/api-platform/core/pull/5175
    • @pl-github made their first contribution in https://github.com/api-platform/core/pull/5186

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.3...v3.0.4

    Source code(tar.gz)
    Source code(zip)
  • v2.7.4(Nov 15, 2022)

    What's Changed

    • fix(metadata): Allow input/output configuration values to be bool in yaml config by @pl-github in https://github.com/api-platform/core/pull/5186
    • fix: use legacy iri converter for legacy resources by @soyuka in https://github.com/api-platform/core/pull/5172

    New Contributors

    • @pl-github made their first contribution in https://github.com/api-platform/core/pull/5186

    Full Changelog: https://github.com/api-platform/core/compare/v2.7.3...v2.7.4

    Source code(tar.gz)
    Source code(zip)
  • v3.0.3(Nov 4, 2022)

    What's Changed

    • fix: upate yaml extractor test file coding standard by @MarvinCourcier in https://github.com/api-platform/core/pull/5068
    • [GraphQL] Add a clearer error message when TwigBundle is disable but graphql clients aren't by @ArnoudThibaut in https://github.com/api-platform/core/pull/5064
    • fix(metadata): add class key in payload argument resolver by @MarvinCourcier in https://github.com/api-platform/core/pull/5067
    • fix: remove ApiSubresource attribute with upgrade command by @davy-beauzil in https://github.com/api-platform/core/pull/5049
    • [Doctrine] SearchFilter - Use abitrary index instead of value by @Korbeil in https://github.com/api-platform/core/pull/5079
    • fix: uri template should respect rfc 6570 by @soyuka in https://github.com/api-platform/core/pull/5080
    • fix: remove @internal annotation for Operations by @norival in https://github.com/api-platform/core/pull/5089
    • fix(metadata): define a name on a single operation by @soyuka in https://github.com/api-platform/core/pull/5090
    • fix(metadata): deprecate when user decorates in legacy mode by @soyuka in https://github.com/api-platform/core/pull/5091
    • fix(graphql): always allow to query nested resources by @soyuka in https://github.com/api-platform/core/pull/5112

    New Contributors

    • @MarvinCourcier made their first contribution in https://github.com/api-platform/core/pull/5068
    • @norival made their first contribution in https://github.com/api-platform/core/pull/5089

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.2...v3.0.3

    Source code(tar.gz)
    Source code(zip)
  • v2.7.3(Nov 4, 2022)

    What's Changed

    • fix: upate yaml extractor test file coding standard by @MarvinCourcier in https://github.com/api-platform/core/pull/5068
    • fix(metadata): add class key in payload argument resolver by @MarvinCourcier in https://github.com/api-platform/core/pull/5067
    • fix: remove ApiSubresource attribute with upgrade command by @davy-beauzil in https://github.com/api-platform/core/pull/5049
    • fix: remove @internal annotation for Operations by @norival in https://github.com/api-platform/core/pull/5089
    • fix(metadata): define a name on a single operation by @soyuka in https://github.com/api-platform/core/pull/5090
    • fix(metadata): deprecate when user decorates in legacy mode by @soyuka in https://github.com/api-platform/core/pull/5091

    New Contributors

    • @MarvinCourcier made their first contribution in https://github.com/api-platform/core/pull/5068
    • @norival made their first contribution in https://github.com/api-platform/core/pull/5089

    Full Changelog: https://github.com/api-platform/core/compare/v2.7.2...v2.7.3

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Sep 15, 2022)

    • Identifiers: Allow plain identifiers is removed, use a custom normalizer if needed (#4811)
    • Symfony: deprecated configuration was removed (#4811)
    • DataTransformers: concept got removed, input and output classes are handled as anonymous resources (#4805)
    • Doctrine: some interfaces have changed (extensions and filters), string $operationName got removed in favor of ApiPlatform\Metadata\Operation $operation. (#4779)
    • Doctrine: ContextAware interfaces were merged with their child interfaces you can safely remove them (#4779)
    • Metadata: the Core namespace got removed (#4805)
    • Mercure: deprecation removed (#4805)
    • ExpressionLanguage: deprecated class ApiPlatform\Symfony\Security\ExpressionLanguage has been removed in favor of Symfony\Component\Security\Core\Authorization\ExpressionLanguage.
    • JsonLd: correct the api_jsonld_context route format (#4844)
    • Metadata: remove metadata_backward_compatibility_layer option (#4843)
    • OpenApi: fixed required fields (in and name) within ApiPlatform\OpenApi\Model\Parameter BC
    • Metadata: CRUD on subresource with experimental write support (#4932)
    • Symfony: 6.1 compatibility and remove 4.4 and 5.4 support (#4851)
    • Symfony: removed the $exceptionOnNoToken parameter in ResourceAccessChecker::__construct() (#4905)
    • Symfony: use conventional service names for Doctrine state providers and processors (#4859)
    • Symfony: adjust mapping paths to the SF best practices for Bundles BC Resources/config/api_resources to config/api_resources (#4853)
    • Symfony: src/ApiResource/ is the recommended place for API models (#4874)
    • Cache: remove guzzle from the Varnish purger (#4872)
    • JsonLd: correct the api_jsonld_context route format (#4844)

    See also the changelog of API Platform 2.7 which contains the non-breaking changes

    Source code(tar.gz)
    Source code(zip)
  • v2.7.0(Sep 15, 2022)

    Changelog

    • Swagger UI: Add usePkceWithAuthorizationCodeGrant to Swagger UI initOAuth (#4649)
    • BC: mapping.paths in configuration should override bundles configuration (#4465)
    • GraphQL: Add the ability to use different pagination types for the queries of a resource (#4453)
    • Security: BC Fix ApiProperty security attribute expression being passed a class string for the object variable on updates/creates - null is now passed instead if the object is not available (#4184)
    • Security: ApiProperty now supports a security_post_denormalize attribute, which provides access to the object variable for the object being updated/created and previous_object for the object before it was updated (#4184)
    • Maker: Add make:data-provider and make :data-persister commands to generate a data provider / persister (#3850)
    • JSON Schema: Add support for generating property schema with numeric constraint restrictions (#4225)
    • JSON Schema: Add support for generating property schema with Collection restriction (#4182)
    • JSON Schema: Add support for generating property schema format for Url and Hostname (#4185)
    • JSON Schema: Add support for generating property schema with Count restriction (#4186)
    • JSON Schema: Manage Compound constraint when generating property metadata (#4180)
    • Validator: Add an option to disable query parameter validation (#4165)
    • JSON Schema: Add support for generating property schema with Choice restriction (#4162)
    • JSON Schema: Add support for generating property schema with Range restriction (#4158)
    • JSON Schema: Add support for generating property schema with Unique restriction (#4159)
    • BC: Change api_platform.listener.request.add_format priority from 7 to 28 to execute it before firewall (priority 8) (#3599)
    • BC: Use @final annotation in ORM filters (#4109)
    • Allow defining exception_to_status per operation (#3519)
    • Doctrine: Better exception to find which resource is linked to an exception (#3965)
    • Doctrine: Allow mixed type value for date filter (notice if invalid) (#3870)
    • Doctrine: Add nulls_always_first and nulls_always_last to nulls_comparison in order filter (#4103)
    • Doctrine: Add a global order_nulls_comparison configuration (#3117)
    • MongoDB: date_immutable support (#3940)
    • DataProvider: Add TraversablePaginator (#3783)
    • JSON:API: Support inclusion of resources from path (#3288)
    • Swagger UI: Add swagger_ui_extra_configuration to Swagger / OpenAPI configuration (#3731)
    • Allow controller argument with a name different from $data thanks to an argument resolver (#3263)
    • GraphQL: Support ApiProperty security (#4143)
    • GraphQL: BC Fix security on association collection properties. The collection resource item_query security is no longer used. ApiProperty security can now be used to secure collection (or any other) properties. (#4143)
    • Deprecate allow_plain_identifiers option (#4167)
    • Exception: Add the ability to customize multiple status codes based on the validation exception (#4017)
    • ApiLoader: Support _format resolving (#4292)
    • Metadata: new namespace ApiPlatform\Metadata instead of ApiPlatform\Core\Metadata, for example ApiPlatform\Metadata\ApiResource (#4351)
    • Metadata: deprecation of ApiPlatform\Core\Annotation (#4351)
    • Metadata: ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface is deprecated in favor of ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface (#4351)
    • Metadata: item and collection prefixes for operations are deprecated, as well as the ApiPlatform\Core\Api\OperationType class (#4351)
    • Graphql: ApiPlatform\Metadata\GraphQl follow the same metadata conventions (a Subscription operation is available and isn't hidden behind an update Mutation anymore), interfaces got simplified (being @experimental) (#4351)
    • IriConverter: new interface for ApiPlatform\Bridge\Symfony\Routing\IriConverter that adds an operationName, same for ApiPlatform\Api\IdentifiersExtractor (#4351)
    • DataProvider: new ApiPlatform\State\ProviderInterface that replaces DataProviders (#4351)
    • DataPersister: new ApiPlatform\State\ProcessorInterface that replaces DataPersisters (#4351)
    • A new configuration is available to keep old services (IriConverter, IdentifiersExtractor and OpenApiFactory) metadata_backward_compatibility_layer (defaults to false) (#4351)
    • Add support for security_post_validation attribute
    • Mark the GraphQL subsystem as stable (#4500)
    • feat(test): add Client::loginUser() (#4588)
    • feat(http_cache): use symfony/http-client instead of guzzlehttp/guzzle, ApiPlatform\Core\HttpCache\PurgerInterface is deprecated in favor of ApiPlatform\HttpCache\PurgerInterface, new purger that uses PURGE (#4695)
    • Implements Skolem IRIs instead of blank nodes, can be disabled using iri: false (#4731)
    • IRI Converter: new interface declaring getIriFromResource and getResourceFromIri (#4734)
    • Backward compatibility: fix dependency injection (#4744)
    • Metadata: allow extra keys within defaults (#4743)
    • Backward compatibility: fix upgrade script for subresources (#4747)
    • Backward compatibility: fix dependency injection (#4748)
    • GraphQl: output creates its own type in TypeBuilder (#4766)
    • Metadata: clear missing metadata cache pools (#4770)
    • Metadata: property override when value is set (#4767)
    • Metadata: add read and write to extractor (#4760)
    • JsonSchema: factory backward compatibility layer (#4758)
    • Metadata: defaults properly overrides metadata (#4759)
    • Metadata: Add missing processor and provider to extractor (#4754)
    • Metadata: defaults deprecation (#4772)
    • Json-Ld: property metadata types and iris (#4769)
    • Symfony: write listener uri variables converter (#4774)
    • Metadata: extra properties operation inheritance (#4773)
    • Processor: adds previous_data to the context (#4776)
    • JsonApi: Use skolem IRIs (#4796)
    • Metadata: Merge defaults instead of overriding (#4796)
    • ApiTestCase: Fix JSON Schema assertions (#4796)
    • Input/Output: backport serializer changes to make input/output work as resource classes without data transformers (#4804)
    • GraphQl: the SerializerContextBuilder interface changes to reflect operation instead of the operation name BC (#4804)
    • Metadata: reduce coalescing operator call (#4810)
    • Serializer: ignore no-operation on SerializeListener (#4828)
    • Schema: schema generation with default operation (#4818)
    • Symfony: deprecate the $exceptionOnNoToken parameter in ResourceAccessChecker::__construct() (#4900)
    • chore: remove @experimental phpdoc (#4933)
    • Metadata: do not set id when identifier is false (#4880)
    • Metadata: automatic GET operation when none is declared (#4881)
    • Metadata: exception to status on operations (#4861)
    • Serializer: adds the JSON_INVALID_UTF8_IGNORE flag to JsonEncode (#4741)
    • Symfony: autoconfigure legacy Doctrine extensions (#4909)
    • Elasticsearch: skip metadata without ES nodes (#4913)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc.2(Jul 25, 2022)

    What's Changed

    • Remove core namespace leftovers by @dannyvw in https://github.com/api-platform/core/pull/4827
    • Remove metadata_backward_compatibility_layer option by @vincentchalamon in https://github.com/api-platform/core/pull/4843
    • Fix some todo by @vincentchalamon in https://github.com/api-platform/core/pull/4847

    Full Changelog: https://github.com/api-platform/core/compare/v3.0.0-rc.1...v3.0.0-rc.2

    Source code(tar.gz)
    Source code(zip)
  • v2.7.0-rc.2(Jul 25, 2022)

    What's Changed

    • Fix api_jsonld_context route declaration by @vincentchalamon in https://github.com/api-platform/core/pull/4844
    • Migrate ApiFilter to new format by @nawel-les-tilleuls in https://github.com/api-platform/core/pull/4845
    • Add Maker command for state processor and provider by @nikophil in https://github.com/api-platform/core/pull/4423
    • Migrate ApiProperty to new format by @vincentchalamon in https://github.com/api-platform/core/pull/4842

    New Contributors

    • @nawel-les-tilleuls made their first contribution in https://github.com/api-platform/core/pull/4845
    • @nikophil made their first contribution in https://github.com/api-platform/core/pull/4423

    Full Changelog: https://github.com/api-platform/core/compare/v2.7.0-rc.1...v2.7.0-rc.2

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc.1(Jul 20, 2022)

  • v2.7.0-rc.1(Jul 20, 2022)

  • v2.6.8(Jan 11, 2022)

    • fix: serializing embedded non resource objects
    • chore(openapi): upgrade Swagger UI to version 4.1.3
    • chore(openapi): upgrade ReDoc to version 2.0.0-rc.59
    • chore(graphql): upgrade GraphiQL to version 1.5.16
    Source code(tar.gz)
    Source code(zip)
  • v2.6.7(Dec 24, 2021)

    • feat: compatibility with Symfony 6 (#4503, #4582, #4604, #4564)
    • feat: compatibility with PHP 8.1 (#4503, #4582, #4604)
    • fix: pass the child context when normalizing nested non-resource objects (#4521)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.6(Sep 30, 2021)

    • fix(json-schema): consider SplFileInfo class as a binary type (#4332)
    • fix(json-schema): use collectionKeyType for building JSON Schema (#4385)
    • fix(openapi): failing recursion on api resources with "paths" key (#4325)
    • fix(graphql): make sure form content type is recognized as a multipart request (#4461)
    • fix(doctrine): handle inverse side of OneToOne association in Doctrine search filter (#4366)
    • fix(doctrine): usage of deprecated DBAL type constants (#4399)
    • fix(test): fix REMOTE_ADDR support in ApiTestCase (#4446)
    • fix(docs): use asset_package for all assets (#4470)
    • fix(docs): upgrade Swagger UI to version 3.52.3 (#4477)
    • fix(docs): upgrade ReDoc to version 2.0.0-rc.56 (#4477)
    • fix(docs): upgrade Swagger UI to version 2.0.0-rc.56 (#4477)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.5(Jun 15, 2021)

    • Fix usage of various deprecated methods
    • JsonSchema: Update Hydra @context property possible types (#4223)
    • JsonSchema: Add hydra:previousto thehydra:view` schema properties (#4310)
    • Filter validation: Fix issue in Required filter validator with dot notation (#4221)
    • OpenAPI: Fix notice/warning for response without content in the openapi_context (#4210)
    • OpenAPI: Do not use output for request body (#4213)
    • OpenAPI: Do not use JSON-lD schema for all media types (#4247) (BC note: SchemaFactory::buildSchema() is now immutable as it no longer modifies the passed $schema)
    • OpenAPI: Allow setting extensionProperties with YAML schema definition (#4228)
    • OpenAPI: do not throw error with non-standard HTTP verb (#4304)
    • Serializer: Convert internal error to HTTP 400 in Ramsey uuid denormalization from invalid body string (#4200)
    • GraphQL: Fix FieldsBuilder not fully unwrapping nested types before deciding if a resolver is needed (#4251)
    • GraphQL: Do not use a resolver for the nested payload of a mutation or subscription (#4289)
    • GraphQL: Allow search filter to use an int for its value (#4295)
    • Varnish: Improve BAN regex performance (#4231)
    • MongoDB: Fix denormalization of properties with embeds many that omit target document directive (#4315)
    • MongoDB: Fix resolving proxy class in class metadata factory (#4322)
    • Test: Add withOptions() to our HttpClient implementation (#4282)
    • Metadata: Fix allow using constants in XML configuration (resource attribute) (#4321)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.4(Apr 12, 2021)

    • OpenAPI: Using an implicit flow is now valid, changes oauth configuration default values (#4115)
    • OpenAPI: Fix response support via the openapi_context (#4116)
    • OpenAPI: Fix Link->requestBody default value (#4116)
    • OpenAPI: Make sure we do not override defined parameters (#4138)
    • Swagger UI: Remove Google fonts (#4112)
    • Serializer: Fix denormalization of basic property-types in XML and CSV (#4145)
    • Serializer: Fix denormalization of collection with one element in XML (#4154)
    • JSON Schema: Manage Sequentially and AtLeastOneOf constraints when generating property metadata (#4139 and #4147)
    • JSON Schema: properties regex pattern is now correctly anchored (#4176)
    • JSON Schema: Fix PropertySchemaLengthRestriction string-only (#4177)
    • Doctrine: Fix purging HTTP cache for unreadable relations (#3441)
    • Doctrine: Revert #3774 support for binary UUID in search filter (#4134)
    • Doctrine: Fix order filter when using embedded and nulls comparison (#4151)
    • Doctrine: Fix duplicated eager loading joins (#3525)
    • Doctrine: Fix joinRelations with multiple associations. (#2791)
    • Doctrine: Revert using defaults.order as collection.order (#4178)
    • GraphQL: Partial pagination support (#3223)
    • GraphQL: Manage pagination_use_output_walkers and pagination_fetch_join_collection for operations (#3311)
    • GraphQL: Make sure the order of order filters is preserved if nested resources are used (#4171)
    • Metadata: Sort mapping resources (#3256)
    • UUID: manage Ulid in format property schema restriction (#4148)
    • Symfony: Do not override Vary headers already set in the Response
    • Symfony: Make Twig dependency lazy (#4187)
    • Compatibility with psr/cache version 2 and 3 (#4117)
    • Docs: Upgrade Swagger UI to version 3.46.0
    • Docs: Upgrade ReDoc to version 2.0.0-rc.51
    • Docs: Upgrade GraphiQL to version 1.4.1
    Source code(tar.gz)
    Source code(zip)
  • v2.6.3(Mar 7, 2021)

    • Identifiers: Re-allow POST operations even if no identifier is defined (#4052)
    • Hydra: Fix partial pagination which no longer returns the hydra:next property (#4015)
    • Security: Use a NullToken when using the new authenticator manager in the resource access checker (#4067)
    • Mercure: Do not use data in options when deleting (#4056)
    • Doctrine: Support for foreign identifiers (#4042)
    • Doctrine: Support for binary UUID in search filter (#3774)
    • Doctrine: Do not add join or lookup for search filter with empty value (#3703)
    • Doctrine: Reduce code duplication in search filter (#3541)
    • JSON Schema: Allow generating documentation when property and method start from "is" (property isActive and method isActive) (#4064)
    • OpenAPI: Fix missing 422 responses in the documentation (#4086)
    • OpenAPI: Fix error when schema is empty (#4051)
    • OpenAPI: Do not set scheme to oauth2 when generating securitySchemes (#4073)
    • OpenAPI: Fix missing $ref when no type is used in context (#4076)
    • GraphQL: Fix "Resource class cannot be determined." error when a null iterable field is returned (#4092)
    • Metadata: Check the output class when calculating serializer groups (#3696)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.2(Feb 7, 2021)

    • Validation: properties regex pattern is now compliant with ECMA 262 (#4027)
    • OpenApi: normalizer is now backward compatible (#4016), fix the name converter issue changing OpenApi properties (#4019)
    • Identifiers: Break after transforming the identifier (#3985), use the identifiers context to transform with multiple classes (#4029)
    • JsonSchema: Revert ALLOW_EXTRA_ATTRIBUTE=false as it is a BC break and will be done in 3.0 instead see #3881 (#4007)
    • Subresource: fix ApiSubresource maxDepth option (#3986), recursive issue in the profiler (#4023)
    • OpenApi: Allow requestBody and parameters via the openapi_context (#4001), make openapi_context work on subresources (#4004), sort paths (#4013)
    • Config: Allow disabling OpenAPI and Swagger UI without loosing the schema (#3968 and #4018), fix pagination defaults (#4011)
    • DataPersister: context propagation fix (#3983)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.1(Jan 24, 2021)

  • v2.6.0(Jan 22, 2021)

    • Cache: adds a max_header_length configuration (#2865)
    • Cache: support stale-while-revalidate and stale-if-error cache control headers (#3439)
    • Config: Add an option to set global default values (#3151)
    • DTO: Add ApiPlatform\Core\DataTransformer\DataTransformerInitializerInterface to pre-hydrate inputs (#3701)
    • DTO: Improve Input/Output support (#3231)
    • Data Persisters: Add previous_data to the context passed to persisters when available (#3752)
    • Data Persister: Add a ResumableDataPersisterInterface that allows to call multiple persisters (#3912)
    • Debug: Display API Platform's version in the debug bar (#3235)
    • Docs: Make asset_package configurable (#3764)
    • Doctrine: Allow searching on multiple values on every strategies (#3786)
    • Elasticsearch: The Paginator class constructor now receives the denormalization context to support denormalizing documents using serialization groups. This change may cause potential BC breaks for existing applications as denormalization was previously done without serialization groups.
    • GraphQL: BC New syntax for the filters' arguments to preserve the order: order: [{foo: 'asc'}, {bar: 'desc'}] (#3468)
    • GraphQL: BC operation is now operationName to follow the standard (#3568)
    • GraphQL: BC paginationType is now pagination_type (#3614)
    • GraphQL: Add page-based pagination (#3175, #3517)
    • GraphQL: Allow formatting GraphQL errors based on exceptions (#3063)
    • GraphQL: Errors thrown from the GraphQL library can now be handled (#3632, #3643)
    • GraphQL: Possibility to add a custom description for queries, mutations and subscriptions (#3477, #3514)
    • GraphQL: Subscription support with Mercure (#3321)
    • GraphQL: Support for field name conversion (serialized name) (#3455, #3516)
    • Hydra: Sort entries in the API entrypoint (#3091)
    • Identifiers: Add Symfony Uid support (#3715)
    • IriConverter: BC Fix double encoding in IRIs - may cause breaking change as some characters no longer encoded in output (#3552)
    • JSON-LD: Add an iri_only attribute to simplify documents structure (useful when using Vulcain) (#3275)
    • Exception: Response error codes can be specified via the ApiPlatform\Core\Exception\ErrorCodeSerializableInterface (#2922)
    • Mercure: Add a normalization_context option in mercure attribute (#3772)
    • Messenger: Add a context stamp containing contextual data (#3157)
    • Metadata: Deprecate InheritedPropertyMetadataFactory (#3273)
    • Metadata: Improve and simplify identifiers management (#3825)
    • Metadata: Support the Symfony Serializer's @Ignore annotation (#3820)
    • Metadata: Support using annotations as PHP 8 attributes (#3869, #3868, #3851)
    • Metadata: Throw an error when no identifier is defined (#3871)
    • Metadata: Use id as default identifier if none provided (#3874)
    • MongoDB: Mercure support (#3290)
    • MongoDB: Possibility to add execute options (aggregate command fields) for a resource, like allowDiskUse (#3144)
    • OpenAPI: Add default values of PHP properties to the documentation (#2386)
    • OpenAPI: BC Replace all characters other than [a-zA-Z0-9\.\-_] to . in definition names to be compliant with OpenAPI 3.0 (#3669)
    • OpenAPI: Refactor OpenAPI v3 support, OpenAPI v2 (aka Swagger) is deprecated (#3407)
    • Order: Support default order for a specific custom operation (#3784)
    • PATCH: Support patching deep objects (#3847)
    • Router: UrlGenerator strategy configuration via url_generation_strategy (#3198)
    • Routing: Add stateless ApiResource attribute (#3436)
    • Security: Add support for access control rule on attributes (#3503)
    • Subresources: resourceClass can now be defined as a container parameter in XML and YAML definitions
    • Symfony: improved 5.x support with fewer deprecations (#3589)
    • Symfony: Allow using ItemNormalizer without Symfony SecurityBundle (#3801)
    • Symfony: Lazy load all commands (#3798)
    • Tests: adds a method to retrieve the CookieJar in the test Client getCookieJar
    • Tests: Fix the registration of the test.api_platform.client service when the FrameworkBundle bundle is registered after the ApiPlatformBundle bundle (#3928)
    • Validator: Add the violation code to the violation properties (#3857)
    • Validator: Allow customizing the validation error status code (#3808)
    • Validator: Autoconfiguration of validation groups generator via ApiPlatform\Core\Validator\ValidationGroupsGeneratorInterface
    • Validator: Deprecate using a validation groups generator service not implementing ApiPlatform\Core\Bridge\Symfony\Validator\ValidationGroupsGeneratorInterface (#3346)
    • Validator: Property validation through OpenAPI (#33329)
    • Validator: Query filters and parameters are validated (#1723)
    • ExceptionInterface now extends \Throwable (#3217)
    Source code(tar.gz)
    Source code(zip)
  • v2.5.10(Jan 22, 2021)

  • v2.6.0-beta.1(Dec 17, 2020)

  • v2.5.9(Dec 17, 2020)

    • Fix a warning when preloading the AbstractPaginator class (#3827)
    • OpenAPI: prevent additionalProp1 from showing in example values (#3888)
    • Varnish: fix a bug when passing an empty list of tags to the purger (#3827)
    • JSON Schema: mark hydra:mapping properties as nullable (#3877)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.0-alpha.1(Dec 2, 2020)

    Read the announcement!

    • Cache: adds a max_header_length configuration (#2865)
    • Cache: support stale-while-revalidate and stale-if-error cache control headers (#3439)
    • Config: Add an option to set global default values (#3151)
    • DTO: Add ApiPlatform\Core\DataTransformer\DataTransformerInitializerInterface to pre-hydrate inputs (#3701)
    • DTO: Improve Input/Output support (#3231)
    • Data Persisters: Add previous_data to the context passed to persisters when available (#3752)
    • Debug: Display API Platform's version in the debug bar (#3235)
    • Docs: Make asset_package configurable (#3764)
    • Doctrine: Allow searching on multiple values on every strategies (#3786)
    • Elasticsearch: The Paginator class constructor now receives the denormalization context to support denormalizing documents using serialization groups. This change may cause potential BC breaks for existing applications as denormalization was previously done without serialization groups.
    • GraphQL: BC New syntax for the filters' arguments to preserve the order: order: [{foo: 'asc'}, {bar: 'desc'}] (#3468)
    • GraphQL: BC operation is now operationName to follow the standard (#3568)
    • GraphQL: BC paginationType is now pagination_type (#3614)
    • GraphQL: Add page-based pagination (#3175, #3517)
    • GraphQL: Allow formatting GraphQL errors based on exceptions (#3063)
    • GraphQL: Errors thrown from the GraphQL library can now be handled (#3632, #3643)
    • GraphQL: Possibility to add a custom description for queries, mutations and subscriptions (#3477, #3514)
    • GraphQL: Subscription support with Mercure (#3321)
    • GraphQL: Support for field name conversion (serialized name) (#3455, #3516)
    • Hydra: Sort entries in the API entrypoint (#3091)
    • Identifiers: Add Symfony Uid support (#3715)
    • IriConverter: BC Fix double encoding in IRIs - may cause breaking change as some characters no longer encoded in output (#3552)
    • JSON-LD: Add an iri_only attribute to simplify documents structure (useful when using Vulcain) (#3275)
    • Exception: Response error codes can be specified via the ApiPlatform\Core\Exception\ErrorCodeSerializableInterface (#2922)
    • Mercure: Add a normalization_context option in mercure attribute (#3772)
    • Messenger: Add a context stamp containing contextual data (#3157)
    • Messenger: Add a new messenger=persist to option to call the standard data persister before publishing the message (#3617)
    • Metadata: Deprecate InheritedPropertyMetadataFactory (#3273)
    • Metadata: Improve and simplify identifiers management (#3825)
    • Metadata: Support the Symfony Serializer's @Ignore annotation (#3820)
    • Metadata: Support using annotations as PHP 8 attributes (#3869, #3868, #3851)
    • Metadata: Throw an error when no identifier is defined (#3871)
    • Metadata: Use id as default identifier if none provided (#3874)
    • MongoDB: Mercure support (#3290)
    • MongoDB: Possibility to add execute options (aggregate command fields) for a resource, like allowDiskUse (#3144)
    • OpenAPI: Add default values of PHP properties to the documentation (#2386)
    • OpenAPI: BC Replace all characters other than [a-zA-Z0-9\.\-_] to . in definition names to be compliant with OpenAPI 3.0 (#3669)
    • OpenAPI: Refactor OpenAPI v3 support, OpenAPI v2 (aka Swagger) is deprecated (#3407)
    • Order: Support default order for a specific custom operation (#3784)
    • PATCH: Support patching deep objects (#3847)
    • Router: UrlGenerator strategy configuration via url_generation_strategy (#3198)
    • Routing: Add stateless ApiResource attribute (#3436)
    • Security: Add support for access control rule on attributes (#3503)
    • Subresources: resourceClass can now be defined as a container parameter in XML and YAML definitions
    • Symfony: improved 5.x support with fewer deprecations (#3589)
    • Symfony: Allow using ItemNormalizer without Symfony SecurityBundle (#3801)
    • Symfony: Lazy load all commands (#3798)
    • Tests: adds a method to retrieve the CookieJar in the test Client getCookieJar
    • Validator: Add the violation code to the violation properties (#3857)
    • Validator: Allow customizing the validation error status code (#3808)
    • Validator: Autoconfiguration of validation groups generator via ApiPlatform\Core\Validator\ValidationGroupsGeneratorInterface
    • Validator: Deprecate using a validation groups generator service not implementing ApiPlatform\Core\Bridge\Symfony\Validator\ValidationGroupsGeneratorInterface (#3346)
    • Validator: Property validation through OpenAPI (#33329)
    • Validator:Query filters and parameters are validated (#1723)
    • ExceptionInterface now extends \Throwable (#3217)
    Source code(tar.gz)
    Source code(zip)
  • v2.5.8(Dec 2, 2020)

    • PHP 8 support (#3791, #3745, #3855)
    • Metadata: Fix merging null values from annotations (#3711)
    • JSON-LD: Add missing @type from collection using output DTOs (#3699)
    • Cache: Improve PurgeHttpCacheListener performances (#3743)
    • Cache: Fix VarnishPurger max header length (#3843)
    • Identifiers: Do not denormalize the same identifier twice (#3762)
    • OpenAPI: Lazy load SwaggerCommand (#3802)
    • OpenAPI: Use Output class name instead of the Resource short name when available (#3741)
    • Router: Replace baseurl only once (#3776)
    • Mercure: Publisher bug fixes (#3790, #3739)
    • Serializer: Catch NotNormalizableValueException to UnexpectedValueEception with inputs (#3697)
    • Doctrine: ODM escape search terms in RegexFilter
    • Tests: Improve JSON Schema assertions (#3807, #3803, #3804, #3806, #3817, #3829, #3830)
    • Tests: Allow passing extra options in ApiTestClient (#3486)
    • Docs: Upgrade Swagger UI to version 3.37.2 (#3867)
    • Docs: Upgrade ReDoc to version 2.0.0-rc.45 (#3867)
    • Docs: Upgrade GraphiQL to version 15.3.0 (#3867)
    • Docs: Upgrade GraphQL Playground to version 1.7.26 (#3867)

    For compatibility reasons with Symfony 5.2 and PHP 8, we do not test anymore the integration with these legacy packages:

    • FOSUserBundle
    • NelmioApiDoc 2
    Source code(tar.gz)
    Source code(zip)
  • v2.5.7(Aug 28, 2020)

    • Compatibility with Symfony 5.1 (#3589 and #3688)
    • Resource Cache-Control HTTP header can be private (#3543)
    • Doctrine: Fix missing ManagerRegistry class (#3684)
    • Doctrine: Order filter doesn't throw anymore with numeric key (#3673 and #3687)
    • Doctrine: Fix ODM check change tracking deferred (#3629)
    • Doctrine: Allow 2inflector version 2.0 (#3607)
    • OpenAPI: Allow subresources context to be added (#3685)
    • OpenAPI: Fix pagination documentation on subresources (#3678)
    • Subresource: Fix query when using a custom identifier (#3529 and #3671)
    • GraphQL: Fix relation types without Doctrine (#3591)
    • GraphQL: Fix DTO relations (#3594)
    • GraphQL: Compatibility with graphql-php version 14 (#3621 and #3654)
    • Docs: Upgrade Swagger UI to version 3.32.5 (#3693)
    • Docs: Upgrade ReDoc to version 2.0.0-rc.40 (#3693)
    • Docs: Upgrade GraphiQL to version 1.0.3 (#3693)
    • Docs: Upgrade GraphQL Playground to version 1.7.23 (#3693)
    Source code(tar.gz)
    Source code(zip)
Owner
API Platform
Build modern, hypermedia APIs with ease, generate React applications from the API documentation.
API Platform
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Leonardo Losoviz 265 Jan 7, 2023
Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server.

Field Query Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server. Install Via Composer com

PoP 4 Jan 7, 2022
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.

API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility and flexibility: Desig

API Platform 7.7k Jan 7, 2023
Proposed REST and GraphQL APIs for Concrete CMS 9.2+

Concrete CMS API Proposal 2022 Hello there! This is a package for Concrete CMS (9.1.1+) that adds a proposed REST API. This API is reasonably comprehe

Concrete CMS 5 Aug 11, 2022
GraphQL API to Studio Ghibli REST API

GhibliQL GhibliQL is a GraphQL wrapper to the Studio Ghibli REST API Usage First, you'll need a GraphQL client to query GhibliQL, like GraphQL IDE Con

Sebastien Bizet 8 Nov 5, 2022
This bundle provides tools to build a complete GraphQL server in your Symfony App.

OverblogGraphQLBundle This Symfony bundle provides integration of GraphQL using webonyx/graphql-php and GraphQL Relay. It also supports: batching with

Webedia - Overblog 720 Dec 25, 2022
Pure PHP implementation of GraphQL Server – Symfony Bundle

Symfony GraphQl Bundle This is a bundle based on the pure PHP GraphQL Server implementation This bundle provides you with: Full compatibility with the

null 283 Dec 15, 2022
EXPERIMENTAL plugin extending WPGraphQL to support querying (Gutenberg) Blocks as data, using Server Side Block registries to map Blocks to the GraphQL Schema.

WPGraphQL Block Editor This is an experimental plugin to work toward compatiblity between the WordPress Gutenberg Block Editor and WPGraphQL, based on

WPGraphQL 29 Nov 18, 2022
Test your PHP GraphQL server in style, with Pest!

Pest GraphQL Plugin Test your GraphQL API in style, with Pest! Installation Simply install through Composer! composer require --dev miniaturebase/pest

Minibase 14 Aug 9, 2022
GraPHPinator ⚡ 🌐 ⚡ Easy-to-use & Fast GraphQL server implementation for PHP

Easy-to-use & Fast GraphQL server implementation for modern PHP. Includes features from latest draft, middleware directives and modules with extra functionality.

Infinityloop.dev 34 Dec 14, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
A simple way of authenticating your RESTful APIs with API keys using Laravel

ApiGuard This package is no longer maintained This package is no longer maintained as Laravel already has a similar feature built-in since Laravel 5.8

Chris Bautista 691 Nov 29, 2022
Zoho CRM API SDK is a wrapper to Zoho CRM APIs. By using this sdk, user can build the application with ease

Archival Notice: This SDK is archived. You can continue to use it, but no new features or support requests will be accepted. For the new version, refe

null 81 Nov 4, 2022
A Statamic Pro addon that provides alternative GraphQL queries for collections, entries and global sets.

Statamic Enhanced GraphQL A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets. ⚠️ This is

Grischa Erbe 2 Dec 7, 2021
GraphQL Bundle for Symfony 2.

Symfony 2 GraphQl Bundle Use Facebook GraphQL with Symfony 2. This library port laravel-graphql. It is based on the PHP implementation here. Installat

Sergey Varibrus 35 Nov 17, 2022
Laravel wrapper for Facebook's GraphQL

Laravel GraphQL Use Facebook's GraphQL with Laravel 6.0+. It is based on the PHP port of GraphQL reference implementation. You can find more informati

Mikk Mihkel Nurges 1.9k Dec 31, 2022
A framework for serving GraphQL from Laravel

Lighthouse A framework for serving GraphQL from Laravel Lighthouse is a GraphQL framework that integrates with your Laravel application. It takes the

NuWave Commerce 3.1k Jan 6, 2023
🍞🧑‍🍳 An on-the-fly GraphQL Schema generator from Eloquent models for Laravel.

An on-the-fly GraphQL Schema generator from Eloquent models for Laravel. Installation Quickstart Model schemas Installation This package requires PHP

Scrn 100 Oct 16, 2022
GraphQL implementation with power of Laravel

Laravel GraphQL Use Facebook GraphQL with Laravel 5.2 >=. It is based on the PHP implementation here. You can find more information about GraphQL in t

Studionet 56 Mar 9, 2022