Log message #4223819

# At Username Text
# Jan 24th 2020, 23:21 luizcmarin _public_ _function_ _index_()     {         _$this->paginate_ _=_ [             'contain' _=>_ ['Pessoas', 'PlanoContas', 'Pedidos'],         ];         _$Caixas_ _=_ _$this->paginate_(_$this->Caixas_);         _$this->set_(compact('Caixas'));     }
# Jan 24th 2020, 23:21 luizcmarin I created CaixasController.
# Jan 24th 2020, 23:20 challgren Ok so your reading data, whats that call to read the data?
# Jan 24th 2020, 23:16 luizcmarin when I try to access http: // localhost: 8765 / caixas
# Jan 24th 2020, 23:15 challgren What is causing the error are you trying to save, trying to read?
# Jan 24th 2020, 23:14 slackebot " Shouldn't he go to sti_caixas?
# Jan 24th 2020, 23:14 slackebot ------> THIS TABLE IS NOT REAL 'caixareceber' => 'App\Model\Entity\CaixaReceber', ------> THIS TABLE IS NOT REAL ] ]); $this->setEntityClass('App\Model\Entity\Caixa'); // default I created the entities box, box, box and box. I created the add, edit, view, index screens. However, I get the following error: " SQLSTATE [42S02]: Base table or view not found: 1146 Table 'ola_ney.caixas' doesn't exist
# Jan 24th 2020, 23:14 luizcmarin excuse me. I was writing the situation. $this->setTable('sti_caixas'); ------> THIS TABLE IS REAL $this->setDisplayField('id'); $this->setPrimaryKey('id'); // sti $this->addBehavior('Muffin/Sti.Sti', [ 'typeMap' => [ 'caixa' => 'App\Model\Entity\Caixa', ------> THIS TABLE IS NOT REAL 'caixapagar' => 'App\Model\Entity\CaixaPagar',
# Jan 24th 2020, 23:12 challgren @luizcmarin please stop saying it has errors and not including what the error thats not very conductive to figuring out your issue.
# Jan 24th 2020, 23:11 slackebot loaded via $this->addPlugin(), you may need to update bin/cake.php to match https://github.com/cakephp/app/tree/master/bin/cake.php In [/home/vagrant/code/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 332]``` The migrations seems to be created successfully but marking it as done generates an error.
# Jan 24th 2020, 23:11 cakephp-slack I’m having an issue with migrations in a fresh CakePHP 4 install: ```$ bin/cake bake migration_snapshot Initial Creating file /home/vagrant/code/config/Migrations/20200124230841_Initial.php Wrote `/home/vagrant/code/config/Migrations/20200124230841_Initial.php` Marking the migration 20200124230841_Initial as migrated... Exception: Shell class for "Migrations" could not be found. If you are trying to use a plugin shell, that was
# Jan 24th 2020, 22:58 luizcmarin I followed all the guidelines of the STI. At least, I believe so. But I have doubts because of some errors
# Jan 24th 2020, 22:56 luizcmarin @challgren disponible?
# Jan 24th 2020, 21:43 wnasich @challgren thanks!
# Jan 24th 2020, 21:42 challgren https://github.com/burzum/cakephp-service-layer might be useful to you @wnasich you might need to update it for cake4
# Jan 24th 2020, 21:42 wnasich ops, thanks!
# Jan 24th 2020, 21:32 kiwi_74 @wnasich Thanks. That's what I was looking for :)
# Jan 24th 2020, 21:30 wnasich Hello, with CakePHP 4 , is there a easy way to implement a service layer ?
# Jan 24th 2020, 21:30 wnasich now you have the shell command `cake bake`
# Jan 24th 2020, 21:28 wnasich maybe that was the 'scaffolding' feature on previous releases
# Jan 24th 2020, 21:16 kiwi_74 Hello Everyone. I seem to remember cake being able to create default views which showed the rows of a table, but I can't find any info on it. Is there such a thing, or am I just imagining it, lol?
# Jan 24th 2020, 19:51 challgren Also close https://github.com/UseMuffin/Sti/issues/8 since you figured it out
# Jan 24th 2020, 19:49 challgren You can do a PR
# Jan 24th 2020, 19:37 luizcmarin @challgren I find other differences between what is on the website and cake 4. How can I report this? Should I report? for example, on the website it says "$ this-> table ('sti_cooks');" but in cake4 it should be "$ this-> setTable ('sti_cooks');", do you agree? There is no way to suggest the changes I encounter.
# Jan 24th 2020, 19:27 luizcmarin @challgren Everything is OK. Let's work ..... thanks
# Jan 24th 2020, 19:25 luizcmarin :hugging_face:
# Jan 24th 2020, 19:25 slackebot <luizcmarin>
# Jan 24th 2020, 19:23 challgren sorry drop the use part
# Jan 24th 2020, 19:22 luizcmarin [InvalidArgumentException] Could not find a matching version of package usemuffin/sti. Check the package spelling, your version cons traint and that the package is available in a stability which matches your minimum-stability (dev).
# Jan 24th 2020, 19:21 challgren maybe try `composer require usemuffin/sti:2.0.0-beta`
# Jan 24th 2020, 19:21 luizcmarin I run cake 4.0.2
# Jan 24th 2020, 19:20 challgren oh that should be fine. But if its install 1.0.0 it seems you’re running cake 3.x
# Jan 24th 2020, 19:20 luizcmarin change to beta?
# Jan 24th 2020, 19:20 luizcmarin I have "minimum-stability": "dev".
# Jan 24th 2020, 19:19 challgren yes in the root
# Jan 24th 2020, 19:19 luizcmarin Hello @challgren. I thought I was off ... should I add that to composer.json?
# Jan 24th 2020, 19:17 challgren @luizcmarin you probably need `"minimum-stability": "beta"` in your composer.json https://getcomposer.org/doc/04-schema.md#minimum-stability
# Jan 24th 2020, 19:09 luizcmarin OK. Does anybody know how to solve this? https://cakesf.slack.com/archives/C053DPNGT/p1579880879178400
# Jan 24th 2020, 16:50 kiwi_10 a user can update the doc for me please ? I don't have a Github account
# Jan 24th 2020, 16:50 kiwi_10 The new function to use for mimetypes definitions is setTypeMap : https://api.cakephp.org/3.6/class-Cake.Http.Response.html#_setTypeMap
# Jan 24th 2020, 16:49 kiwi_10 use an array as param don't work