joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

[alpha] Composer install fails #182

Closed photodude closed 7 years ago

photodude commented 7 years ago

I've been trying to run the alpha install on the Joomla CMS. I added it to the require-dev section of the composer file, and since this is a testing run I've removed the lock file.

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package joomla/coding-standards ~2.0 is satisfiable by joomla/coding-standards[2.0.0-alpha] but these conflict with your requirements or minimum-stability.

seems something is wrong in the composer file setup for the package.

mbabker commented 7 years ago

You need to use ~2.0@alpha as your version constraint. The CMS is set up to by default require stable packages, there isn't a stable 2.0 tag.

photodude commented 7 years ago

Thank you. That worked.

photodude commented 7 years ago

looks like the scripts section is failing to install the standard into the phpcs folder

photodude commented 7 years ago

seems we have the wrong path for the --config-set installed_paths ../../.. in the post install

photodude commented 7 years ago

I've been told I misunderstand how the scripts portion of composer works. Apparently, it only works from a root package. So it works in the context of testing the package but not in the context of installing it as a dependency in a project.

See

We will need to update our documentation on use to explain how to use the phpcs --config-set installed_paths /path/to/joomla-coding-standards