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

Conversation

vcanales
Copy link
Contributor

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 added 5 commits December 12, 2023 11:20
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.
@vcanales vcanales force-pushed the automatically-add-strict-types branch from 519f554 to 4642115 Compare December 12, 2023 14:50
@vcanales vcanales force-pushed the automatically-add-strict-types branch from 93d74a1 to 93cc4b9 Compare December 12, 2023 15:05
@vcanales vcanales force-pushed the automatically-add-strict-types branch from 93cc4b9 to 237f294 Compare December 12, 2023 15:09
Copy link
Contributor

We've found some PHP files that don't have strict types. This commit adds them. Branch: add-strict-types-6150c21c0aa5b037c7d0cccf5ece2284bacdbd03

Copy link
Contributor

We've found some PHP files that don't have strict types. This commit adds them. Branch: add-strict-types-32ab06cbe1c614d546c550854c8f39837e089cf2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant