# |
Apr 25th 2019, 15:41 |
this.impetus |
I duno what `$this->app->pluginConsole()` does, or which bit of `$commands` it was intended to use |
# |
Apr 25th 2019, 15:41 |
this.impetus |
But *after* 142, `$commands` is null |
# |
Apr 25th 2019, 15:40 |
slackebot |
'Cake\Shell\OrmCacheShell', 'plugin' => 'Cake\Shell\PluginShell', 'routes' => 'Cake\Shell\RoutesShell', 'schema_cache' => 'Cake\Shell\SchemaCacheShell', 'server' => 'Cake\Shell\ServerShell', 'console' => 'App\Shell\ConsoleShell' ] } ``` |
# |
Apr 25th 2019, 15:40 |
this.impetus |
at line 142 in `vendor/cakephp/src/Console/CommandRunner.php` I ran `debug()` on `$commands`; prints ```########## DEBUG ########## object(Cake\Console\CommandCollection) { [protected] commands => [ 'version' => 'Cake\Command\VersionCommand', 'help' => 'Cake\Command\HelpCommand', 'cache' => 'Cake\Shell\CacheShell', 'completion' => 'Cake\Shell\CompletionShell', 'i18n' => 'Cake\Shell\I18nShell', 'orm_cache' => |
# |
Apr 25th 2019, 15:39 |
this.impetus |
Well I can see where the dilemma arises, but i know far too little about cake's machinery to make sense of it. Here's where I'm at: |
# |
Apr 25th 2019, 15:34 |
this.impetus |
ok I'll go down that rabbit hole, ty |
# |
Apr 25th 2019, 15:34 |
neon1024 |
That should have a stacktrade to tell you where stuff went wrong |
# |
Apr 25th 2019, 15:33 |
neon1024 |
If it’s a command line it should be in `/logs/cli-error.log` |
# |
Apr 25th 2019, 15:33 |
neon1024 |
Did you check the logs? |
# |
Apr 25th 2019, 15:33 |
neon1024 |
So maybe here, https://github.com/cakephp/cakephp/blob/c15a2e9c1933fa5a874c33d2bcb6d63efacf8876/src/Http/BaseApplication.php#L206 |
# |
Apr 25th 2019, 15:33 |
this.impetus |
It will sadden us both that i don't really understand that last sentence, alas. |
# |
Apr 25th 2019, 15:32 |
neon1024 |
So perhaps it’s a plugin with a Shell class |
# |
Apr 25th 2019, 15:32 |
this.impetus |
But I am pretty damn sure everything is right in the database. The table certainly exists, and the tables it references were extant in the project before I added the HABTM table. just `images`, `publications` and `images_publications` |
# |
Apr 25th 2019, 15:32 |
neon1024 |
https://github.com/cakephp/cakephp/blob/e6c40f7814039e68abe2c11721d0cda4b6c4cb54/src/Console/CommandCollection.php#L85 |
# |
Apr 25th 2019, 15:31 |
this.impetus |
That was my first thought |
# |
Apr 25th 2019, 15:31 |
this.impetus |
`vendor/cakephp/cakephp/src/Core/BasePlugin.php, line 248` |
# |
Apr 25th 2019, 15:31 |
neon1024 |
As `addMany()` feels like a Table class method. Which if it is, just means the table isn’t instanciated |
# |
Apr 25th 2019, 15:30 |
neon1024 |
Does the stacktrace give you a line number or class? |
# |
Apr 25th 2019, 15:30 |
this.impetus |
I know PHP, or once knew; then I moved to python, then to front-end, and now php is a distant memory I'm trying to recover haha. So anyway, the most current version of bake is indeed installed, but the error, `Exception: Call to a member function addMany() on null` remains |
# |
Apr 25th 2019, 15:30 |
neon1024 |
Well in other news, according to packagist, `cakephp/bake` doesn’t require `twig/twig`, but instead uses Wryhaximus’ twig plugin, which might in turn use twig |
# |
Apr 25th 2019, 15:29 |
neon1024 |
It’s like trying to learn Sass without knowing CSS otherwise |
# |
Apr 25th 2019, 15:28 |
neon1024 |
Yeah, do PHP first, and Cake second |
# |
Apr 25th 2019, 15:28 |
this.impetus |
I'm getting the hang of it; often it's jsut the presumption that there's a cakey or cake-specific way thigns ought to be done that stumps me |
# |
Apr 25th 2019, 15:28 |
neon1024 |
Well, pretty much all package managers are really ;) |
# |
Apr 25th 2019, 15:28 |
neon1024 |
But if you’ve used `npm` or `yarn` then `composer` is very similar |
# |
Apr 25th 2019, 15:28 |
this.impetus |
Which is where I hitherto lived. Thanks for your patience and assistance. |
# |
Apr 25th 2019, 15:27 |
neon1024 |
..but that’s more front-end developer territory imho |
# |
Apr 25th 2019, 15:27 |
neon1024 |
Not with PHP at least, no. CSS mastery might slide into backend through Javascript, Node.js and Webpack |
# |
Apr 25th 2019, 15:27 |
neon1024 |
https://packagist.org/packages/cakephp/bake |
# |
Apr 25th 2019, 15:26 |
this.impetus |
That is terribly obvious. ok. thanks. CSS mastery really doesn't translate to the back end, hey? |
# |
Apr 25th 2019, 15:26 |
neon1024 |
I’d probably just do `composer clearcache andand composer update cakephp/bake` |
# |
Apr 25th 2019, 15:26 |
neon1024 |
The package is `twig/twig` |
# |
Apr 25th 2019, 15:26 |
neon1024 |
You’re missing the vendor |
# |
Apr 25th 2019, 15:25 |
this.impetus |
@neon1024 `composer update twig` prompts `Package "twig" listed for update is not installed. Ignoring.` This is true for all the listed twig packages. How are these packages managed if I do wish to update them? |
# |
Apr 25th 2019, 15:15 |
J98hasjd |
Does someone know how to pass a variable from Controller into a costum ExceptionRenderer? I'd like to pass validation Errors and JSON them for API users. |
# |
Apr 25th 2019, 15:15 |
neon1024 |
I was sure that bake was onto 2.x releases by now :thinking_face: |
# |
Apr 25th 2019, 15:15 |
neon1024 |
Hm, nope. https://semver.mwl.be/#?package=cakephp%2Fbakeandversion=~1.0andminimum-stability=stable |
# |
Apr 25th 2019, 15:14 |
neon1024 |
However! I don’t think cakephp/bake ~1.0 would pull the Twig changes. I think they’re more recent than that, but I might be wrong |
# |
Apr 25th 2019, 15:14 |
neon1024 |
So it might be likely |
# |
Apr 25th 2019, 15:14 |
neon1024 |
Well cakephp/bake implements twig/twig for the templating |
# |
Apr 25th 2019, 15:12 |
slackebot |
implementations ``` |