Closed Alienpruts closed 8 years ago
This is strange, I just tried this myself on a fresh box and it works fine. There are definitely stable releases as you can see the tags here: https://packagist.org/packages/php-school/learn-you-php. I will try look in to this further later!
Doesn't work for me either
➜ src composer global require php-school/learn-you-php
Changed current directory to Users/user/.composer
[InvalidArgumentException]
Could not find package php-school/learn-you-php at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
could you guys try again? Maybe it was something to do with: https://github.com/php-school/php-workshop/pull/93. If it fails could you try run with -vvv
so we can see if there is anything in the output that might give us a clue.
Still experiencing it
➜ src composer global require php-school/learn-you-php -vvv
Changed current directory to /Users/user/.composer
Reading ./composer.json
Loading config file /Users/user/.composer/config.json
Loading config file /Users/user/.composer/auth.json
Loading config file ./composer.json
Loading config file /Users/user/.composer/auth.json
Checking CA file /private/var/folders/6v/lsqyr9pn6pl5dbt1jp112qdc0000gp/T/composer-cacert-39eaf16e26c08cc90d728865f1c60406ee5d864d5963f72ede2a1cbb127f95ca.pem
Executing command (/Users/user/.composer): git describe --exact-match --tags
Executing command (/Users/user/.composer): git branch --no-color --no-abbrev -v
Executing command (/Users/user/.composer): hg branch
Executing command (/Users/user/.composer): svn info --xml
Reading /Users/user/.composer/vendor/composer/installed.json
The "franzl/studio" plugin requires composer-plugin-api 1.0.0, this *WILL* break in the future and it should be fixed ASAP (require ^1.0 for example).
Loading plugin Studio\Composer\StudioPlugin
Downloading https://packagist.org/packages.json
Writing /Users/user/.composer/cache/repo/https---packagist.org/packages.json into cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2015-04.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2015-07.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2015-10.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-2016-01.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/p-provider-latest.json from cache
Reading /Users/user/.composer/cache/repo/https---packagist.org/provider-php-school$learn-you-php.json from cache
[InvalidArgumentException]
Could not find package php-school/learn-you-php at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Command/InitCommand.php:605
Composer\Command\InitCommand->findBestVersionForPackage() at phar:///usr/local/bin/composer/src/Composer/Command/InitCommand.php:334
Composer\Command\InitCommand->determineRequirements() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:107
Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:167
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Command/GlobalCommand.php:80
Composer\Command\GlobalCommand->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:167
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
could you try clear the cache? composer clear-cache
I'm going to leave you in the capable hands of @pmatseykanets , as I cannot spend time on this issue now :)
Just FTR : my setup is a new Vagrant box : Debian based. Just installed composer globally and then tried installing this package.
Good luck :)
Cleared cache but it did't resolve the issue.
I'm sorry I have no idea what it could be, every where I try it, it works for me :(
@pmatseykanets : what is your setup? Also running Vagrant box or some other kind of virtualization? @AydinHassan : did you ask around for anyone else to try this, perhaps on a fresh install (or using a Virtual Box image)? If so : what OS are you running on the box?
EDIT : ok, I may seem to have found the problem, I thought my vagrant box was PHP 5.6 but actually it is 5.5.9. Could that be the cause? Even so, why would the composer installer complain about minimum stability?
Doesn't work for me either.
[InvalidArgumentException]
Could not find package php-school/learn-you-php at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Command/InitCommand.php:605
Composer\Command\InitCommand->findBestVersionForPackage() at phar:///usr/local/bin/composer/src/Composer/Command/InitCommand.php:334
Composer\Command\InitCommand->determineRequirements() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:108
Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:165
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Command/GlobalCommand.php:80
Composer\Command\GlobalCommand->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:165
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
@Alienpruts That sounds strange, composer will usually warn you if your PHP version is wrong as 5.6 is a specific constraint in the package. And yes I've asked a couple of people to run it and it works, I also tried it on Travis. Could you paste your Vagrant file? Maybe I can have a mess around with that.
@AydinHassan : I do not believe it to be the fault of the box, since on my host machine (Ubuntu) it also fails. Forgot to mention that, sorry :)
We use the Sneakers Vagrant configuration found on https://github.com/openminds/sneakers, engineered by our hosting partners
@Alienpruts Does your host machine have PHP 5.6? I just made some changes to the dependencies, could you maybe try again please?
@AydinHassan nope, host machine has 5.5 installed also. I tried again bit the same result :(
I'll try with a new vagrant box with 5.6 installed, but that'll have to wait : work comes first :)
@Alienpruts can you try running composer install --no-dev
?
@renatomefidf That did not do much :) , also composer require after this install --no-dev = same problem.
@Alienpruts Oh sorry, let's try this if you can: Put this on your composer.json: "php-school/learn-you-php": "^0.2.11"
Than run composer update --no-dev
This is not the right way of installing, but maybe this helps understanding the problem!
@renatomefidf : Hate to dissapoint :) . Still no luck.
However : what I'm doing on my host now is installing the package locally (so without the global option), because ATM I'm at work and my Vagrant sandbox is on my home computer. Should this matter? Removing the global option should install it locally, right?
When I get home, I'll try again and if that fails, I'll try a box with PHP5.6 on, to see if that actually matters.
if composer is saying there is nothing to install it should be already there! What do you have inside vendor/bin?
Hmmm, just tested it on a new Vagrant box with 5.6 installed, worked like a charm there. I propose closing this, since it seems to be related to the PHP version (at least in my case).
Thank you for you help :)
Yeah this is definitely PHP version issue. I tried with composer require php-school/learn-you-php:^0.1
and it gives a better message informing of PHP version constraint. I will update the documentation tonight.
@AydinHassan Yeah it was in fact a php version issue for me too. It's all working now.
Just wanted to comment that I had the same issues in here with "minimum stability" and was able to get it working with upgrading to php 5.6
Cool. I'm going to close this off. Glad it's all working now!
What about tagging your library in git?
git tag v1.0.0 && git push origin --tags
@Herod huh? It is tagged. See: https://github.com/php-school/learn-you-php/releases
The same error I checked my composer.json and I just saw that the terminal path was not good => wrong ==> .../projects right ==> .../projects/App
Thanks guys
Hello,
tried installing the package as per instructions, this could not be done because of warning about minimum required stability of packages via composer.
Ran self-update before trying to install, standard composer install to the best of my knowledge (so no change of minimum stability by me)
Pic :