Skip to content

Commit

Permalink
Merge pull request #243 from joomla/view/db
Browse files Browse the repository at this point in the history
Chapter about removed db view properties
  • Loading branch information
HLeithner authored Nov 2, 2024
2 parents addcf82 + 3346a19 commit 260f79b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions migrations/54-60/removed-backward-incompatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
- 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;
}
```

0 comments on commit 260f79b

Please sign in to comment.