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

Forbid using certain functions and classes #57738

Merged
merged 37 commits into from
Jan 31, 2024

Commits on Jan 30, 2024

  1. Add a new property to the PHPCS sniff.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    0005ff9 View commit details
    Browse the repository at this point in the history
  2. Commit WIP.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    7d473cd View commit details
    Browse the repository at this point in the history
  3. Commit WIP.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    efa3918 View commit details
    Browse the repository at this point in the history
  4. Commit WIP.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    abaad87 View commit details
    Browse the repository at this point in the history
  5. Implement processing function calls.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    1a92b2b View commit details
    Browse the repository at this point in the history
  6. Implement the ValidBlockLibraryFunctionNameSniff::processFunctionCall…

    …Token method.
    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    01dc9c9 View commit details
    Browse the repository at this point in the history
  7. Add the disallowed_function_calls property to phpcs.xml.dist.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f176d57 View commit details
    Browse the repository at this point in the history
  8. Improve the error message.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    4c32ad6 View commit details
    Browse the repository at this point in the history
  9. Rename the method to better refelct its purpose.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    0056957 View commit details
    Browse the repository at this point in the history
  10. Move the changes to a new sniff.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    be64f5c View commit details
    Browse the repository at this point in the history
  11. Update the phpcs.xml.dist file.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c949041 View commit details
    Browse the repository at this point in the history
  12. Fix error.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    8b262af View commit details
    Browse the repository at this point in the history
  13. Fix property name.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    e7e5a1e View commit details
    Browse the repository at this point in the history
  14. Fix the sniff.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5a0a63d View commit details
    Browse the repository at this point in the history
  15. Fix the config.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    8e64c08 View commit details
    Browse the repository at this point in the history
  16. Remove redundnat code.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    3dbd5a8 View commit details
    Browse the repository at this point in the history
  17. Refactor the sniff, add descriptions.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    66cc48f View commit details
    Browse the repository at this point in the history
  18. Fix doc blocks.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    b8e4742 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    dde1e6d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5d9b80e View commit details
    Browse the repository at this point in the history
  21. Rename Restricted to Forbidden as forbidden is a better description o…

    …f this sniff.
    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f1cf5bd View commit details
    Browse the repository at this point in the history
  22. Rename properties.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f10aee5 View commit details
    Browse the repository at this point in the history
  23. Rename properties.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9ff2764 View commit details
    Browse the repository at this point in the history
  24. Fix typo.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    829310d View commit details
    Browse the repository at this point in the history
  25. Change error codes.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    1047a39 View commit details
    Browse the repository at this point in the history
  26. Teach the sniff not to flag guarded and, therefore, legitimate uses o…

    …f functions/classes.
    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c0437fc View commit details
    Browse the repository at this point in the history
  27. Improve checks for guarded functions/classes.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    4cd7b18 View commit details
    Browse the repository at this point in the history
  28. Better explanation + fix code style.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    539406c View commit details
    Browse the repository at this point in the history
  29. Add phpcs:ignore statements.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9b590f8 View commit details
    Browse the repository at this point in the history
  30. Refactor the code so that the sniff doesn't flag it.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c1ebd27 View commit details
    Browse the repository at this point in the history
  31. Fix typo.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    6bfd934 View commit details
    Browse the repository at this point in the history
  32. Fix code style.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    588a094 View commit details
    Browse the repository at this point in the history
  33. Fix typo.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9cd966d View commit details
    Browse the repository at this point in the history
  34. Add unit tests.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    ae6a161 View commit details
    Browse the repository at this point in the history
  35. Fallback to isset().

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    8249699 View commit details
    Browse the repository at this point in the history
  36. Improve the regular expression.

    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    0c8ef69 View commit details
    Browse the repository at this point in the history
  37. Move the exclude pattern statements to the phpcs.xml.dist file to a…

    …void cluttering the code with `phpcs:ignore` statements.
    anton-vlasenko authored and Anton Vlasenko committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    255e3ed View commit details
    Browse the repository at this point in the history