pronchev 3f7e80e03f Validate Embedded and EmbeddedList attributes in EntityMap
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>
2026-05-02 03:44:41 +03:00
2026-03-22 02:40:42 +03:00
2026-04-06 15:43:45 +03:00
2026-05-01 02:54:09 +03:00

🌲 Pinecore

Минимальный PHP-фреймворк для долгоживущих воркеров.

Установка

composer require pronchev/pinecore

Документация

docs/README.md — индекс базы знаний: архитектура, HTTP-слой, worker, ORM, auth, console.

Требования

PHP 8.2+, расширение mongodb.

Лицензия

MIT

Description
No description provided
Readme 388 KiB
Languages
PHP 99.8%
Dockerfile 0.2%