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

Remove the JPATH_PLATFORM constant #348

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

Remove the JPATH_PLATFORM constant #348

wants to merge 1 commit into from

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Dec 19, 2024

User description

joomla/joomla-cms#44638


PR Type

Documentation


Description

  • Documented the removal of the deprecated JPATH_PLATFORM constant from Joomla core
  • Added migration guide explaining how to replace JPATH_PLATFORM with _JEXEC in bootstrap files
  • Updated backward compatibility documentation with code examples

Changes walkthrough 📝

Relevant files
Documentation
removed-backward-incompatibility.md
Document JPATH_PLATFORM constant deprecation and replacement

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

  • Added documentation about the removal of JPATH_PLATFORM constant
  • Provided code example showing how to replace JPATH_PLATFORM with
    _JEXEC in bootstrap files
  • +13/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant 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
    ⚡ Recommended focus areas for review

    Documentation Accuracy
    Verify that the migration guide accurately reflects all use cases where JPATH_PLATFORM was previously used and ensure the _JEXEC replacement is a complete solution for all scenarios

    Typo
    The word "bootsrapping" contains a typo and should be "bootstrapping"

    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                                                                                                                                    Score
    Security
    Add security context about the importance of entry point validation in PHP files

    Add a note explaining that the _JEXEC constant should be checked before any other
    code execution to prevent direct file access, as this is a critical security
    practice.

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

     // New:
    +// Check for direct file access - must be at the beginning of the file
     \defined('_JEXEC') or die;
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion adds crucial security context about the purpose of the _JEXEC check, which is essential for preventing direct file access attacks. This is particularly important in a migration guide where developers need to understand security implications.

    8

    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