Closed szepeviktor closed 6 years ago
Hi! 👋 This package doesn't have any non-dev dependencies, unless you mean that it's not being installed correctly. I just tried creating a test project, which you can see below, and the package installed. Am I misunderstanding the problem?
$ cat composer.json
{
"name": "payton/testpns",
"type": "project",
"license": "MIT",
"require": {
"automattic/phpcs-neutron-standard": "*"
}
}
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing automattic/phpcs-neutron-standard (v1.1.0)
Loading from cache
Writing lock file
Generating autoload files
Hello @sirbrillig !
Thank you for your reply. I mean we have a lot of dependencies: https://github.com/Automattic/phpcs-neutron-standard/blob/master/composer.json#L18-L24
and as composer's help says:
--dev Enables installation of require-dev packages (enabled by default, only present for BC).
So why require-dev
-s are not installed?
Ah! I see the confusion. Dev dependencies are only installed when composer is run on the package itself (the root package), not another project which depends on the package. You can read about how composer treats require-dev
here.
To put it another way, the following will install the dev dependencies:
git clone https://github.com/Automattic/phpcs-neutron-standard
cd phpcs-neutron-standard
composer install
Thank you for pointing that out! Is there a way to install phpcs-neutron-standard with 1 command?
Yes :)
composer create-project automattic/phpcs-neutron-standard
Could it be that with this composer.json dependencies are not installed?
composer update