Migration Guide: 9.8.2 → 9.8.3
Version 9.8.3 fixes how the ORM handles null values in queries. It also includes internal code cleanup and security improvements to reduce the risk of SQL injection.
Summary
Added
- This migration guide.
Changed
- ORM conditions with a
nullvalue now generateIS NULLinstead of= null. - Internal code cleanup and security improvements to reduce the risk of SQL injection.
Removed
- Nothing removed.
Impact on Existing Projects
- No changes to existing
wherecalls are required. - Queries that use
nullconditions now correctly match rows where the column isNULL. Results may differ from 9.8.2 if an application relied on the previous, incorrect query behavior. - No configuration changes required.
- No database changes required.
- No CLI changes required.
For example, this ORM condition:
$list = Tag::where(['id_parent' => null]);
Previously generated SQL equivalent to:
SELECT * FROM `tag` WHERE `id_parent` = null;
Starting with 9.8.3, it generates:
SELECT * FROM `tag` WHERE `id_parent` IS NULL;
Purpose of This Update
This release aims to:
- Correct ORM query generation for
nullvalues. - Improve internal code quality and reduce SQL injection risk.
Backward Compatibility
The ORM API remains compatible. Query behavior changes for null conditions so that they correctly match SQL NULL values. Review any application-specific workaround for the previous behavior.
Developer Action Required
No action is required for typical applications. If your application worked around the previous null query behavior, review that workaround after upgrading.
Notes
No database migration is required.