Repository navigation
Labels
enhancementNew feature or requestNew feature or request
Description
PHP support
- Require
~8.3.0 || ~8.4.0 || ~8.5.0incomposer.jsonand drop8.2from both CI matrices
Bugs
- Stop
AttributedServiceFactoryfrom treating a config value ofnullas a missing key (isset()→array_key_exists()/offsetExists()) - Throw instead of silently truncating a dot path that continues past a scalar
- Remove the mutable
$originalKeyproperty — shared factory instances make it stateful; pass the key as an argument - Validate in
AttributedRepositoryFactorythat Doctrine returned the requested class, so an entity missingrepositoryClassfails loudly - Guard against an
#[Entity]attribute naming a non-existent class - Fix
findEntityAttribute()/findInjectAttribute()returningobjectwhere?Entity/?Injectis declared
Code quality
- Restrict attribute targets:
#[Entity]toTARGET_CLASS,#[Inject]toTARGET_METHOD(misplacement is currently a silent no-op) - Add
InvalidArgumentException::missingKey()for parity withRuntimeException's static constructors - Replace the hand-rolled attribute loops with
getAttributes(X::class) - Drop the
ignoreErrorsentries fromphpstan.neonby fixing their cause in the tests
Tests
- Cover null config values, paths overshooting a scalar, dot notation on a non-array service,
ArrayAccesstraversal, exact-name precedence over dot resolution, unregistered class instantiation, missing entity, wrong repository class
Documentation
- Add an "Attributes vs. factories" page: comparison, advantages, trade-offs, when to still write a factory
- Add an FAQ page
- Correct the dot-notation description — only the full name and the first segment are resolved from the container, not every segment
- Document
InvalidArgumentException, constructor-less classes, the unregistered-class fallback,ArrayAccesstraversal, only-direct-recursion detection, therepositoryClassrequirement,createObject()vs__invoke() - Fix the unrunnable PHP samples (missing
usestatements) and theSrevicetypos - Update the README: requirements, QA section, un-pin the PHP badge from 1.3.0
- Reformat all Markdown to one sentence per row
Note:
readKeysFromArray()gains a third parameter and the attribute-target change turns silent misuse into a compile-time error —backwardCompatibilityCheckwill flag both.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
Issue #12: Drop PHP 8.2, fix attribute/dot-notation resolution bugs, …
Issue #12: Drop PHP 8.2, fix attribute/dot-notation resolution bugs, …
Issue #12: Drop PHP 8.2, fix attribute/dot-notation resolution bugs, …
Merge pull request #13 from dotkernel/issue-12