Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions src/Annotation/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,55 +76,6 @@ final class ApiProperty
*/
public $identifier;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $deprecationReason;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $fetchable;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $fetchEager;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $jsonldContext;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $openapiContext;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $push;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $swaggerContext;

/**
* @throws InvalidArgumentException
*/
Expand Down
277 changes: 0 additions & 277 deletions src/Annotation/ApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,16 @@
* @Attributes(
* @Attribute("accessControl", type="string"),
* @Attribute("accessControlMessage", type="string"),
* @Attribute("attributes", type="array"),
* @Attribute("cacheHeaders", type="array"),
* @Attribute("collectionOperations", type="array"),
* @Attribute("denormalizationContext", type="array"),
* @Attribute("deprecationReason", type="string"),
* @Attribute("description", type="string"),
* @Attribute("elasticsearch", type="bool"),
* @Attribute("fetchPartial", type="bool"),
* @Attribute("forceEager", type="bool"),
* @Attribute("formats", type="array"),
* @Attribute("filters", type="string[]"),
* @Attribute("graphql", type="array"),
* @Attribute("hydraContext", type="array"),
* @Attribute("input", type="mixed"),
* @Attribute("iri", type="string"),
* @Attribute("itemOperations", type="array"),
* @Attribute("mercure", type="mixed"),
* @Attribute("messenger", type="mixed"),
* @Attribute("normalizationContext", type="array"),
Expand All @@ -62,8 +56,6 @@
* @Attribute("securityMessage", type="string"),
* @Attribute("securityPostDenormalize", type="string"),
* @Attribute("securityPostDenormalizeMessage", type="string"),
* @Attribute("shortName", type="string"),
* @Attribute("subresourceOperations", type="array"),
* @Attribute("sunset", type="string"),
* @Attribute("swaggerContext", type="array"),
* @Attribute("validationGroups", type="mixed")
Expand Down Expand Up @@ -116,275 +108,6 @@ final class ApiResource
*/
public $subresourceOperations;

/**
* @see https://api-platform.com/docs/core/performance/#setting-custom-http-cache-headers
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $cacheHeaders;

/**
* @see https://api-platform.com/docs/core/serialization/#using-serialization-groups
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $denormalizationContext;

/**
* @see https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $deprecationReason;

/**
* @see https://api-platform.com/docs/core/elasticsearch/
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $elasticsearch;

/**
* @see https://api-platform.com/docs/core/performance/#fetch-partial
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $fetchPartial;

/**
* @see https://api-platform.com/docs/core/performance/#force-eager
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $forceEager;

/**
* @see https://api-platform.com/docs/core/content-negotiation/#configuring-formats-for-a-specific-resource-or-operation
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $formats;

/**
* @see https://api-platform.com/docs/core/filters/#doctrine-orm-and-mongodb-odm-filters
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string[]
*/
private $filters;

/**
* @see https://api-platform.com/docs/core/extending-jsonld-context/#hydra
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string[]
*/
private $hydraContext;

/**
* @see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string|false
*/
private $input;

/**
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var int
*
* @deprecated - Use $paginationMaximumItemsPerPage instead
*/
private $maximumItemsPerPage;

/**
* @see https://api-platform.com/docs/core/mercure
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*/
private $mercure;

/**
* @see https://api-platform.com/docs/core/messenger/#dispatching-a-resource-through-the-message-bus
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool|string
*/
private $messenger;

/**
* @see https://api-platform.com/docs/core/serialization/#using-serialization-groups
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $normalizationContext;

/**
* @see https://api-platform.com/docs/core/swagger/#using-the-openapi-and-swagger-contexts
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $openapiContext;

/**
* @see https://api-platform.com/docs/core/default-order/#overriding-default-order
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $order;

/**
* @see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string|false
*/
private $output;

/**
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-1
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationClientEnabled;

/**
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-3
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationClientItemsPerPage;

/**
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-6
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationClientPartial;

/**
* @see https://api-platform.com/docs/core/pagination/#cursor-based-pagination
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $paginationViaCursor;

/**
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationEnabled;

/**
* @see https://api-platform.com/docs/core/pagination/#controlling-the-behavior-of-the-doctrine-orm-paginator
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationFetchJoinCollection;

/**
* @see https://api-platform.com/docs/core/pagination/#changing-the-number-of-items-per-page
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var int
*/
private $paginationItemsPerPage;

/**
* @see https://api-platform.com/docs/core/pagination/#changing-maximum-items-per-page
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var int
*/
private $paginationMaximumItemsPerPage;

/**
* @see https://api-platform.com/docs/core/performance/#partial-pagination
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var bool
*/
private $paginationPartial;

/**
* @see https://api-platform.com/docs/core/operations/#prefixing-all-routes-of-all-operations
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $routePrefix;

/**
* @see https://api-platform.com/docs/core/security
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $security;

/**
* @see https://api-platform.com/docs/core/security/#configuring-the-access-control-error-message
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $securityMessage;

/**
* @see https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $securityPostDenormalize;

/**
* @see https://api-platform.com/docs/core/security/#configuring-the-access-control-error-message
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $securityPostDenormalizeMessage;

/**
* @see https://api-platform.com/docs/core/deprecations/#setting-the-sunset-http-header-to-indicate-when-a-resource-or-an-operation-will-be-removed
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var string
*/
private $sunset;

/**
* @see https://api-platform.com/docs/core/swagger/#using-the-openapi-and-swagger-contexts
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var array
*/
private $swaggerContext;

/**
* @see https://api-platform.com/docs/core/validation/#using-validation-groups
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*/
private $validationGroups;

/**
* @throws InvalidArgumentException
*/
Expand Down
6 changes: 1 addition & 5 deletions src/Annotation/AttributesHydratorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ private function hydrateAttributes(array $values): void

foreach ($values as $key => $value) {
$key = (string) $key;
if (!property_exists($this, $key)) {
throw new InvalidArgumentException(sprintf('Unknown property "%s" on annotation "%s".', $key, self::class));
}

if ((new \ReflectionProperty($this, $key))->isPublic()) {
if (property_exists($this, $key) && (new \ReflectionProperty($this, $key))->isPublic()) {
$this->{$key} = $value;
continue;
}
Expand Down
Loading