joomla/coding-standards

Cannot install from Readme for dev branch

gruz opened this issue · 4 comments

gruz commented

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"
    }

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
{
    "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.

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.

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.