20250615
* Исправлена ошибка Class "GetOnly" not found.
This commit is contained in:
parent
a58b6f1358
commit
3e199fc460
@ -5,7 +5,7 @@ namespace goodboyalex\php_components_pack\classes;
|
|||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
use Exception;
|
use Exception;
|
||||||
use ReflectionAttribute;
|
use goodboyalex\php_components_pack\attributes\GetOnly;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use ReflectionProperty;
|
use ReflectionProperty;
|
||||||
@ -98,7 +98,7 @@ final class ClassMapper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Получаем список атрибутов у данного свойства
|
// Получаем список атрибутов у данного свойства
|
||||||
$attributes = $reflectionProperty->getAttributes('GetOnly', ReflectionAttribute::IS_INSTANCEOF);
|
$attributes = $reflectionProperty->getAttributes(GetOnly::class);
|
||||||
|
|
||||||
// Возвращаем true, если атрибут найден, иначе false
|
// Возвращаем true, если атрибут найден, иначе false
|
||||||
return !empty($attributes);
|
return !empty($attributes);
|
||||||
|
@ -27,6 +27,7 @@ class ClassMapperTest extends TestCase
|
|||||||
{
|
{
|
||||||
require_once __DIR__ . '/../data/A.php';
|
require_once __DIR__ . '/../data/A.php';
|
||||||
require_once __DIR__ . '/../data/B.php';
|
require_once __DIR__ . '/../data/B.php';
|
||||||
|
require_once __DIR__ . '/../../sources/attributes/GetOnly.php';
|
||||||
require_once __DIR__ . '/../../sources/classes/classMapper.php';
|
require_once __DIR__ . '/../../sources/classes/classMapper.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user