Skip to content
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

Removing LegacyPropertyManagementTrait from Changelog class #388

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Feb 14, 2025

User description

This is the documentation PR for joomla/joomla-cms#44897


PR Type

Documentation


Description

  • Documented the removal of LegacyPropertyManagementTrait from Changelog class.

  • Explained changes to property access in Changelog class.

  • Highlighted the deprecation and replacement of the ->get() method.


Changes walkthrough 📝

Relevant files
Documentation
removed-backward-incompatibility.md
Documented changes to `Changelog` class in Joomla 6.0       

migrations/54-60/removed-backward-incompatibility.md

  • Added documentation for changes in Changelog class.
  • Explained removal of LegacyPropertyManagementTrait.
  • Described new public property access approach.
  • +4/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link
    Contributor

    Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Add migration code examples

    Add specific code examples showing how to migrate from the old ->get() method to
    the new direct property access pattern to help developers update their code.

    migrations/54-60/removed-backward-incompatibility.md [174]

     - Description: The `Changelog` class was entirely depending on the `LegacyPropertyManagementTrait` and its `->get()` method. This is problematic because the `->get()` method circumvents the complete access protection in PHP and the trait itself is deprecated. In Joomla 6.0 the properties of the class have been mostly changed to public and can be accessed directly and the trait has been removed.
     
    +Example migration:
    +```php
    +// Old code
    +$value = $changelog->get('propertyName');
    +
    +// New code 
    +$value = $changelog->propertyName;
    +```
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    __

    Why: Adding concrete migration examples would significantly improve the documentation by making it clearer how developers should update their code from using the deprecated ->get() method to the new direct property access pattern.

    Medium

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant