Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert validator from annotation to attribute #398

Merged
merged 1 commit into from
Apr 3, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Changelog
passed as credentials.
* `doctrine:phpcr:fixtures:load` is now only visible if PHPCR-ODM is available. In version 2, you would get an error when
running the command without PHPCR-ODM.
* Converted the `ValidPhpcrOdm` annotation to a PHP attribute. Change comments with `@ValidPhpcrOdm` into attribute
declarations with `#[ValidPhpcrOdm]`.

Version 2
=========
Expand Down
3 changes: 1 addition & 2 deletions src/Validator/Constraints/ValidPhpcrOdm.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
/**
* Constraint for the Valid PHPCR ODM validator.
*
* @Annotation
*
* @author Emmanuel Vella <vella.emmanuel@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class ValidPhpcrOdm extends Constraint
{
public string $message = 'This value should not be blank.';
Expand Down
Loading