Domanda

Quando eseguo compositore.phar install tutto sembra bello:

→ sudo php composer.phar install

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for FOS\JsRoutingBundle into web/bundles/fosjsrouting
etc etc
.

Ma ora, voglio installare questo pacchetto: https://github.com/knplabs/knppaginatorbunddle da https://packagist.org/packages/knplabs/knp-paginator-bundle

Quindi aggiorno il file compositore.json con la nuova richiesta di richiesta.

{
"require": {
    "knplabs/knp-paginator-bundle": "v2.1"
}
.

}

(Ho provato ogni versione di Paginator dal pappellissimo e ancora lo stesso errore)

Allora provo ad installarlo:

→ sudo php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/framework-standard-edition 2.1.x-dev -> satisfiable by symfony/framework-standard-edition[2.1.x-dev].
    - symfony/framework-standard-edition 2.1.x-dev requires knplabs/knp-paginator-bundle v2.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
.

E la linea Symfony2 del mio attuale compositore.json:

    "require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.1.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",

"symfony/symfony": "2.1.x-dev" did not help
.

Cosa dovrei fare per favore?

È stato utile?

Soluzione 2

Dopo ore ho finalmente trovato la soluzione!

Non so se le mie dipendenze del mio compositore.json non sono in qualche modo nella forma migliore ma ciò che ha risolto il mio problema aggiornando e installando solo i pacchetti richiesti!

woooot ???Cosa ho appena detto ???Sì, solo i pacchetti richiesti così ...

sudo php composer.phar require 
.

Allora trova semplicemente il pacchetto dei tuoi desideri di compositore Cool cerca da https://packagist.org . Scegli il numero dall'elenco e riempire la versione.

Scaricherà il pacchetto, Aggiorna i file composer.json e compositore.lock :)

Spero che questa risposta aiuterà qualcuno!

Altri suggerimenti

Dovresti eseguire questo comando nella directory del progetto:

php composer.phar update
.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top