forked from api-platform/core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(serializer): api-platform/serializer
- Loading branch information
Showing
74 changed files
with
2,135 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,7 @@ jobs: | |
- HttpCache | ||
- RamseyUuid | ||
- GraphQl | ||
- Serializer | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
* Normalizes a composite identifier. | ||
* | ||
* @author Antoine Bluchet <[email protected]> | ||
* @deprecated | ||
*/ | ||
final class CompositeIdentifierParser | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
namespace ApiPlatform\Api; | ||
|
||
use ApiPlatform\Exception\RuntimeException; | ||
use ApiPlatform\Metadata\Exception\RuntimeException; | ||
use ApiPlatform\Metadata\GraphQl\Operation as GraphQlOperation; | ||
use ApiPlatform\Metadata\HttpOperation; | ||
use ApiPlatform\Metadata\Operation; | ||
|
@@ -28,6 +28,8 @@ | |
/** | ||
* {@inheritdoc} | ||
* | ||
* @deprecated use ApiPlatform\Metadata\IdentifiersExtractor instead | ||
* | ||
* @author Antoine Bluchet <[email protected]> | ||
*/ | ||
final class IdentifiersExtractor implements IdentifiersExtractorInterface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,10 @@ | |
|
||
namespace ApiPlatform\Api; | ||
|
||
use ApiPlatform\Exception\RuntimeException; | ||
use ApiPlatform\Metadata\Operation; | ||
class_exists(\ApiPlatform\Metadata\IdentifiersExtractorInterface::class); | ||
|
||
/** | ||
* Extracts identifiers for a given Resource according to the retrieved Metadata. | ||
* | ||
* @author Antoine Bluchet <[email protected]> | ||
*/ | ||
interface IdentifiersExtractorInterface | ||
{ | ||
/** | ||
* Finds identifiers from an Item (object). | ||
* | ||
* @throws RuntimeException | ||
*/ | ||
public function getIdentifiersFromItem(object $item, Operation $operation = null, array $context = []): array; | ||
if (!class_exists(IdentifiersExtractorInterface::class)) { | ||
interface IdentifiersExtractorInterface extends \ApiPlatform\Metadata\IdentifiersExtractorInterface | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,24 +13,10 @@ | |
|
||
namespace ApiPlatform\Api; | ||
|
||
use ApiPlatform\Exception\InvalidIdentifierException; | ||
class_exists(\ApiPlatform\Metadata\UriVariablesConverterInterface::class); | ||
|
||
/** | ||
* Identifier converter. | ||
* | ||
* @author Antoine Bluchet <[email protected]> | ||
*/ | ||
interface UriVariablesConverterInterface | ||
{ | ||
/** | ||
* Takes an array of strings representing URI variables (identifiers) and transform their values to the expected type. | ||
* | ||
* @param array $data URI variables to convert to PHP values | ||
* @param string $class The class to which the URI variables belong to | ||
* | ||
* @throws InvalidIdentifierException | ||
* | ||
* @return array Array indexed by identifiers properties with their values denormalized | ||
*/ | ||
public function convert(array $data, string $class, array $context = []): array; | ||
if (!class_exists(UriVariablesConverterInterface::class)) { | ||
interface UriVariablesConverterInterface extends \ApiPlatform\Metadata\UriVariablesConverterInterface | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,82 @@ | ||
{ | ||
"name": "api-platform/elasticseach", | ||
"description": "Elasticsearch support", | ||
"type": "library", | ||
"keywords": [ | ||
"Filter", | ||
"Elasticsearch" | ||
], | ||
"homepage": "https://api-platform.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Kévin Dunglas", | ||
"email": "[email protected]", | ||
"homepage": "https://dunglas.fr" | ||
"name": "api-platform/elasticseach", | ||
"description": "Elasticsearch support", | ||
"type": "library", | ||
"keywords": [ | ||
"Filter", | ||
"Elasticsearch" | ||
], | ||
"homepage": "https://api-platform.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Kévin Dunglas", | ||
"email": "[email protected]", | ||
"homepage": "https://dunglas.fr" | ||
}, | ||
{ | ||
"name": "API Platform Community", | ||
"homepage": "https://api-platform.com/community/contributors" | ||
} | ||
], | ||
"require": { | ||
"php": ">=8.1", | ||
"api-platform/metadata": "*@dev || ^3.1", | ||
"api-platform/state": "*@dev || ^3.1", | ||
"api-platform/serializer": "*@dev || ^3.1", | ||
"elasticsearch/elasticsearch": "^7.11.0", | ||
"symfony/cache": "^6.1", | ||
"symfony/console": "^6.2", | ||
"symfony/property-info": "^6.1", | ||
"symfony/serializer": "^6.1", | ||
"symfony/uid": "^6.1", | ||
"symfony/property-access": "^6.1" | ||
}, | ||
{ | ||
"name": "API Platform Community", | ||
"homepage": "https://api-platform.com/community/contributors" | ||
} | ||
], | ||
"require": { | ||
"php": ">=8.1", | ||
"api-platform/metadata": "*@dev || ^3.1", | ||
"api-platform/state": "*@dev || ^3.1", | ||
"elasticsearch/elasticsearch": "^7.11.0", | ||
"symfony/cache": "^6.1", | ||
"symfony/console": "^6.2", | ||
"symfony/property-info": "^6.1", | ||
"symfony/serializer": "^6.1", | ||
"symfony/uid": "^6.1", | ||
"symfony/property-access": "^6.1" | ||
}, | ||
"conflict": { | ||
"elasticsearch/elasticsearch": ">=8.0" | ||
}, | ||
"require-dev": { | ||
"phpspec/prophecy-phpunit": "^2.0", | ||
"symfony/phpunit-bridge": "^6.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"ApiPlatform\\Elasticsearch\\": "" | ||
"conflict": { | ||
"elasticsearch/elasticsearch": ">=8.0" | ||
}, | ||
"exclude-from-classmap": [ | ||
"/Tests/" | ||
] | ||
}, | ||
"config": { | ||
"preferred-install": { | ||
"*": "dist" | ||
"require-dev": { | ||
"phpspec/prophecy-phpunit": "^2.0", | ||
"symfony/phpunit-bridge": "^6.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"ApiPlatform\\Elasticsearch\\": "" | ||
}, | ||
"exclude-from-classmap": [ | ||
"/Tests/" | ||
] | ||
}, | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"composer/package-versions-deprecated": true, | ||
"phpstan/extension-installer": true | ||
} | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-main": "3.2.x-dev" | ||
"config": { | ||
"preferred-install": { | ||
"*": "dist" | ||
}, | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"composer/package-versions-deprecated": true, | ||
"phpstan/extension-installer": true | ||
} | ||
}, | ||
"symfony": { | ||
"require": "^6.1" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../Metadata" | ||
"extra": { | ||
"branch-alias": { | ||
"dev-main": "3.2.x-dev" | ||
}, | ||
"symfony": { | ||
"require": "^6.1" | ||
} | ||
}, | ||
{ | ||
"type": "path", | ||
"url": "../State" | ||
} | ||
] | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../Metadata" | ||
}, | ||
{ | ||
"type": "path", | ||
"url": "../State" | ||
}, | ||
{ | ||
"type": "path", | ||
"url": "../Serializer" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
* | ||
* @author Antoine Bluchet <[email protected]> | ||
*/ | ||
final class InvalidIdentifierException extends \Exception implements ExceptionInterface | ||
class InvalidIdentifierException extends \Exception implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ | |
* Identifier is not valid exception. | ||
* | ||
* @author Antoine Bluchet <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class InvalidUriVariableException extends \Exception implements ExceptionInterface | ||
{ | ||
|
Oops, something went wrong.