Skip to content

Commit 1095833

Browse files
committed
Merge pull request #424 from dunglas/rename
Rename the ApiPlatform\Builder to ApiPlatform\Core
2 parents 5eeb461 + 6b794d3 commit 1095833

File tree

154 files changed

+744
-739
lines changed

Some content is hidden

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

154 files changed

+744
-739
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
"friendsofsymfony/user-bundle": "To use the FOSUserBundle bridge."
4949
},
5050
"autoload": {
51-
"psr-4": { "ApiPlatform\\Builder\\": "src/" }
51+
"psr-4": { "ApiPlatform\\Core\\": "src/" }
5252
},
5353
"autoload-dev": {
54-
"psr-4": { "ApiPlatform\\Builder\\Tests\\": "tests/" }
54+
"psr-4": { "ApiPlatform\\Core\\Tests\\": "tests/" }
5555
},
5656
"extra": {
5757
"branch-alias": {

features/bootstrap/FeatureContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
use ApiPlatform\Builder\Tests\Fixtures\TestBundle\Entity\Dummy;
13-
use ApiPlatform\Builder\Tests\Fixtures\TestBundle\Entity\RelatedDummy;
14-
use ApiPlatform\Builder\Tests\Fixtures\TestBundle\Entity\RelationEmbedder;
12+
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\Dummy;
13+
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\RelatedDummy;
14+
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\RelationEmbedder;
1515
use Behat\Behat\Context\Context;
1616
use Behat\Behat\Context\SnippetAcceptingContext;
1717
use Doctrine\Common\Persistence\ManagerRegistry;

features/doctrine/range-filter.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Feature: Range filter on collections
1111
Then the response status code should be 200
1212
And the response should be in JSON
1313
And the header "Content-Type" should be equal to "application/ld+json"
14-
And print last JSON response
1514
And the JSON should be valid according to this schema:
1615
"""
1716
{

features/hydra/error.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Feature: Error handling
4343
And the JSON node "@context" should be equal to "/contexts/Error"
4444
And the JSON node "@type" should be equal to "Error"
4545
And the JSON node "hydra:title" should be equal to "An error occurred"
46-
And the JSON node "hydra:description" should be equal to 'Nested objects for attribute "relatedDummy" of "ApiPlatform\Builder\Tests\Fixtures\TestBundle\Entity\Dummy" are not enabled. Use serialization groups to change that behavior.'
46+
And the JSON node "hydra:description" should be equal to 'Nested objects for attribute "relatedDummy" of "ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\Dummy" are not enabled. Use serialization groups to change that behavior.'
4747
And the JSON node "trace" should exist
4848

4949
Scenario: Get an error during deserialization of collection
@@ -62,7 +62,7 @@ Feature: Error handling
6262
And the JSON node "@context" should be equal to "/contexts/Error"
6363
And the JSON node "@type" should be equal to "Error"
6464
And the JSON node "hydra:title" should be equal to "An error occurred"
65-
And the JSON node "hydra:description" should be equal to 'Nested objects for attribute "relatedDummies" of "ApiPlatform\Builder\Tests\Fixtures\TestBundle\Entity\Dummy" are not enabled. Use serialization groups to change that behavior.'
65+
And the JSON node "hydra:description" should be equal to 'Nested objects for attribute "relatedDummies" of "ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\Dummy" are not enabled. Use serialization groups to change that behavior.'
6666
And the JSON node "trace" should exist
6767

6868
Scenario: Get an error because of an invalid JSON

src/Action/ActionUtilTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Action;
12+
namespace ApiPlatform\Core\Action;
1313

14-
use ApiPlatform\Builder\Api\ItemDataProviderInterface;
15-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Api\ItemDataProviderInterface;
15+
use ApiPlatform\Core\Exception\RuntimeException;
1616
use Symfony\Component\HttpFoundation\Request;
1717
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1818

src/Action/GetCollectionAction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Action;
12+
namespace ApiPlatform\Core\Action;
1313

14-
use ApiPlatform\Builder\Api\CollectionDataProviderInterface;
15-
use ApiPlatform\Builder\Api\PaginatorInterface;
16-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Api\CollectionDataProviderInterface;
15+
use ApiPlatform\Core\Api\PaginatorInterface;
16+
use ApiPlatform\Core\Exception\RuntimeException;
1717
use Symfony\Component\HttpFoundation\Request;
1818

1919
/**

src/Action/GetItemAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Action;
12+
namespace ApiPlatform\Core\Action;
1313

14-
use ApiPlatform\Builder\Api\ItemDataProviderInterface;
15-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Api\ItemDataProviderInterface;
15+
use ApiPlatform\Core\Exception\RuntimeException;
1616
use Symfony\Component\HttpFoundation\Request;
1717
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1818

src/Action/PostCollectionAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Action;
12+
namespace ApiPlatform\Core\Action;
1313

14-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Exception\RuntimeException;
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\Serializer\SerializerInterface;
1717

src/Action/PutItemAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Action;
12+
namespace ApiPlatform\Core\Action;
1313

14-
use ApiPlatform\Builder\Api\ItemDataProviderInterface;
15-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Api\ItemDataProviderInterface;
15+
use ApiPlatform\Core\Exception\RuntimeException;
1616
use Symfony\Component\HttpFoundation\Request;
1717
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1818
use Symfony\Component\Serializer\SerializerInterface;

src/Annotation/Property.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Annotation;
12+
namespace ApiPlatform\Core\Annotation;
1313

1414
/**
1515
* Property annotation.

src/Annotation/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Annotation;
12+
namespace ApiPlatform\Core\Annotation;
1313

1414
/**
1515
* Resource annotation.

src/Api/CollectionDataProviderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\InvalidArgumentException;
15-
use ApiPlatform\Builder\Exception\ResourceClassNotSupportedException;
14+
use ApiPlatform\Core\Exception\InvalidArgumentException;
15+
use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
1616

1717
/**
1818
* Retrieves items from a persistence layer.

src/Api/FilterCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

1414
/**
1515
* A list of filters.

src/Api/FilterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

1414
/**
1515
* Filters applicable on a resource.

src/Api/IriConverterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\InvalidArgumentException;
14+
use ApiPlatform\Core\Exception\InvalidArgumentException;
1515

1616
/**
1717
* Converts item and resources to IRI and vice versa.

src/Api/ItemDataProviderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\InvalidArgumentException;
15-
use ApiPlatform\Builder\Exception\ResourceClassNotSupportedException;
14+
use ApiPlatform\Core\Exception\InvalidArgumentException;
15+
use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
1616

1717
/**
1818
* Retrieves items from a persistence layer.

src/Api/OperationMethodResolverInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\RuntimeException;
14+
use ApiPlatform\Core\Exception\RuntimeException;
1515

1616
/**
1717
* Resolves the HTTP method associated with an operation.

src/Api/PaginatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

1414
/**
1515
* Paginator Interface.

src/Api/ResourceClassResolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\InvalidArgumentException;
15-
use ApiPlatform\Builder\Metadata\Resource\Factory\CollectionMetadataFactoryInterface;
16-
use ApiPlatform\Builder\Util\ClassInfoTrait;
14+
use ApiPlatform\Core\Exception\InvalidArgumentException;
15+
use ApiPlatform\Core\Metadata\Resource\Factory\CollectionMetadataFactoryInterface;
16+
use ApiPlatform\Core\Util\ClassInfoTrait;
1717

1818
/**
1919
* {@inheritdoc}

src/Api/ResourceClassResolverInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

14-
use ApiPlatform\Builder\Exception\InvalidArgumentException;
14+
use ApiPlatform\Core\Exception\InvalidArgumentException;
1515

1616
/**
1717
* Guesses which resource is associated with a given object.

src/Api/UrlGeneratorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Api;
12+
namespace ApiPlatform\Core\Api;
1313

1414
/**
1515
* UrlGeneratorInterface is the interface that all URL generator classes must implement.

src/Bridge/Doctrine/EventListener/ManagerViewListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\EventListener;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\EventListener;
1313

1414
use Doctrine\Common\Persistence\ManagerRegistry;
1515
use Doctrine\Common\Persistence\ObjectManager;

src/Bridge/Doctrine/Orm/CollectionDataProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm;
1313

14-
use ApiPlatform\Builder\Api\CollectionDataProviderInterface;
15-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
16-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension\QueryResultExtensionInterface;
17-
use ApiPlatform\Builder\Exception\ResourceClassNotSupportedException;
14+
use ApiPlatform\Core\Api\CollectionDataProviderInterface;
15+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
16+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryResultExtensionInterface;
17+
use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
1818
use Doctrine\Common\Persistence\ManagerRegistry;
1919

2020
/**

src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

1414
use Doctrine\ORM\Mapping\ClassMetadataInfo;
1515
use Doctrine\ORM\QueryBuilder;

src/Bridge/Doctrine/Orm/Extension/FilterExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

14-
use ApiPlatform\Builder\Api\FilterCollection;
15-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Filter\FilterInterface;
16-
use ApiPlatform\Builder\Metadata\Resource\Factory\ItemMetadataFactoryInterface;
14+
use ApiPlatform\Core\Api\FilterCollection;
15+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\FilterInterface;
16+
use ApiPlatform\Core\Metadata\Resource\Factory\ItemMetadataFactoryInterface;
1717
use Doctrine\ORM\QueryBuilder;
1818

1919
/**

src/Bridge/Doctrine/Orm/Extension/OrderExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

1414
use Doctrine\ORM\QueryBuilder;
1515

src/Bridge/Doctrine/Orm/Extension/PaginationExtension.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

14-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Paginator;
15-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Util\QueryChecker;
16-
use ApiPlatform\Builder\Metadata\Resource\Factory\ItemMetadataFactoryInterface;
17-
use ApiPlatform\Builder\Metadata\Resource\ItemMetadata;
14+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Paginator;
15+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryChecker;
16+
use ApiPlatform\Core\Metadata\Resource\Factory\ItemMetadataFactoryInterface;
17+
use ApiPlatform\Core\Metadata\Resource\ItemMetadata;
1818
use Doctrine\Common\Persistence\ManagerRegistry;
1919
use Doctrine\ORM\QueryBuilder;
2020
use Doctrine\ORM\Tools\Pagination\Paginator as DoctrineOrmPaginator;

src/Bridge/Doctrine/Orm/Extension/QueryCollectionExtensionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

1414
use Doctrine\ORM\QueryBuilder;
1515

src/Bridge/Doctrine/Orm/Extension/QueryItemExtensionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

1414
use Doctrine\ORM\QueryBuilder;
1515

src/Bridge/Doctrine/Orm/Extension/QueryResultExtensionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Extension;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
1313

1414
use Doctrine\ORM\QueryBuilder;
1515

src/Bridge/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Filter;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Filter;
1313

14-
use ApiPlatform\Builder\Util\RequestParser;
14+
use ApiPlatform\Core\Util\RequestParser;
1515
use Doctrine\Common\Persistence\ManagerRegistry;
1616
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
1717
use Symfony\Component\HttpFoundation\Request;

src/Bridge/Doctrine/Orm/Filter/DateFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Filter;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Filter;
1313

14-
use ApiPlatform\Builder\Bridge\Doctrine\Orm\Util\QueryNameGenerator;
14+
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGenerator;
1515
use Doctrine\Common\Persistence\ManagerRegistry;
1616
use Doctrine\ORM\QueryBuilder;
1717
use Symfony\Component\HttpFoundation\RequestStack;

src/Bridge/Doctrine/Orm/Filter/FilterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace ApiPlatform\Builder\Bridge\Doctrine\Orm\Filter;
12+
namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Filter;
1313

14-
use ApiPlatform\Builder\Api\FilterInterface as BaseFilterInterface;
14+
use ApiPlatform\Core\Api\FilterInterface as BaseFilterInterface;
1515
use Doctrine\ORM\QueryBuilder;
1616

1717
/**

0 commit comments

Comments
 (0)