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

Enforce valid function names in the packages/block-library/src/*/*.php files #53438

Merged
merged 49 commits into from
Aug 16, 2023

Commits on Aug 16, 2023

  1. Commit WIP.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    42dd2b5 View commit details
    Browse the repository at this point in the history
  2. Commit WIP.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    d7f7212 View commit details
    Browse the repository at this point in the history
  3. 1. Rename sniff.

    2. Adjust the logic per #52769 (comment).
    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    881a594 View commit details
    Browse the repository at this point in the history
  4. Remove redundant file.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    695e2bf View commit details
    Browse the repository at this point in the history
  5. Fix sniff's name.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    3b650ad View commit details
    Browse the repository at this point in the history
  6. List allowed function names in the error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ce561b1 View commit details
    Browse the repository at this point in the history
  7. 1. Fix doc blocks.

    2. Return early if there are no prefixes.
    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    10eae71 View commit details
    Browse the repository at this point in the history
  8. Fix error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    332f003 View commit details
    Browse the repository at this point in the history
  9. Improve error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8f74d2a View commit details
    Browse the repository at this point in the history
  10. Add the new rule to the phpcs.xml.dist file.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    081259d View commit details
    Browse the repository at this point in the history
  11. Add doing it wrong as dynamic properties are not supported in PHP 8.2…

    … and above.
    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5bdb79e View commit details
    Browse the repository at this point in the history
  12. Improve error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    975187f View commit details
    Browse the repository at this point in the history
  13. Improve error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1563116 View commit details
    Browse the repository at this point in the history
  14. Improve error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c3a6cdc View commit details
    Browse the repository at this point in the history
  15. Ensure that the rule checks all PHP files, not just the index.php files.

    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    2 people authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    addaea8 View commit details
    Browse the repository at this point in the history
  16. Refactor variable names to use lowercase.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8bf5c72 View commit details
    Browse the repository at this point in the history
  17. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ecc45fd View commit details
    Browse the repository at this point in the history
  18. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a3ef82a View commit details
    Browse the repository at this point in the history
  19. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c6029de View commit details
    Browse the repository at this point in the history
  20. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1e54af8 View commit details
    Browse the repository at this point in the history
  21. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a51c0ba View commit details
    Browse the repository at this point in the history
  22. Add exceptions to ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    32c3a27 View commit details
    Browse the repository at this point in the history
  23. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    0ee1871 View commit details
    Browse the repository at this point in the history
  24. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    50dfbcc View commit details
    Browse the repository at this point in the history
  25. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    07a9a15 View commit details
    Browse the repository at this point in the history
  26. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    e276723 View commit details
    Browse the repository at this point in the history
  27. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    4c12e14 View commit details
    Browse the repository at this point in the history
  28. Add exceptions to the ValidBlockLibraryFunctionName rule.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    aed8f1b View commit details
    Browse the repository at this point in the history
  29. Better sanitization of parameters.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    2991293 View commit details
    Browse the repository at this point in the history
  30. Update docblock.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5266d88 View commit details
    Browse the repository at this point in the history
  31. Update changlog.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    deccd15 View commit details
    Browse the repository at this point in the history
  32. Implement a check for edge cases where the function name terminates w…

    …ith an underscore.
    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    6c3135e View commit details
    Browse the repository at this point in the history
  33. Use blockquote instead of double quote in the error message.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    148c47a View commit details
    Browse the repository at this point in the history
  34. Make the sanitize_directory_name method static.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    aa7820f View commit details
    Browse the repository at this point in the history
  35. Update the commment.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8c47356 View commit details
    Browse the repository at this point in the history
  36. Revert adding the phpcs:ignore statements.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    93e42d7 View commit details
    Browse the repository at this point in the history
  37. Add ability to whilelist certain functions.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c28feeb View commit details
    Browse the repository at this point in the history
  38. Revert adding the phpcs:ignore statements.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    fdb738b View commit details
    Browse the repository at this point in the history
  39. Revert adding the phpcs:ignore statements.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b6178b4 View commit details
    Browse the repository at this point in the history
  40. Add the list of allowed functions.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    9076c0d View commit details
    Browse the repository at this point in the history
  41. Fix typo.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b3c9010 View commit details
    Browse the repository at this point in the history
  42. Add comment to php.xml.dist with the reasoning for the list.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    888d82f View commit details
    Browse the repository at this point in the history
  43. Revert the changes as we don't use phpcs:disable statements now.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    62e9c44 View commit details
    Browse the repository at this point in the history
  44. Fix comment.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a4bd446 View commit details
    Browse the repository at this point in the history
  45. Remove redundant code.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a869ff4 View commit details
    Browse the repository at this point in the history
  46. Improve text of the comment.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    523e1ed View commit details
    Browse the repository at this point in the history
  47. Improve text of the comment.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    d1f38ac View commit details
    Browse the repository at this point in the history
  48. Replace "backported" with "consumes" (props @hellofromtonya).

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8ab646f View commit details
    Browse the repository at this point in the history
  49. Remove the last sentence.

    anton-vlasenko authored and Anton Vlasenko committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1c25491 View commit details
    Browse the repository at this point in the history