Log message #4190696

# At Username Text
# Jun 25th 2019, 07:48 admad imonsei: 1st step if deciding whether you actually need a new bake task or just a new theme
# Jun 25th 2019, 07:48 imonsei i'm pretty sure i'm thinking about it in the wrong way
# Jun 25th 2019, 07:47 imonsei admad, that's the exact page i'm reading through to try and understand. i'm stuck on how to get the cake bake command to list the foo example. and i feel kinda dense because i spent all day yesterday reading and testing and getting a bit frustrated
# Jun 25th 2019, 07:46 steinkel @madbbb `TableRegistry::getTableLocator()->clear();`
# Jun 25th 2019, 07:44 admad imonsei: you obviously didnt read the link i provided :slightly_smiling_face:
# Jun 25th 2019, 07:44 steinkel *TableLocator
# Jun 25th 2019, 07:44 steinkel I fixed that one before clearing the TableRegistry
# Jun 25th 2019, 07:44 imonsei so i shouldn't place my files for FooTask.php and foo.twig inside my plugin folder, but in the vendor file area?
# Jun 25th 2019, 07:43 steinkel the table class is being configured twice
# Jun 25th 2019, 07:42 slackebot /var/www/html/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main() #19 {main} ``` It is some how related to CakeDC/Users plugin. Any help on debugging is appreciated
# Jun 25th 2019, 07:42 slackebot /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(545): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult)) #16 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(195): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true) #17 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true) #18
# Jun 25th 2019, 07:42 slackebot /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php(698): PHPUnit\Framework\TestCase->runBare() #13 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(894): PHPUnit\Framework\TestResult->run(Object(App\Test\TestCase\Controller\ContactsControllerTest)) #14 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult)) #15
# Jun 25th 2019, 07:42 slackebot Cake\Http\Server->run(Object(Cake\Http\ServerRequest)) #6 /var/www/html/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php(517): Cake\TestSuite\MiddlewareDispatcher->execute(Array) #7 /var/www/html/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php(397): Cake\TestSuite\IntegrationTestCase->_sendRequest('/contacts/add', 'GET') #8 /var/www/html/tests/TestCase/Controller/ContactsControllerTest.php(85):
# Jun 25th 2019, 07:42 slackebot Cake\TestSuite\IntegrationTestCase->get('/contacts/add') #9 [internal function]: App\Test\TestCase\Controller\ContactsControllerTest->testAdd() #10 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(1071): ReflectionMethod->invokeArgs(Object(App\Test\TestCase\Controller\ContactsControllerTest), Array) #11 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(939): PHPUnit\Framework\TestCase->runTest() #12
# Jun 25th 2019, 07:42 slackebot require('/var/www/html/v...') #2 /var/www/html/vendor/cakephp/cakephp/src/Http/BaseApplication.php(161): Cake\Core\BasePlugin->bootstrap(Object(App\Application)) #3 /var/www/html/vendor/cakephp/cakephp/src/Http/Server.php(124): Cake\Http\BaseApplication->pluginBootstrap() #4 /var/www/html/vendor/cakephp/cakephp/src/Http/Server.php(82): Cake\Http\Server->bootstrap() #5 /var/www/html/vendor/cakephp/cakephp/src/TestSuite/MiddlewareDispatcher.php(201):
# Jun 25th 2019, 07:42 madbbb my tests failed after upgrading CakePHP 3.5 to 3.7. got this cryptic error: ``` 1) App\Test\TestCase\Controller\ContactsControllerTest::testAdd Possibly related to RuntimeException: "You cannot configure "Users", it has already been constructed." #0 /var/www/html/vendor/cakedc/users/config/bootstrap.php(25): Cake\ORM\Locator\TableLocator->setConfig('Users', Array) #1 /var/www/html/vendor/cakephp/cakephp/src/Core/BasePlugin.php(239):
# Jun 25th 2019, 07:42 imonsei ooh
# Jun 25th 2019, 07:42 admad creating a new command and creating a new theme are 2 different things
# Jun 25th 2019, 07:41 admad imonsei: https://book.cakephp.org/bake/1.x/en/development.html#creating-a-bake-theme
# Jun 25th 2019, 07:41 imonsei hm. then i'm doing something wrong. i'm following the cookbook about extending bake, using the example for "creating new bake command options".
# Jun 25th 2019, 07:38 admad bake themes are plugins
# Jun 25th 2019, 07:18 imonsei if i want to add a "isAuthorized" template to the "cake bake controller foo" command (so i get a isAuthorized function in my controller in addition to the add-edit-delete etc), should I use a bake theme or a plugin?
# Jun 25th 2019, 06:44 imonsei hia everybooty o/
# Jun 25th 2019, 06:40 sab nnn
# Jun 25th 2019, 06:40 sab moring
# Jun 25th 2019, 06:30 madbbb Good Morning!
# Jun 25th 2019, 05:42 conehead Personally I am passing the data to the view. I think it is more important if you show the data the same way somewhere else and not just on a single page
# Jun 25th 2019, 05:39 sab okay, appreciate the input
# Jun 25th 2019, 05:38 niel45 that's if you want to do the accessing in the template. You could also use elements with the controller passing the data into it. Really depends how you want to do it ;-)
# Jun 25th 2019, 05:37 niel45 if you need access to your models, you'd probably want to use cells
# Jun 25th 2019, 05:34 sab Or none of it
# Jun 25th 2019, 05:33 sab Hi, just a short question: If I'd like to create a dashboard, would I do that with cells or elements?
# Jun 24th 2019, 19:44 jeremyharris oh, there ya go ;)
# Jun 24th 2019, 19:44 jeremyharris this error is saying you are using Query::join as a getter but it doesn’t work as one anymore. You should find any places in your app using Query::join to read the join (rather than set it) and upgrade to Query::clause
# Jun 24th 2019, 19:44 madbbb ha-ha. it is Query::clause("join")
# Jun 24th 2019, 19:36 madbbb upgrading my cake to 3.7 and stuck with ```Using Query::join() to read state is deprecated. Use clause("join") instead.``` where do I put that clause?
# Jun 24th 2019, 19:35 dereuromark the quickest one. if you need it, sure. u can also have many workers this way.
# Jun 24th 2019, 19:12 challgren Start every minute?
# Jun 24th 2019, 19:11 dereuromark i use 2 min interval and shorter life span. always 3 parallel. depends on the max running task.
# Jun 24th 2019, 18:44 challgren This is my config and I have a crontab that starts `bin/cake queue runworker` every 10 minutes, So I always have 2 queue running at one time
# Jun 24th 2019, 18:44 joey.mukherjee Thank you so much!! The line I was missing was use Queue\Shell\Task\QueueTask;