Log message #4208789

# At Username Text
# Oct 14th 2019, 17:56 graziel "MyPlugin\\": "./plugins/MyPlugin/src/"
# Oct 14th 2019, 17:56 graziel also if you didnt change composer.json you need to add
# Oct 14th 2019, 17:56 david no changes... after dump-autoload
# Oct 14th 2019, 17:54 admad Try running `composer dump-autoload`
# Oct 14th 2019, 17:54 david can't remember, really
# Oct 14th 2019, 17:54 david updated, I think
# Oct 14th 2019, 17:54 david mmm
# Oct 14th 2019, 17:53 graziel cake version
# Oct 14th 2019, 17:53 david ?
# Oct 14th 2019, 17:53 david what do you mean with "updated code or new"
# Oct 14th 2019, 17:51 graziel it might be same problem as in https://discourse.cakephp.org/t/running-commands-attempts-to-load-shell-instead/4381/10?u=graziel
# Oct 14th 2019, 17:51 david and bake command has created it with the shell
# Oct 14th 2019, 17:51 graziel i ment whole app
# Oct 14th 2019, 17:51 david I have deleted /plugins/MyPlugin/src/Shell
# Oct 14th 2019, 17:50 david new code
# Oct 14th 2019, 17:50 graziel hm is it updated code or new?
# Oct 14th 2019, 17:49 david same result
# Oct 14th 2019, 17:48 graziel bake is great i use it everytime i can
# Oct 14th 2019, 17:48 david (didn't know)
# Oct 14th 2019, 17:48 david ok, I'll try
# Oct 14th 2019, 17:48 david oh
# Oct 14th 2019, 17:47 graziel why move bake has ability to bake into plugin
# Oct 14th 2019, 17:47 david I have baked a shell and moved to /plugins/MyPlugin/src/Shell, with the same result: commands not found by ./cake
# Oct 14th 2019, 17:42 david in fact, my plugin only have the shell
# Oct 14th 2019, 17:41 graziel try baking just to be sure its not typo or silly mistake
# Oct 14th 2019, 17:41 david no
# Oct 14th 2019, 17:41 graziel are you using bake to create it?
# Oct 14th 2019, 17:38 david if my shell is under src/Shell it works, but when I move the shell to /plugins/MyPlugin/src/Shell. commands are missing
# Oct 14th 2019, 17:27 david but MyPlugin shell commands are not autodiscovered when I run ./cake
# Oct 14th 2019, 17:27 david yes, I loaded the plugin via ./cake plugin load MyPlugin, so Application.php has been updated with $this->addPlugin('MyPlugin');
# Oct 14th 2019, 17:24 dereuromark If you loaded/enabled the plugin.
# Oct 14th 2019, 17:20 david When a plugin has a shell, the shell commands should be showed in console when you run ./cake, isn't it?
# Oct 14th 2019, 16:25 jotpe Thanks :slightly_smiling_face:
# Oct 14th 2019, 16:25 jotpe Alright, I changed this.
# Oct 14th 2019, 16:22 admad that looks fine but unlike `getPath()` `getRequestTarget()` will include query string
# Oct 14th 2019, 16:17 jotpe I don't need to inject other classes so this should be fine, or?
# Oct 14th 2019, 16:17 slackebot1 <jotpe>
# Oct 14th 2019, 16:17 jotpe @admad Yes, i used this. I ended up building a helper with something like this:
# Oct 14th 2019, 16:05 admad @jotpe `$this->request->getPath()` will return the current URL without query string args if any
# Oct 14th 2019, 15:58 jotpe Thanks @tobse, @dereuromark and @admad
# Oct 14th 2019, 15:52 admad a more generic solution would be generate URL for record and compare with current request's URL. Then you will be able to use the check for any record, not just companies