Open
Description
This issue is automatically created based on existing pull request: #38115: Set default PHP_CodeSniffer configuration
Description
When running vendor/bin/phpcs
(or vendor/bin/phpcbf
) without any arguments, and error is shown. When running vendor/bin/phpcs
on a specific file, the "wrong" standard is applied. This pull request sets the "correct" defaults for PHP_CodeSniffer so that both of these scenarios work as expected - ie, that they scan the expected files with the Magento2Framework
standard.
See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file
Manual testing scenarios
- Run
vendor/bin/phpcs
without any arguments. - Run
vendor/bin/phpcs app/bootstrap.php
- Compare with
vendor/bin/phpcs --standard=Magento2Framework app/bootstrap.php
- Compare with
Contribution checklist
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it