mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
26 lines
598 B
PHP
26 lines
598 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
|
|
|
|
use Symfony\Component\Validator\Constraint;
|
|
|
|
#[\Attribute(\Attribute::TARGET_CLASS)]
|
|
class ConfidentialCourseMustHaveReferrer extends Constraint
|
|
{
|
|
public string $message = 'A confidential parcours must have a referrer';
|
|
|
|
public function getTargets()
|
|
{
|
|
return [self::CLASS_CONSTRAINT];
|
|
}
|
|
}
|