dereuromark / cakephp-queue

Queue plugin for CakePHP - simple, pure PHP and without dependencies.
MIT License
306 stars 137 forks source link

Seeds path `dereuromark/cakephp-queue/config/Seeds` does not exist and cannot be created because `debug` is disabled. #348

Closed challgren closed 1 year ago

challgren commented 1 year ago

Using the following configurations

CakePHP version 4.4.8 Dereuromark/CakePHP Queue 6.5.0 cakephp/migrations 3.6.1 robmorgan/phinx 0.12.13 debug = false

The following error occurs when running bin/cake migrations migrate -p Queue

2022-12-09 21:04:39 error: [RuntimeException] Seeds path `/var/www/html/vendor/dereuromark/cakephp-queue/config/Seeds` does not exist and cannot be created because `debug` is disabled. in /var/www/html/vendor/cakephp/migrations/src/ConfigurationTrait.php on line 98
Stack Trace:
- /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/AbstractCommand.php:121
- /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php:66
- /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php:64
- /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php:37
- /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php:85
- /var/www/html/vendor/symfony/console/Command/Command.php:312
- /var/www/html/vendor/symfony/console/Application.php:1020
- /var/www/html/vendor/symfony/console/Application.php:312
- /var/www/html/vendor/symfony/console/Application.php:168
- /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php:126
- /var/www/html/vendor/cakephp/cakephp/src/Console/BaseCommand.php:189
- /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php:198
- /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
- /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
- /var/www/html/bin/cake.php:16

2022-12-09 21:04:39 alert: Throwable: RuntimeException
2022-12-09 21:04:39 alert: A throwable: Seeds path `/var/www/html/vendor/dereuromark/cakephp-queue/config/Seeds` does not exist and cannot be created because `debug` is disabled.
2022-12-09 21:04:39 alert: Trace: #0 /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/AbstractCommand.php(121): Migrations\Command\Phinx\Migrate->getConfig()
#1 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(66): Phinx\Console\Command\AbstractCommand->bootstrap(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(64): Migrations\Command\Phinx\Migrate->bootstrap(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate->parentExecute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/vendor/symfony/console/Command/Command.php(312): Migrations\Command\Phinx\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/vendor/symfony/console/Application.php(1020): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/vendor/symfony/console/Application.php(312): Symfony\Component\Console\Application->doRunCommand(Object(Migrations\Command\Phinx\Migrate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/vendor/cakephp/cakephp/src/Console/BaseCommand.php(189): Migrations\Command\MigrationsCommand->execute(Object(Cake\Console\Arguments), Object(Cake\Console\ConsoleIo))
#11 /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run(Array, Object(Cake\Console\ConsoleIo))
#12 /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Migrations\Command\MigrationsCommand->run(Array, Object(Cake\Console\ConsoleIo))
#13 /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand(Object(Migrations\Command\MigrationsMigrateCommand), Array, Object(Cake\Console\ConsoleIo))
#14 /var/www/html/bin/cake.php(16): Cake\Console\CommandRunner->run(Array)
#15 {main}
[RuntimeException] Seeds path `/var/www/html/vendor/dereuromark/cakephp-queue/config/Seeds` does not exist and cannot be created because `debug` is disabled. in /var/www/html/vendor/cakephp/migrations/src/ConfigurationTrait.php on line 98

Stack Trace:

#0 /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/AbstractCommand.php(121): Migrations\Command\Phinx\Migrate->getConfig()
#1 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(66): Phinx\Console\Command\AbstractCommand->bootstrap(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(64): Migrations\Command\Phinx\Migrate->bootstrap(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate->parentExecute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/vendor/symfony/console/Command/Command.php(312): Migrations\Command\Phinx\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/vendor/symfony/console/Application.php(1020): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/vendor/symfony/console/Application.php(312): Symfony\Component\Console\Application->doRunCommand(Object(Migrations\Command\Phinx\Migrate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/vendor/cakephp/cakephp/src/Console/BaseCommand.php(189): Migrations\Command\MigrationsCommand->execute(Object(Cake\Console\Arguments), Object(Cake\Console\ConsoleIo))
#11 /var/www/html/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run(Array, Object(Cake\Console\ConsoleIo))
#12 /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Migrations\Command\MigrationsCommand->run(Array, Object(Cake\Console\ConsoleIo))
#13 /var/www/html/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand(Object(Migrations\Command\MigrationsMigrateCommand), Array, Object(Cake\Console\ConsoleIo))
#14 /var/www/html/bin/cake.php(16): Cake\Console\CommandRunner->run(Array)
#15 {main}
challgren commented 1 year ago

Can also confirm this is happening with cakephp/migrations 3.7.0 and robmorgan/phinx 0.13.3

dereuromark commented 1 year ago

Why is debug disabled locally? And why inside this repo? Usually you create them on project level

challgren commented 1 year ago

This is happening in production with debug disabled.

dereuromark commented 1 year ago

What are you doing? You should be doing anything with that path outside of development, and not even then inside plugin

challgren commented 1 year ago

My app is booting, part of the boot process is to run migrations with debug off. Ever since 3.6.1 cakephp/migrations config/Seeds directory is required. So when I run your migrations on production it errors out because the seeds directory doesn't exist.

challgren commented 1 year ago

You commented on the upstream changes https://github.com/cakephp/migrations/pull/584#pullrequestreview-1159710155

dereuromark commented 1 year ago

Yeah, thats a migrations Bug Nothing we need to solve inside plugins