Repository navigation
Rename Property/PropertyConfig `name` field to `key`
Pre-release
Pre-release
Summary: Rename Property/PropertyConfig name field to key
Date: 2026-01-03
Branch: improv/dev/propertyFieldNameRenamingToKey
Overview
Renamed the name field to key in Property and PropertyConfig attributes for better semantic clarity. The field represents the raw data key, not the property name.
Changes Made
1. Attribute Classes
| File | Change |
|---|---|
src/Attribute/Property.php |
$name → $key |
src/Attribute/PropertyConfig.php |
$name → $key |
2. Loader Updates
| File | Methods Updated |
|---|---|
src/Loader/Loader.php |
getPropertyNameMapping(), mergePropertyConfig() |
3. Test Files
Updated 14 test files to use Property(key: instead of Property(name::
- Unit test fixtures (4 files)
- Integration test fixtures (10 files)
4. Documentation
Updated 9 documentation files:
docs/attributes/Property.md- Parameter table and examplesdocs/attributes/PropertyConfig.md- Parameter tabledocs/attributes/MultiPropDataSource.mddocs/attributes/SkipAllProperties.mddocs/classes/Hydrator.mddocs/concepts/AttributeCascading.mddocs/concepts/ExpressionLanguage.mdEXAMPLE.mdREADME.md
Note: Historical documentation in docs/history/ was preserved unchanged.
Test Results
PHPUnit 11.5.46
Time: 00:00.927
Tests: 344, Assertions: 811, Skipped: 3
OK
Breaking Change
This is a breaking change. Users must update their code:
// Before
#[Property(name: 'first_name')]
// After
#[Property(key: 'first_name')]