Skip to content

Not able to add magento 2 standard #203

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

Closed
hkvega01 opened this issue Feb 15, 2021 · 1 comment
Closed

Not able to add magento 2 standard #203

hkvega01 opened this issue Feb 15, 2021 · 1 comment
Labels
bug Something isn't working Progress: done

Comments

@hkvega01
Copy link

Preconditions

  1. magento 2.3 existing project
  2. codesniff already installed
  3. vendor/magento/magento-coding-standard installed

Steps to reproduce

  1. add "scripts": {
    "post-install-cmd": [
    "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
    ],
    "post-update-cmd": [
    "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
    ]
    } into composer.json
  2. type vendor/bin/phpcs -i only see he installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend

Expected result

  1. see magento 2 in above command

Actual result

  1. magento 2 standard not included

Did i add the script correctly?

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.2.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.3.4",
        "composer/composer": "@alpha",
        "magento/module-bundle-sample-data": "100.3.*",
        "magento/module-customer-sample-data": "100.3.*",
        "magento/module-sales-sample-data": "100.3.*",
        "magento/module-catalog-sample-data": "100.3.*",
        "magento/module-cms-sample-data": "100.3.*",
        "magento/module-theme-sample-data": "100.3.*",
        "magento/module-widget-sample-data": "100.3.*",
        "magento/module-downloadable-sample-data": "100.3.*",
        "magento/module-wishlist-sample-data": "100.3.*",
        "magento/module-review-sample-data": "100.3.*",
        "magento/module-tax-sample-data": "100.3.*",
        "magento/module-catalog-rule-sample-data": "100.3.*",
        "magento/module-msrp-sample-data": "100.3.*",
        "magento/module-configurable-sample-data": "100.3.*",
        "magento/module-product-links-sample-data": "100.3.*",
        "magento/module-grouped-product-sample-data": "100.3.*",
        "magento/module-sales-rule-sample-data": "100.3.*",
        "magento/module-offline-shipping-sample-data": "100.3.*",
        "magento/module-swatches-sample-data": "100.3.*",
        "magento/sample-data-media": "100.3.*",
        "dvdoug/boxpacker": "^3.4",
        "zendframework/zend-mail": "^2.9.0",
        "cloudflare/cloudflare-magento": "^1.1",
        "cweagans/composer-patches": "^1.6",
        "smile/elasticsuite": "^2.7.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~6.2.0",
        "squizlabs/php_codesniffer": "3.5.8",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.5.2",
        "friendsofphp/php-cs-fixer": "~2.10.1",
        "lusitanian/oauth": "~0.8.10",
        "sebastian/phpcpd": "~3.0.0",
        "magento/magento-coding-standard": "^6.0"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": [
                "app/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "stable",
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "mcspronko": {
            "type": "vcs",
            "url": "https://github.com/mcspronko/magento-2-ui-component"
        }
    },
    "extra": {
        "magento-force": "override",
        "composer-exit-on-patch-failure": true
    },
    "scripts": {
        "post-install-cmd": [
            "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
        ],
        "post-update-cmd": [
            "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
        ]
    }
}

@hkvega01 hkvega01 added the bug Something isn't working label Feb 15, 2021
@m2-assistant
Copy link

m2-assistant bot commented Feb 15, 2021

Hi @hkvega01. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


magento-devops-reposync-svc pushed a commit that referenced this issue Feb 14, 2023
…o-coding-standard-432

[Imported] Allow class names with 'admin__' prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Progress: done
Projects
None yet
Development

No branches or pull requests

1 participant