2015-07-14 13 views
6

L'app CakePHP 3 funziona correttamente sul mio server locale. Ma quando lo installo su Heroku, continuo a ricevere il seguente errore:Errore CakePHP 3: L'applicazione sta tentando di caricare un file dal plug-in DebugKit

Error: The application is trying to load a file from the DebugKit plugin. Make sure your plugin DebugKit is in the /app/plugins/ directory and was loaded.

Sono confuso perché ho già fatto composer install, e vedo debug_kit nel vendor/cakephp/debug_kit ma l'errore sembra essere alla ricerca in un altro directory dei plugin.

Perché sta succedendo?

Aggiornamento: Mi sono imbattuto composer install --verbose e vedo il seguente errore:

$ composer install --verbose Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Analyzed 91 packages to resolve dependencies Analyzed 165 rules to resolve dependencies Nothing to install or update Generating autoload files

post-autoload-dump: Cake\Composer\Installer\PluginInstaller::postAutoloadDump post-install-cmd: App\Console\Installer::postInstall

Script App\Console\Installer::postInstall handling the post-install-cmd event terminated with an exception 



    [InvalidArgumentException]        
    Maximum number of attempts must be a positive value. 



Exception trace: 
() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Question/Question.php:191 
Symfony\Component\Console\Question\Question->setMaxAttempts() at phar:///app/.heroku/php/bin/composer/src/Composer/IO/ConsoleIO.php:246 
Composer\IO\ConsoleIO->askAndValidate() at /app/src/Console/Installer.php:55 
App\Console\Installer::postInstall() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:211 
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:167 
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:92 
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///app/.heroku/php/bin/composer/src/Composer/Installer.php:342 
Composer\Installer->run() at phar:///app/.heroku/php/bin/composer/src/Composer/Command/InstallCommand.php:131 
Composer\Command\InstallCommand->execute() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 
Symfony\Component\Console\Command\Command->run() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874 
Symfony\Component\Console\Application->doRunCommand() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195 
Symfony\Component\Console\Application->doRun() at phar:///app/.heroku/php/bin/composer/src/Composer/Console/Application.php:146 
Composer\Console\Application->doRun() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126 
Symfony\Component\Console\Application->run() at phar:///app/.heroku/php/bin/composer/src/Composer/Console/Application.php:82 
Composer\Console\Application->run() at phar:///app/.heroku/php/bin/composer/bin/composer:43 
require() at /app/.heroku/php/bin/composer:25 


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN] 

appare l'errore provenire da Symfony

risposta

1

mi sono imbattuto in una volta e credo Ho risolto il problema sostituendo App\Console\Installer con una versione più recente.

Questo commit che risolve risale a questo problema: https://github.com/cakephp/app/issues/241

(Si potrebbe cogliere l'occasione per aggiornare altri file nella vostra applicazione che è venuto dal modello.)

+0

Grazie! Qual è il modo più efficiente per aggiornare i file, come consigliato? Sembra che CakePHP sia ancora su v3.0 quindi 'compositore update' non funzionerà correttamente? – emersonthis

+0

Btw ... Ho aggiornato 'App \ Console \ Installer' e ora' install installer' viene eseguito senza errori. Ma stranamente, l'errore DebugKit è ancora lì. :-( – emersonthis

+0

Sfortunatamente si tratta di un processo manuale di sovrascrittura di tutti i file esistenti e passaggio manuale di ogni modifica (usare 'git add --patch' per aiutare con questo). Per quanto riguarda l'errore, l'esecuzione di' composer dump-autoload' dovrebbe aggiornarsi ' vendor/cakephp-plugins.php' con il percorso corretto del plugin – deizel

Problemi correlati