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