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

Proposal: automatically add strict types #7542

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from

Commits on Dec 12, 2023

  1. Proposal: automatically add strict types

    This PR is an experiment that aims to check if it would be practical to
    automatically add strict types to all PHP files that are missing them.
    Initially, it will add them to _all_ PHP files, but con subsequen runs,
    it'll only affect new files.
    
    The strict types declaration has become a requirement on WordPress.com
    in order to commit new PHP files to the codebase, and solving this
    upstream (eg. on Create Block Theme) might not be the best, since
    prescribing strict types to its broad userbase could prove problematic.
    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    e871433 View commit details
    Browse the repository at this point in the history
  2. use rev-parse

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    4e19957 View commit details
    Browse the repository at this point in the history
  3. Add a comment to avoid PR spam while in dev

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    51ac833 View commit details
    Browse the repository at this point in the history
  4. refactor

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    4a331e9 View commit details
    Browse the repository at this point in the history
  5. try fetching trunk explicitly

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    4642115 View commit details
    Browse the repository at this point in the history
  6. add test php file

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    39ad668 View commit details
    Browse the repository at this point in the history
  7. try to handle grep exit gracefully

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    237f294 View commit details
    Browse the repository at this point in the history
  8. config git user

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    f9a325d View commit details
    Browse the repository at this point in the history
  9. refactor how the declaration is added to the file

    Vicente Canales committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    efc56c6 View commit details
    Browse the repository at this point in the history