Skip to content

Commit

Permalink
revert: bring back schema to interface (#2360)
Browse files Browse the repository at this point in the history
reverts potential breaking change introduced in
#2359
  • Loading branch information
DjordyKoert authored Oct 17, 2024
1 parent f46437a commit 748c6e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ parameters:
count: 1
path: src/PropertyDescriber/PropertyDescriberInterface.php

-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$schema$#"
count: 1
path: src/PropertyDescriber/PropertyDescriberInterface.php

-
message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#"
count: 1
Expand Down
3 changes: 2 additions & 1 deletion src/PropertyDescriber/PropertyDescriberInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ interface PropertyDescriberInterface
/**
* @param Type[] $types
* @param string[]|null $groups Deprecated use $context['groups'] instead
* @param Schema $schema Allows to make changes inside of the schema (e.g. adding required fields)
* @param array<string, mixed> $context Context options for describing the property
*
* @return void
*/
public function describe(array $types, Schema $property, ?array $groups = null /* , array $context = [] */);
public function describe(array $types, Schema $property, ?array $groups = null /* , ?Schema $schema = null */ /* , array $context = [] */);

/**
* @param Type[] $types
Expand Down

0 comments on commit 748c6e0

Please sign in to comment.