magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.29k forks source link

[Issue] Set default PHP_CodeSniffer configuration #38122

Open m2-assistant[bot] opened 11 months ago

m2-assistant[bot] commented 11 months ago

This issue is automatically created based on existing pull request: magento/magento2#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

  1. Run vendor/bin/phpcs without any arguments.
  2. Run vendor/bin/phpcs app/bootstrap.php
    • Compare with vendor/bin/phpcs --standard=Magento2Framework app/bootstrap.php

Contribution checklist

m2-assistant[bot] commented 11 months ago

Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Hotel commented 11 months ago

Hello @fredden,

Thanks for the report and collaboration!

We have tried to reproduce the issue in the Magento 2.4-develop instance and it seems the issue reproducible for us. Please have a look our findings on this issue:

image

Hence confirming the issue.

Thanks

github-jira-sync-bot commented 11 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9842 is successfully created for this GitHub issue.

m2-assistant[bot] commented 11 months ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.