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

Cannot install from Readme for dev branch #224

Closed gruz closed 6 years ago

gruz commented 6 years ago

There https://github.com/joomla/coding-standards/tree/3.x-dev you say:

{
    "require-dev": {
        "joomla/coding-standards": "~3.0"
    }
}

It gives an error when composer global update like

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package joomla/coding-standards ^3.0@alpha exists as joomla/coding-standards[2.0.0-alpha, 2.0.0-alpha2, dev-3.x-dev, dev-master, 2.x-dev] but these are rejected by your constraint.

So the composer.json code should be

    "require-dev": {
        "joomla/coding-standards": "dev-3.x-dev"
    }
solracsf commented 6 years ago

As stability of joomla/coding-standards 3.0.0 is currently alpha, make sure you allow usage of alpha software in Composer:

composer property-set minimum-stability "alpha"

gruz commented 6 years ago
{
    "require-dev": {
            "joomla/coding-standards": "~3.0"
    },
    "minimum-stability": "alpha"
}
composer update

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package joomla/coding-standards ~3.0 exists as joomla/coding-standards[2.0.0-alpha, 2.0.0-alpha2, dev-3.x-dev, dev-master, 2.x-dev] but these are rejected by your constraint.
photodude commented 6 years ago

Technically we still have not done an alpha/beta/stable of the PHPCS 3.x version that text is a placeholder

cc/ @mbabker @wilsonge we should get a release of the PHPCS 3.x version completed.

mbabker commented 6 years ago

Branch alias for 3.x should be fixed now so running composer require joomla/coding-standards ~3.0@dev should work correctly. As noted there is not a release tag of 3.x at any stability so you must use dev stability for the branch for the moment.