update drupal
This commit is contained in:
@@ -31,7 +31,7 @@ use Symfony\Component\Routing\RouterInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityAccessChecker {
|
||||
@@ -238,7 +238,7 @@ class EntityAccessChecker {
|
||||
*
|
||||
* @todo: remove when a generic revision access API exists in Drupal core, and
|
||||
* also remove the injected "node" and "media" services.
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/2992833#comment-12818386
|
||||
* @see https://www.drupal.org/project/drupal/issues/2992833#comment-12818386
|
||||
*/
|
||||
protected function checkRevisionViewAccess(EntityInterface $entity, AccountInterface $account) {
|
||||
assert($entity instanceof RevisionableInterface);
|
||||
@@ -257,7 +257,7 @@ class EntityAccessChecker {
|
||||
|
||||
default:
|
||||
$reason = 'Only node and media revisions are supported by JSON:API.';
|
||||
$reason .= ' For context, see https://www.drupal.org/project/jsonapi/issues/2992833#comment-12818258.';
|
||||
$reason .= ' For context, see https://www.drupal.org/project/drupal/issues/2992833#comment-12818258.';
|
||||
$reason .= ' To contribute, see https://www.drupal.org/project/drupal/issues/2350939 and https://www.drupal.org/project/drupal/issues/2809177.';
|
||||
$access = AccessResult::neutral($reason);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Routing\Route;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class RelationshipFieldAccess implements AccessInterface {
|
||||
|
||||
@@ -32,7 +32,7 @@ use Drupal\jsonapi\Query\Filter;
|
||||
* @see https://www.drupal.org/project/drupal/issues/2809177
|
||||
* @see https://www.drupal.org/project/drupal/issues/777578
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class TemporaryQueryGuard {
|
||||
|
||||
@@ -67,7 +67,7 @@ use Drupal\Core\Http\Exception\CacheableBadRequestHttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class FieldResolver {
|
||||
@@ -256,18 +256,21 @@ class FieldResolver {
|
||||
* The JSON:API resource type from which to resolve the field name.
|
||||
* @param string $external_field_name
|
||||
* The public field name to map to a Drupal field name.
|
||||
* @param string $operator
|
||||
* (optional) The operator of the condition for which the path should be
|
||||
* resolved.
|
||||
*
|
||||
* @return string
|
||||
* The mapped field name.
|
||||
*
|
||||
* @throws \Drupal\Core\Http\Exception\CacheableBadRequestHttpException
|
||||
*/
|
||||
public function resolveInternalEntityQueryPath($resource_type, $external_field_name) {
|
||||
public function resolveInternalEntityQueryPath($resource_type, $external_field_name, $operator = NULL) {
|
||||
$function_args = func_get_args();
|
||||
// @todo Remove this conditional block in drupal:9.0.0 and add a type hint
|
||||
// to the first argument of this method.
|
||||
// @see https://www.drupal.org/project/drupal/issues/3078045
|
||||
if (count($function_args) === 3) {
|
||||
if (count($function_args) === 3 && is_string($resource_type)) {
|
||||
@trigger_error('Passing the entity type ID and bundle to ' . __METHOD__ . ' is deprecated in drupal:8.8.0 and will throw a fatal error in drupal:9.0.0. Pass a JSON:API resource type instead. See https://www.drupal.org/node/3078036', E_USER_DEPRECATED);
|
||||
list($entity_type_id, $bundle, $external_field_name) = $function_args;
|
||||
$resource_type = $this->resourceTypeRepository->get($entity_type_id, $bundle);
|
||||
@@ -368,7 +371,10 @@ class FieldResolver {
|
||||
// If there are no remaining path parts, the process is finished unless
|
||||
// the field has multiple properties, in which case one must be specified.
|
||||
if (empty($parts)) {
|
||||
if ($property_specifier_needed) {
|
||||
// If the operator is asserting the presence or absence of a
|
||||
// relationship entirely, it does not make sense to require a property
|
||||
// specifier.
|
||||
if ($property_specifier_needed && (!$at_least_one_entity_reference_field || !in_array($operator, ['IS NULL', 'IS NOT NULL'], TRUE))) {
|
||||
$possible_specifiers = array_map(function ($specifier) use ($at_least_one_entity_reference_field) {
|
||||
return $at_least_one_entity_reference_field && $specifier !== 'id' ? "meta.$specifier" : $specifier;
|
||||
}, $candidate_property_names);
|
||||
@@ -538,7 +544,7 @@ class FieldResolver {
|
||||
*/
|
||||
protected function isMemberFilterable($external_name, array $resource_types) {
|
||||
return array_reduce($resource_types, function ($carry, ResourceType $resource_type) use ($external_name) {
|
||||
// @todo: remove the next line and uncomment the following one in https://www.drupal.org/project/jsonapi/issues/3017047.
|
||||
// @todo: remove the next line and uncomment the following one in https://www.drupal.org/project/drupal/issues/3017047.
|
||||
return $carry ?: $external_name === 'id' || $resource_type->isFieldEnabled($resource_type->getInternalName($external_name));
|
||||
/*return $carry ?: in_array($external_name, ['id', 'type']) || $resource_type->isFieldEnabled($resource_type->getInternalName($external_name));*/
|
||||
}, FALSE);
|
||||
@@ -640,7 +646,7 @@ class FieldResolver {
|
||||
$prior_parts = array_slice($unresolved_path_parts, 0, count($unresolved_path_parts) - count($remaining_parts));
|
||||
return implode('.', array_merge($prior_parts, [$reference_name], $remaining_parts));
|
||||
}, $unique_reference_names);
|
||||
// @todo Add test coverage for this in https://www.drupal.org/project/jsonapi/issues/2971281
|
||||
// @todo Add test coverage for this in https://www.drupal.org/project/drupal/issues/2971281
|
||||
$message = sprintf('Ambiguous path. Try one of the following: %s, in place of the given path: %s', implode(', ', $choices), implode('.', $unresolved_path_parts));
|
||||
$cacheability = (new CacheableMetadata())->addCacheContexts(['url.query_args:filter', 'url.query_args:sort']);
|
||||
throw new CacheableBadRequestHttpException($cacheability, $message);
|
||||
|
||||
@@ -65,7 +65,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityResource {
|
||||
@@ -307,7 +307,7 @@ class EntityResource {
|
||||
*/
|
||||
public function patchIndividual(ResourceType $resource_type, EntityInterface $entity, Request $request) {
|
||||
if ($entity instanceof RevisionableInterface && !($entity->isLatestRevision() && $entity->isDefaultRevision())) {
|
||||
throw new BadRequestHttpException('Updating a resource object that has a working copy is not yet supported. See https://www.drupal.org/project/jsonapi/issues/2795279.');
|
||||
throw new BadRequestHttpException('Updating a resource object that has a working copy is not yet supported. See https://www.drupal.org/project/drupal/issues/2795279.');
|
||||
}
|
||||
|
||||
$parsed_entity = $this->deserialize($resource_type, $request, JsonApiDocumentTopLevel::class);
|
||||
@@ -408,7 +408,7 @@ class EntityResource {
|
||||
catch (\LogicException $e) {
|
||||
// Ensure good DX when an entity query involves a config entity type.
|
||||
// For example: getting users with a particular role, which is a config
|
||||
// entity type: https://www.drupal.org/project/jsonapi/issues/2959445.
|
||||
// entity type: https://www.drupal.org/project/drupal/issues/2959445.
|
||||
// @todo Remove the message parsing in https://www.drupal.org/project/drupal/issues/3028967.
|
||||
if (strpos($e->getMessage(), 'Getting the base fields is not supported for entity type') === 0) {
|
||||
preg_match('/entity type (.*)\./', $e->getMessage(), $matches);
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntryPoint extends ControllerBase {
|
||||
|
||||
@@ -34,7 +34,7 @@ use Symfony\Component\Validator\ConstraintViolationInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class FileUpload {
|
||||
@@ -179,7 +179,7 @@ class FileUpload {
|
||||
throw new UnprocessableEntityHttpException($message);
|
||||
}
|
||||
|
||||
// @todo Remove line below in favor of commented line in https://www.drupal.org/project/jsonapi/issues/2878463.
|
||||
// @todo Remove line below in favor of commented line in https://www.drupal.org/project/drupal/issues/2878463.
|
||||
$self_link = new Link(new CacheableMetadata(), Url::fromRoute('jsonapi.file--file.individual', ['entity' => $file->uuid()]), 'self');
|
||||
/* $self_link = new Link(new CacheableMetadata(), $this->entity->toUrl('jsonapi'), ['self']); */
|
||||
$links = new LinkCollection(['self' => $self_link]);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class RegisterSerializationClassesCompilerPass extends DrupalRegisterSerializationClassesCompilerPass {
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\serialization\Encoder\JsonEncoder as SerializationJsonEncoder;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class JsonEncoder extends SerializationJsonEncoder {
|
||||
|
||||
@@ -12,7 +12,7 @@ use Drupal\jsonapi\Exception\UnprocessableHttpEntityException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
trait EntityValidationTrait {
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class DefaultExceptionSubscriber extends SerializationDefaultExceptionSubscriber {
|
||||
|
||||
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class JsonApiRequestValidator implements EventSubscriberInterface {
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* This is 99% identical to:
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\rest\EventSubscriber\ResourceResponseSubscriber
|
||||
|
||||
@@ -18,7 +18,7 @@ use Drupal\jsonapi\JsonApiResource\ResourceIdentifierTrait;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityAccessDeniedHttpException extends CacheableAccessDeniedHttpException implements ResourceIdentifierInterface {
|
||||
@@ -71,7 +71,7 @@ class EntityAccessDeniedHttpException extends CacheableAccessDeniedHttpException
|
||||
$error['reason'] = $entity_access->getReason();
|
||||
}
|
||||
$this->error = $error;
|
||||
// @todo: remove this ternary operation in https://www.drupal.org/project/jsonapi/issues/2997594.
|
||||
// @todo: remove this ternary operation in https://www.drupal.org/project/drupal/issues/2997594.
|
||||
$this->resourceIdentifier = $entity ? ResourceIdentifier::fromEntity($entity) : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class UnprocessableHttpEntityException extends HttpException {
|
||||
|
||||
@@ -24,7 +24,7 @@ use Drupal\jsonapi\ResourceType\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class IncludeResolver {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\jsonapi\Exception\EntityAccessDeniedHttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
abstract class Data implements \IteratorAggregate, \Countable {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* (The spec says the top-level `data` and `errors` members MUST NOT coexist.)
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\jsonapi\Exception\EntityAccessDeniedHttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class IncludedData extends ResourceObjectData {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\JsonApiResource;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format/#document-top-level
|
||||
|
||||
@@ -12,7 +12,7 @@ use Drupal\jsonapi\ResourceType\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class LabelOnlyResourceObject extends ResourceObject {
|
||||
|
||||
@@ -15,7 +15,7 @@ use Drupal\Core\Url;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc8288
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\Component\Assertion\Inspector;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class LinkCollection implements \IteratorAggregate {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\JsonApiResource;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class NullIncludedData extends IncludedData {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\jsonapi\Exception\EntityAccessDeniedHttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class OmittedData extends ResourceObjectData {
|
||||
|
||||
@@ -16,7 +16,7 @@ use Drupal\jsonapi\Routing\Routes;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class Relationship implements TopLevelDataInterface {
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\Component\Assertion\Inspector;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class RelationshipData extends Data {
|
||||
|
||||
@@ -28,12 +28,12 @@ use Drupal\jsonapi\ResourceType\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format/#document-resource-object-relationships
|
||||
* @see https://github.com/json-api/json-api/pull/1156#issuecomment-325377995
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/2864680
|
||||
* @see https://www.drupal.org/project/drupal/issues/2864680
|
||||
*/
|
||||
class ResourceIdentifier implements ResourceIdentifierInterface {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Drupal\jsonapi\JsonApiResource;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
interface ResourceIdentifierInterface {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\JsonApiResource;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\JsonApiResource\ResourceIdentifierInterface
|
||||
|
||||
@@ -27,7 +27,7 @@ use Drupal\user\UserInterface;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class ResourceObject implements CacheableDependencyInterface, ResourceIdentifierInterface {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\jsonapi\Exception\EntityAccessDeniedHttpException;
|
||||
* @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
|
||||
* may change at any time and could break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class ResourceObjectData extends Data implements TopLevelDataInterface {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\JsonApiResource;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
interface TopLevelDataInterface {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format
|
||||
|
||||
@@ -14,7 +14,7 @@ use Drupal\jsonapi\DependencyInjection\Compiler\RegisterSerializationClassesComp
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class JsonapiServiceProvider implements ServiceModifierInterface, ServiceProviderInterface {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\jsonapi\ResourceType\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class ConfigEntityDenormalizer extends EntityDenormalizerBase {
|
||||
|
||||
@@ -12,7 +12,7 @@ use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class ContentEntityDenormalizer extends EntityDenormalizerBase {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format/#error-objects
|
||||
|
||||
@@ -15,7 +15,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
abstract class EntityDenormalizerBase extends NormalizerBase implements DenormalizerInterface {
|
||||
|
||||
@@ -19,7 +19,7 @@ use Drupal\jsonapi\Routing\Routes;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityReferenceFieldNormalizer extends FieldNormalizer {
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class FieldItemNormalizer extends NormalizerBase implements DenormalizerInterface {
|
||||
|
||||
@@ -15,7 +15,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class FieldNormalizer extends NormalizerBase implements DenormalizerInterface {
|
||||
|
||||
@@ -14,7 +14,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format/#error-objects
|
||||
@@ -112,7 +112,7 @@ class HttpExceptionNormalizer extends NormalizerBase {
|
||||
* URL pointing to the specific RFC-2616 section. Or NULL if it is an HTTP
|
||||
* status code that is defined in another RFC.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/2832211#comment-11826234
|
||||
* @see https://www.drupal.org/project/drupal/issues/2832211#comment-11826234
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ use Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel
|
||||
@@ -217,7 +217,7 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
|
||||
* @return \Drupal\jsonapi\Normalizer\Value\CacheableNormalization
|
||||
* The normalized document.
|
||||
*
|
||||
* @todo: refactor this to use CacheableNormalization::aggregate in https://www.drupal.org/project/jsonapi/issues/3036284.
|
||||
* @todo: refactor this to use CacheableNormalization::aggregate in https://www.drupal.org/project/drupal/issues/3036284.
|
||||
*/
|
||||
protected function normalizeErrorDocument(JsonApiDocumentTopLevel $document, $format, array $context = []) {
|
||||
$normalized_values = array_map(function (HttpExceptionInterface $exception) use ($format, $context) {
|
||||
@@ -245,7 +245,7 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
|
||||
* @return \Drupal\jsonapi\Normalizer\Value\CacheableNormalization|\Drupal\jsonapi\Normalizer\Value\CacheableOmission
|
||||
* The normalized omissions.
|
||||
*
|
||||
* @todo: refactor this to use link collections in https://www.drupal.org/project/jsonapi/issues/3036279.
|
||||
* @todo: refactor this to use link collections in https://www.drupal.org/project/drupal/issues/3036279.
|
||||
*/
|
||||
protected function normalizeOmissionsLinks(OmittedData $omissions, $format, array $context = []) {
|
||||
$normalized_omissions = array_map(function (HttpExceptionInterface $exception) use ($format, $context) {
|
||||
|
||||
@@ -24,7 +24,7 @@ use Drupal\jsonapi\Normalizer\Value\CacheableNormalization;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class LinkCollectionNormalizer extends NormalizerBase {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\serialization\Normalizer\NormalizerBase as SerializationNormalizerBas
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
abstract class NormalizerBase extends SerializationNormalizerBase {
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class ResourceIdentifierNormalizer extends NormalizerBase implements DenormalizerInterface {
|
||||
|
||||
@@ -17,7 +17,7 @@ use Drupal\jsonapi\Normalizer\Value\CacheableOmission;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class ResourceObjectNormalizer extends NormalizerBase {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see http://jsonapi.org/format/#error-objects
|
||||
|
||||
@@ -13,7 +13,7 @@ use Drupal\Core\Cache\CacheableMetadata;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class CacheableNormalization implements CacheableDependencyInterface {
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\Core\Cache\CacheableDependencyInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class CacheableOmission extends CacheableNormalization {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\Normalizer\Value;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class HttpExceptionNormalizerValue extends CacheableNormalization {}
|
||||
|
||||
@@ -17,7 +17,7 @@ use Symfony\Component\Routing\Route;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\Core\ParamConverter\EntityConverter
|
||||
|
||||
@@ -12,7 +12,7 @@ use Symfony\Component\Routing\Route;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class ResourceTypeConverter implements ParamConverterInterface {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\Core\Http\Exception\CacheableBadRequestHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityCondition {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\Query;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class EntityConditionGroup {
|
||||
|
||||
@@ -12,7 +12,7 @@ use Drupal\jsonapi\ResourceType\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class Filter {
|
||||
@@ -157,7 +157,8 @@ class Filter {
|
||||
foreach ($expanded as &$filter_item) {
|
||||
if (isset($filter_item[static::CONDITION_KEY][EntityCondition::PATH_KEY])) {
|
||||
$unresolved = $filter_item[static::CONDITION_KEY][EntityCondition::PATH_KEY];
|
||||
$filter_item[static::CONDITION_KEY][EntityCondition::PATH_KEY] = $field_resolver->resolveInternalEntityQueryPath($resource_type, $unresolved);
|
||||
$operator = $filter_item[static::CONDITION_KEY][EntityCondition::OPERATOR_KEY];
|
||||
$filter_item[static::CONDITION_KEY][EntityCondition::PATH_KEY] = $field_resolver->resolveInternalEntityQueryPath($resource_type, $unresolved, $operator);
|
||||
}
|
||||
}
|
||||
return new static(static::buildEntityConditionGroup($expanded));
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\Core\Http\Exception\CacheableBadRequestHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class OffsetPage {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\Core\Http\Exception\CacheableBadRequestHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class Sort {
|
||||
|
||||
@@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\rest\ModifiedResourceResponse
|
||||
|
||||
@@ -15,7 +15,7 @@ use Drupal\Core\TypedData\DataReferenceTargetDefinition;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\ResourceType\ResourceTypeRepository
|
||||
@@ -279,7 +279,7 @@ class ResourceType {
|
||||
* the HTTP API. For example, read-only data from an internal resource might
|
||||
* be embedded in a public resource using computed fields. Therefore,
|
||||
* including the internal resource as a relationship with distinct routes
|
||||
* might uneccesarilly expose internal implementation details.
|
||||
* might unnecessarily expose internal implementation details.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the resource type is internal. FALSE otherwise.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\ResourceType\ResourceTypeRepository
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\ResourceType\ResourceTypeRepository
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\ResourceType\ResourceTypeRepository
|
||||
|
||||
@@ -33,7 +33,7 @@ use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\ResourceType\ResourceType
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\ResourceType;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
interface ResourceTypeRepositoryInterface {
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\Revisions;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class InvalidVersionIdentifierException extends \InvalidArgumentException {}
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
abstract class NegotiatorBase implements VersionNegotiatorInterface {
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class ResourceVersionRouteEnhancer implements EnhancerInterface {
|
||||
@@ -103,7 +103,7 @@ final class ResourceVersionRouteEnhancer implements EnhancerInterface {
|
||||
/* Uncomment the next line and remove the following one when https://www.drupal.org/project/drupal/issues/3002352 lands in core. */
|
||||
/* throw new CacheableHttpException($cacheability, 501, 'Resource versioning is not yet supported for this resource type.'); */
|
||||
$message = 'JSON:API does not yet support resource versioning for this resource type.';
|
||||
$message .= ' For context, see https://www.drupal.org/project/jsonapi/issues/2992833#comment-12818258.';
|
||||
$message .= ' For context, see https://www.drupal.org/project/drupal/issues/2992833#comment-12818258.';
|
||||
$message .= ' To contribute, see https://www.drupal.org/project/drupal/issues/2350939 and https://www.drupal.org/project/drupal/issues/2809177.';
|
||||
throw new CacheableHttpException($cacheability, 501, $message, NULL, []);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\Core\Entity\EntityInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class VersionById extends NegotiatorBase implements VersionNegotiatorInterface {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Drupal\Core\Entity\RevisionableInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class VersionByRel extends NegotiatorBase {
|
||||
|
||||
@@ -13,7 +13,7 @@ use Drupal\Core\Http\Exception\CacheableNotFoundHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\Revisions\VersionNegotiatorInterface
|
||||
|
||||
@@ -10,7 +10,7 @@ use Drupal\Core\Entity\EntityInterface;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*
|
||||
* @see \Drupal\jsonapi\Revisions\VersionNegotiator
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Drupal\jsonapi\Revisions;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class VersionNotFoundException extends \InvalidArgumentException {
|
||||
|
||||
@@ -12,7 +12,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class RouteEnhancer implements EnhancerInterface {
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\Routing\RouteCollection;
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
class Routes implements ContainerInjectionInterface {
|
||||
|
||||
@@ -12,12 +12,12 @@ use Symfony\Component\Serializer\Serializer as SymfonySerializer;
|
||||
* Backwards compatibility is in no way guaranteed and will almost certainly be
|
||||
* broken in the future.
|
||||
*
|
||||
* @link https://www.drupal.org/project/jsonapi/issues/2923779#comment-12407443
|
||||
* @link https://www.drupal.org/project/drupal/issues/2923779#comment-12407443
|
||||
*
|
||||
* @internal JSON:API maintains no PHP API since its API is the HTTP API. This
|
||||
* class may change at any time and this will break any dependencies on it.
|
||||
*
|
||||
* @see https://www.drupal.org/project/jsonapi/issues/3032787
|
||||
* @see https://www.drupal.org/project/drupal/issues/3032787
|
||||
* @see jsonapi.api.php
|
||||
*/
|
||||
final class Serializer extends SymfonySerializer {
|
||||
|
||||
Reference in New Issue
Block a user