Skip to content

Commit

Permalink
Remove the deprecated ProcessorInterface (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Jan 15, 2025
1 parent c6956de commit 7708510
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 36 deletions.
5 changes: 2 additions & 3 deletions src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace OpenApi;

use OpenApi\Annotations as OA;
use OpenApi\Processors\ProcessorInterface;

/**
* Result of the analyser.
Expand Down Expand Up @@ -405,11 +404,11 @@ public function split()
/**
* Apply the processor(s).
*
* @param callable|ProcessorInterface|array<ProcessorInterface|callable> $processors One or more processors
* @param callable|array<callable> $processors One or more processors
*/
public function process($processors = null): void
{
if (is_array($processors) === false && is_callable($processors) || $processors instanceof ProcessorInterface) {
if (false === is_array($processors) && is_callable($processors)) {
$processors = [$processors];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Augments shared and operations parameters from docblock comments.
*/
class AugmentParameters implements ProcessorInterface
class AugmentParameters
{
use DocblockTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Use the property context to extract useful information and inject that into the annotation.
*/
class AugmentProperties implements ProcessorInterface
class AugmentProperties
{
use Concerns\DocblockTrait;
use Concerns\RefTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentRefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use OpenApi\Annotations as OA;
use OpenApi\Generator;

class AugmentRefs implements ProcessorInterface
class AugmentRefs
{
use Concerns\RefTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Use the RequestBody context to extract useful information and inject that into the annotation.
*/
class AugmentRequestBody implements ProcessorInterface
class AugmentRequestBody
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentSchemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* Merges properties.
*/
class AugmentSchemas implements ProcessorInterface
class AugmentSchemas
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/AugmentTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Ensures that all tags used on operations also exist in the global <code>tags</code> list.
*/
class AugmentTags implements ProcessorInterface
class AugmentTags
{
/** @var array<string> */
protected array $whitelist = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/BuildPaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Build the openapi->paths using the detected `@OA\PathItem` and `@OA\Operation` (`@OA\Get`, `@OA\Post`, etc).
*/
class BuildPaths implements ProcessorInterface
class BuildPaths
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/CleanUnmerged.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use OpenApi\Analysis;
use OpenApi\Annotations as OA;

class CleanUnmerged implements ProcessorInterface
class CleanUnmerged
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/CleanUnusedComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Tracks the use of all <code>Components</code> and removed unused schemas.
*/
class CleanUnusedComponents implements ProcessorInterface
class CleanUnusedComponents
{
use Concerns\AnnotationTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/DocBlockDescriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* Use `null`, for example: `@Annotation(description=null)`, if you don't want the annotation to have a description.
*/
class DocBlockDescriptions implements ProcessorInterface
class DocBlockDescriptions
{
use Concerns\DocblockTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/ExpandClasses.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* - else
* => merge ancestor properties into the schema.
*/
class ExpandClasses implements ProcessorInterface
class ExpandClasses
{
use Concerns\MergePropertiesTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/ExpandEnums.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* Determines `schema`, `enum` and `type`.
*/
class ExpandEnums implements ProcessorInterface
class ExpandEnums
{
use Concerns\TypesTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/ExpandTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* - merge trait annotations/methods/properties into the schema if the trait does not have a schema itself
* - inherit from the trait if it has a schema (allOf).
*/
class ExpandTraits implements ProcessorInterface
class ExpandTraits
{
use Concerns\MergePropertiesTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/MergeIntoComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Merge reusable annotation into @OA\Schemas.
*/
class MergeIntoComponents implements ProcessorInterface
class MergeIntoComponents
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/MergeIntoOpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Merge all @OA\OpenApi annotations into one.
*/
class MergeIntoOpenApi implements ProcessorInterface
class MergeIntoOpenApi
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/MergeJsonContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Split JsonContent into Schema and MediaType.
*/
class MergeJsonContent implements ProcessorInterface
class MergeJsonContent
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/MergeXmlContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Split XmlContent into Schema and MediaType.
*/
class MergeXmlContent implements ProcessorInterface
class MergeXmlContent
{
public function __invoke(Analysis $analysis)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processors/OperationId.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Generate the OperationId based on the context of the OpenApi annotation.
*/
class OperationId implements ProcessorInterface
class OperationId
{
protected bool $hash;

Expand Down
2 changes: 1 addition & 1 deletion src/Processors/PathFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* If no `tags` or `paths` filters are set, no filtering is performed.
* All filter (regular) expressions must be enclosed within delimiter characters as they are used as-is.
*/
class PathFilter implements ProcessorInterface
class PathFilter
{
use AnnotationTrait;

Expand Down
14 changes: 0 additions & 14 deletions src/Processors/ProcessorInterface.php

This file was deleted.

0 comments on commit 7708510

Please sign in to comment.