diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index 79c8361f..59062f20 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -22,7 +22,7 @@ There should be an explanation of how to mitigate the removals / changes. - PR: https://github.com/joomla/joomla-cms/pull/42884 - Description: The class `\Joomla\CMS\Application\BaseApplication` and `\Joomla\CMS\Application\CliApplication` respective CLI input classes have been removed. The CMS core code has been switched to use the Application package of the Joomla Framework. Any reference to these classes should be replaced with the namespace `\Joomla\Application`. Cli apps should be replaced by console plugins. -- + ### UTC is used instead of GMT - PR: https://github.com/joomla/joomla-cms/pull/43912 @@ -31,4 +31,21 @@ There should be an explanation of how to mitigate the removals / changes. ### Removed legacy b/c code in \Joomla\CMS\Date\Date Class - PR: https://github.com/joomla/joomla-cms/pull/43959 -- Description: Removed Date::$gmt and Date::$stz variables and related code. If you extend the \Joomla\CMS\Date\Date class make sure not to depend on them any longer. \ No newline at end of file +- Description: Removed Date::$gmt and Date::$stz variables and related code. If you extend the \Joomla\CMS\Date\Date class make sure not to depend on them any longer. + +### View classes do not have a database reference + +- PR: https://github.com/joomla/joomla-cms/pull/42962 +- Description: In Joomla 3 some views had a reference to the global database instance to check if a date is a special null date (0000-00-00 00:00:00). Since Joomla 4 all these dates are real null values and the database check is not used anymore. If there are some old template overrides in place with these checks, they can be removed. + +```php +// Old: +if ($this->item->created !== $this->db->getNullDate()) { + echo $this->item->created; +} + +// New: +if ($this->item->created !== null) { + echo $this->item->created; +} +```