Skip to content

[6.0] Changelog: Removing LegacyPropertyManagementTrait #44897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 6.0-dev
Choose a base branch
from

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Feb 13, 2025

Summary of Changes

The Joomla\CMS\Changelog\Changelog class uses the LegacyPropertyManagementTrait, 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)

<changelogs>
	<changelog>
		<element>pkg_ru-RU</element>
		<type>package</type>
		<version>5.2.2.1</version>
		<security>
			<item>Item A</item>
			<item><![CDATA[<h2>You MUST replace this file</h2>]]></item>
		</security>
		<fix>
			<item>Item A</item>
			<item>Item b</item>
		</fix>
	</changelog>
</changelogs>

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 the changelog 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:

@Hackwar Hackwar added the b/c break This item changes the behavior in an incompatible why. HEADS UP label Feb 13, 2025
@Hackwar Hackwar marked this pull request as ready for review February 14, 2025 16:19
@exlemor
Copy link

exlemor commented Jun 16, 2025

I have tested this item ✅ successfully on c1f60f1

I have tested this successfully.

NOT sure if this important but during my testing I tried Enabling (and disabling) Log Everything through different testing cycles in the Global Configuration and WHEN it is enabled, the Changelog button does not show because it seems that something removes the data in the Changelogurl column in the __updates table... - Just thought you would want to know in case that wasn't normal.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44897.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b/c break This item changes the behavior in an incompatible why. HEADS UP PR-6.0-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants