You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently the users are required to configure their standard manually, dealing with decisions that make it hard to go from composer require ... to codding with standard.
Describe the solution you'd like
Instead of recommending that the user be on her own, we should add commands that install what is required for the standard approach to PHPCS on a given framework, library, etc.. The commands will replace the existing docs and we'd need a unified interface to add support for other frameworks.
Describe alternatives you've considered
The current approach was considered, as a lower maintenance, but it pushes the burden to the user. We could be better at it, effectively improving the DX while using ph-pre-commit.
Additional context
None.
The text was updated successfully, but these errors were encountered:
A Proposal for the actual commands and restructuring.
We should add something that facilitates the CLI maintenance. Ideally something in PHP, to keep with the environment (Laravel Zero).
The CLI should include the following commands:
init
Initializes the library fully with a guided aid (interactive) or accepting flags to speedup. This would do the following:
Hook into git hooks or any existing framework for hooks, like Husky
Add the standards base (using templates: WordPress, Laravel)
Build the local folder structure to keep standards local (.php-pre-commit/)
Add command that runs the pre-commit action
run
Executes PHPCS and compares the diffs with support for what exists today.
hook
Adds the run command to the pre-commit hook. Also checks to see if the hook command is running in certain composer scripts to make sure it's always there.
setup
Downloads and activates all the standards that are specified for a given base (WordPress, Laravel).
Is your feature request related to a problem? Please describe.
Currently the users are required to configure their standard manually, dealing with decisions that make it hard to go from
composer require ...
to codding with standard.Describe the solution you'd like
Instead of recommending that the user be on her own, we should add commands that install what is required for the standard approach to PHPCS on a given framework, library, etc.. The commands will replace the existing docs and we'd need a unified interface to add support for other frameworks.
Describe alternatives you've considered
The current approach was considered, as a lower maintenance, but it pushes the burden to the user. We could be better at it, effectively improving the DX while using
ph-pre-commit
.Additional context
None.
The text was updated successfully, but these errors were encountered: