Skip to content
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

Can't install coding-standards per README #215

Open
N6REJ opened this issue Dec 25, 2017 · 5 comments
Open

Can't install coding-standards per README #215

N6REJ opened this issue Dec 25, 2017 · 5 comments

Comments

@N6REJ
Copy link

N6REJ commented Dec 25, 2017

Ok, what have I done wrong?
image

@photodude
Copy link
Contributor

It's due to the current release being listed as alpha

The command line is modified as per the instructions note on " make sure you allow usage of alpha software in Composer: "

composer property-set minimum-stability "alpha"

Then it should work
you may need to do the following as well.

composer require joomla/coding-standards "~2.0@alpha"

Once we solve #206 we should be ready to have a stable release

@N6REJ
Copy link
Author

N6REJ commented Dec 27, 2017

ok, it ran that time but it made a folder called "vendor" in the root www folder which is not where it should be. Things are a mess now :(

@photodude
Copy link
Contributor

photodude commented Dec 27, 2017

See composer documentation on how to set the path for installing a package.
https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md

Note: I haven't done this... This is just my general understanding of the process, I have very little personal experience in using composer this way.

for my local setup I installed PHPCS via PEAR and just downloaded the git zip of our coding standard and in a folder and told PHPCS where that folder is as per the readme instruction here (or in the PHPCS wiki)

@N6REJ
Copy link
Author

N6REJ commented Dec 27, 2017

ok, got it MOSTLY.. a couple of changes were required..
#1 had to change composer.bat to
SET COMPOSER_HOME=%~dp0
@php "%~dp0composer.phar" %*

#2 run the following
composer global config minimum-stability alpha
composer global require squizlabs/php_codesniffer "~2.8"
composer global require joomla/coding-standards "~2.0@alpha"

#3 point nb to "C:\neard\tools\composer\composer1.4.2\vendor\squizlabs\php_codesniffer\scripts\phpcs"

However the joomla coding standard does not appear.

@photodude
Copy link
Contributor

it should install in the vendor/joomla folder, you can tel PHPCS where that is with something like the following. (this installs the Joomla standard and the example rulesets, make sure you put your paths in).

vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards,vendor/joomla/coding-standards/Joomla/ExampleRulesets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants