Skip to content

Remove PHP assert() function from list of forbidden functions  #489

@oleksii-lisovyi

Description

@oleksii-lisovyi

Description

AFAIK starting from PHP 8.0 the main security issue of assert() function implementation is removed. Thus given the minimum PHP requirement version for the Coding Standards is 8.1 the function should be removed from the list of the forbidden functions.

Expected behavior

No error The use of function assert() is forbidden is shown when checking the standards on Magento code.

Benefits

The function usage is allowed which provides reducing of boilerplate in code base.

Additional information

I'm not a security expert, so I might be wrong on the topic.

Activity

m2-assistant

m2-assistant commented on Jan 1, 2025

@m2-assistant

Hi @oleksii-lisovyi. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @oleksii-lisovyi

        Issue actions

          Remove PHP `assert()` function from list of forbidden functions · Issue #489 · magento/magento-coding-standard