2.4.0
This release brings a lot of focus code-sense and hinting. If you are using modern PHP IDE, you will feel benefit of autocompletion almost everywhere.
Magical hintable fields
The hintable support is another major game changer in sense of cleaness and maintainability. Annotate model fields and used them magically as a real properties.
Usage
add Model class phpdoc:
/**
* @property string $name @Atk4\Field()
* @property int $age @Atk4\Field()
* @property Standard $mother @Atk4\RefOne()
*/
class X extends Model
{ ...
Use the properties either as standard value property:
$model->age // instead of $model->get('age')
$model->age = 25 // instead of $model->set('age', 25)
You will also notice that adding fields in examples is using a different syntax:
$this->addField($this->fieldName()->age); // instead of addField('age');
What’s Changed
- Fix path to /public/ in releases, use CDN (#1619) @mvorisek
- Update release builder (#1616) @mvorisek
- Use RefMany, strict checks relaxed in upstream (#1618) @mvorisek
- Update hintable dep to 1.2.x (#1617) @mvorisek
- Use loadOne for model from one ref (#1615) @mvorisek
- [fix] registerExecutor parameter type (#1613) @ibelar
- Use TraitUtil for trait detection (#1612) @mvorisek
- Use simpler model->getId() where possible (#1609) @mvorisek
- Prefix/test also all ID fields (#1595) @mvorisek
- Use also different actual name (#1593) @mvorisek
- [fix] VirtualPage inside VirtualPage (#1603) @ibelar
- [fix] - Demo Tutorial (#1600) @ibelar
- [fix] - Dropdown cascade (#1599) @ibelar
- Fix for nice captions (adjust for latest atk4/data) (#1594) @mvorisek
- Fix autoload for demos with classmap authoritative (#1585) @mvorisek
- Fix CS/Behat config (#1588) @mvorisek
- [fix] Demo using containsMany (#1586) @ibelar
- Update/Upgrade package dependency (#1572) @dependabot
- Fix for data 819/820 (#1583) @mvorisek
- Callback accepts \Closure only (#1582) @mvorisek
- Improve PHPStan to level 5 (#1581) @mvorisek
- Better hasOne usage (#1579) @mvorisek
- Fix all non-undefined PHPStan ignores 1/2 (#1554) @mvorisek
- Fix App::encodeJson regex backtrack limit issue (#1573) @mvorisek
- Fix strict types in App::getTag() (#1541) @PhilippGrashoff
- [fix] Multiline Typecase (#1571) @ibelar
- [fix] Property access for Modal Executor (#1565) @ibelar
- [fix] ReadMe link (#1566) @ibelar
- [fix] Lookup add condition after model is set (#1558) @ibelar
- Requiring atk4/data is enough (#1557) @mvorisek
- [fix] Card Deck demo (#1552) @ibelar
Breaking Changes
- Feature/Executor refactor (#1550) @ibelar
- [fix] - Js search and popupService (#1604) @ibelar
- [fix] VirtualPage (#1602) @ibelar
- Feature/ Add Lookup to Multiline (#1577) @ibelar