3f7e80e03f2bbc395181be7ea281264360a5dfb0
EntityMap previously accepted #[Embedded] and #[EmbeddedList] blindly:
the embedded class for #[Embedded] was inferred from a raw stringified
property type (so untyped, primitive, nullable, union, or intersection
all flowed through to MongoHydrator and crashed with "Class X not
found" at first document read). #[EmbeddedList(class: ...)] never
checked that the class existed or that the property was actually array.
Validation now runs at metadata-build time (cached per class):
- #[Embedded] requires a single named, existing class type. Nullable
(?Foo) is allowed and resolved to Foo. Primitive, mixed, untyped,
union, and intersection types are rejected.
- #[EmbeddedList] requires the configured class to exist and the
property type to be array (or ?array).
Errors throw \LogicException with {Class}::${property} for fast
localization, matching the existing #[Index] validation style.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🌲 Pinecore
Минимальный PHP-фреймворк для долгоживущих воркеров.
Установка
composer require pronchev/pinecore
Документация
docs/README.md — индекс базы знаний: архитектура, HTTP-слой, worker, ORM, auth, console.
Требования
PHP 8.2+, расширение mongodb.
Лицензия
MIT
Description
Languages
PHP
99.8%
Dockerfile
0.2%