[6.0] Changelog: Removing LegacyPropertyManagementTrait #44897
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The
Joomla\CMS\Changelog\Changelog
class uses theLegacyPropertyManagementTrait
, which is deprecated. The trait is deprecated because it basically disables the whole visibility system of properties in PHP. This PR removes that trait from this class and changes the core code to use the new way this class works.This is a b/c break, since the properties now have been changed from protected to public (remember that the trait was there to directly circumvent that again.) and of course the trait has been removed.
Testing Instructions
Copy the following XML into an XML file of your choosing: (for example changelog.xml)
Put the file somewhere where you could access it via a URL, for example simply in the root of the site you are testing this on.
Install a random outdated extension, for example a language pack and then go into the database into the
#__updates
table and edit thechangelog
column of the installed extension (e.g. the language pack) and insert the URL to the XML file into it.Go to the update view in the backend and click on the changelog button next to the available update.
Actual result BEFORE applying this Pull Request
You get a view of the changelog.
Expected result AFTER applying this Pull Request
You still get a view of the changelog, but the class behind it has been refactored to not use the outdated code.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org: Removing LegacyPropertyManagementTrait from Changelog class Manual#388
No documentation changes for manual.joomla.org needed