Make your own annotations with Doctrine Annotation

Code
<?php

use Doctrine\Common\Annotations\SimpleAnnotationReader;

class 
Foo
{
    
/**
     * @MyAnnotation(defaultValue="bar")
     */
    
private $bar;
}

/**
 * @Annotation
 */
class MyAnnotation
{
    public 
$defaultValue;
}

$ref = new ReflectionClass('Foo');
$prop $ref->getProperty('bar');

$parser = new SimpleAnnotationReader();
// or getPropertyAnnotations to get all annotations of a property
$myAnnotation $parser
    
->getPropertyAnnotation($prop'MyAnnotation');

echo 
$myAnnotation->defaultValue;
Result
bar
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8