Ubuntu, Composer – chybně detekovaná verze PHP
- emil54
- Člen | 19
Dobrý den vespolek,
začínám se trochu šťourat v Nette a dost se mi to líbí. Chtěl jsem si stahnout pár komponent, abych se v tom pořádně zorientoval, ale kolabuju na Composeru (zatím jsem ho nikdy nepoužíval – nebyl důvod).
$ composer require nexendrie/menu:@dev
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json has been updated
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
- nexendrie/menu 1.2.x-dev requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu dev-master requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.2.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.1.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.0.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.3.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.2.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.1.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- Installation request for nexendrie/menu @dev -> satisfiable by nexendrie/menu[0.1.0, 0.2.0, 0.3.0, 1.0.0, 1.1.0, 1.2.0, dev-master, 1.2.x-dev].
Installation failed, reverting ./composer.json to its original content.":null
Nejspíš to dělá ten dementně přilepenej brand Ubuntu u verze PHP.
$ php -v
PHP 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 2 2017 05:56:43) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.9-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
Otázka zní: Je z toho nějaká jednoduchá cesta ven, nebo mám nechat spekulací a nainstalovat ručně poslední verzi PHP?
Předem díky za odpovědi, byť by obsahovaly zmínky o mé demenci… :)
- David Matějka
- Moderator | 6445
ahoj, ve web-projectu je zafixovana verze na 5.6, je to kvuli tomu, ze to zpusobovalo lidem problemy, kdyz meli na locale php 7 a nahrali to treba na hosting se starsim php.
pro tebe tedy bude stacit to z composer.json smazat nebo to prepsat na 7.1
- emil54
- Člen | 19
Čistej skeleton a prvni require
$ composer create-project nette/sandbox
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Installing nette/sandbox (v2.4.6)
- Installing nette/sandbox (v2.4.6)
Loading from cache
Created project in /store1/www/svarec/sandbox
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing nette/tester (v2.0.0)
Loading from cache
...
...
- Installing dg/adminer-custom (v1.9.2)
Loading from cache
tracy/tracy suggests installing https://nette.org/en/donate (Please support Tracy via a donation)
Writing lock file
Generating autoload files
$
Prepsano:
{
"name": "nette/sandbox",
"description": "The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.",
"homepage": "https://nette.org",
"type": "project",
"license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/en/contributors?lang=en"
}
],
"require": {
"php": ">=5.6.0",
"nette/application": "^2.4.4",
"nette/bootstrap": "^2.4.3",
"nette/caching": "^2.5",
"nette/database": "^2.4",
"nette/di": "^2.4",
"nette/finder": "^2.4",
"nette/forms": "^2.4",
"nette/http": "^2.4",
"nette/mail": "^2.4",
"nette/robot-loader": "^2.4 || ^3.0",
"nette/safe-stream": "^2.3",
"nette/security": "^2.4",
"nette/utils": "^2.4",
"latte/latte": "^2.4",
"tracy/tracy": "^2.4",
"dg/adminer-custom": "^1.9"
},
"require-dev": {
"nette/tester": "^2.0"
},
"minimum-stability": "stable",
"config": {
"platform": {
"php": "7.1"
}
}
}
$ composer clear-cache
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Clearing cache (cache-dir): /home/emil/.cache/composer
Clearing cache (cache-files-dir): /home/emil/.cache/composer/files
Clearing cache (cache-repo-dir): /home/emil/.cache/composer/repo
Clearing cache (cache-vcs-dir): /home/emil/.cache/composer/vcs
All caches cleared.
$ composer require nexendrie/menu:@dev
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json has been updated
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
- nexendrie/menu 1.2.x-dev requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu dev-master requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.2.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.1.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 1.0.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.3.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.2.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- nexendrie/menu 0.1.0 requires php >=7.1.0 -> your PHP version (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) overriden by "config.platform.php" version (5.6) does not satisfy that requirement.
- Installation request for nexendrie/menu @dev -> satisfiable by nexendrie/menu[0.1.0, 0.2.0, 0.3.0, 1.0.0, 1.1.0, 1.2.0, dev-master, 1.2.x-dev].
Installation failed, reverting ./composer.json to its original content.
Takze tak
Editoval emil54 (20. 9. 2017 18:19)
- emil54
- Člen | 19
Nainstaloval jsem PHP7.2
$ php -v
PHP 7.2.0RC2 (cli) (built: Sep 18 2017 09:25:29) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0RC2, Copyright (c) 1999-2017, by Zend Technologies
… a vše maká, jak má
$ composer require nexendrie/menu:@dev
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing nexendrie/utils (1.1.0)
Downloading: 100%
- Installing nexendrie/menu (dev-master 44274e4)
Cloning 44274e4ee7c8d1b04db0a40cce71669c02167b3e
Writing lock file
Generating autoload files
Takže to je nejspíš skutečně bug Composeru…
Každopádně díky za váš čas