Skip to content

Commit

Permalink
disallowedAttributes: configure errorIdentifier and errorTip as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
francescolaffi authored Dec 11, 2023
1 parent bf6aa80 commit fc934b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ parametersSchema:
?disallowParamFlags: arrayOf(anyOf(int(), structure([position: int(), ?value: int(), ?name: string()])), anyOf(int(), string())),
?allowExceptCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?name: string()])), anyOf(int(), string())),
?disallowCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?name: string()])), anyOf(int(), string())),
errorIdentifier: string(),
errorTip: string(),
?errorIdentifier: string(),
?errorTip: string(),
])
)

Expand Down
8 changes: 4 additions & 4 deletions tests/src/disallowed-allow/ClassWithAttributesAllow.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
class ClassWithAttributesAllow
{

#[AttributeEntity] // allowed by path in all tests
#[AttributeEntity] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because no $repositoryClass parameter specified
private const MAYO = true;

#[AttributeEntity] // allowed by path in all tests
#[AttributeEntity] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because no $repositoryClass parameter specified
public $cheddar = 'plz';

#[AttributeEntity] // disallowed
#[AttributeEntity] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because no $repositoryClass parameter specified
public static $pepper = 'ofc';


Expand All @@ -39,7 +39,7 @@ public function hasKetchup(): bool

#[AttributeClass()] // allowed by path in all tests
public function hasPineapple(
#[AttributeEntity] // allowed by path in all tests
#[AttributeEntity] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because no $repositoryClass parameter specified
bool $really
): bool {
}
Expand Down

0 comments on commit fc934b2

Please sign in to comment.