Log message #4190593

# At Username Text
# Jun 24th, 13:23 jeremyharris so your bootstrap will be run when the initial test suite runs, but you’ll need to re-add them in TestCase::setUp (I usually have a base test case class to do this in) so they are added for each test thereafter
# Jun 24th, 13:22 jeremyharris sorry, your test case setup I mean
# Jun 24th, 13:21 madbbb but I have require dirname(__DIR__) . '/config/bootstrap.php'; in my test bootstrap.php
# Jun 24th, 13:20 jeremyharris I think restoring them automatically might be possible, but I haven’t looked into it too much to set up a PR yet
# Jun 24th, 13:19 jeremyharris @madbbb you need to add them to your test bootstrap too; that’s what I do.
# Jun 24th, 13:09 madbbb TestCase.php creates new instance of EventManager in setUp() method. That is why I have no listeners anymore
# Jun 24th, 12:59 gourav Please give idea how I can fix this.
# Jun 24th, 12:59 gourav I am getting issue with two cake php versions 1.3 and 3.3, I want to login into cake 3.3 from 1.3 with manual auth setting, but It's not working I am using the curl for this purpose,
# Jun 24th, 12:57 gourav Hi EveryOne,
# Jun 24th, 12:57 madbbb but EventManager has no listeners in my models.
# Jun 24th, 12:51 slackebot initilizng in test env
# Jun 24th, 12:51 madbbb Hello. When I run tests my event listeners do not receive events. Is there some additional setup needed for them to work in test environment? I initialise them in bootstrap.php like this: ``` $listeners = [ App\Event\InvoiceListener::class, App\Event\OrderListener::class, App\Event\TransactionListener::class ]; foreach ($listeners as $listener) { EventManager::instance()->attach(new $listener()); } ``` look like they are not
# Jun 24th, 11:15 slackebot 'cascadeCallbacks' => true, ]); And ControllableObject have the Behavior as: $this->addBehavior('Muffin/Trash.Trash'); When i delete a ControllableObject, the behavior add only the timestamp on this table, and the relationships table are ignored :S, someone can help?
# Jun 24th, 11:15 peppejaripappalardo Hi all, just a little question about Muffin/Trash soft-delete. I have these table: ControllableObjects => AbstractResources => Resources => Volunteers. When i delete a ControllableObject, it have to delete a cascade Abastract, Resources, Volunters. At this time these table have the ForeignKey as is required by the plugin. Every have the behavior with: $this->addBehavior('Muffin/Trash.Trash', [ 'dependent' => true,
# Jun 24th, 11:04 adithya why is withFile prepending to the path provided?
# Jun 24th, 11:03 adithya $file_path = WWW_ROOT.'img/file.txt'; $response = $this->response->withFile($file_path); I'm trying to serve this file but the url generated by the withFile is /users/demouser/websites/cakeproject1/src//users/demouser/websites/cakeproject1/webroot/img/file.txt what am i doing wrong?
# Jun 24th, 11:01 unclezoot i think this line is the problem ShellDispatcher::addShortPluginAliases(265). $aliases += [$shell => $plugin]; as it assumes that you will never have 2 shells with the same name
# Jun 24th, 11:00 vossen.steven it doesnt though since it checks if the plugins are the same
# Jun 24th, 10:59 adithya $file_path = WWW_ROOT.$path; $response = $this->response->withFile($file_path);
# Jun 24th, 10:52 unclezoot seems to be all sorts of array_flipping going on in there: $fixed = array_flip($list['app']) + array_flip($list['CORE']);, so if you have a shell called Reporting.utilities and Search.utilities say, then you'll fill up your debug.log in no time
# Jun 24th, 10:51 unclezoot not without ShellDispatcher::addShortPluginAliases throwing debug warnings
# Jun 24th, 10:50 vossen.steven its possible?
# Jun 24th, 10:47 unclezoot is it not possible to have 2 shells with the same name in 2 different plugins?
# Jun 24th, 10:33 adithya thank you :slightly_smiling_face:
# Jun 24th, 10:29 dereuromark by adding the header into the response for it. :slightly_smiling_face:
# Jun 24th, 10:29 dereuromark passing them through a controller or middleware usually
# Jun 24th, 10:28 adithya Hi, how can I make downloadable links for files in my webroot/img ?
# Jun 24th, 10:09 steinkel I'll add it to the list :slightly_smiling_face:
# Jun 24th, 10:09 dereuromark did you write a blog post for it yet? :slightly_smiling_face:
# Jun 24th, 10:08 steinkel @dereuromark using the default cake log adapter, then configuring syslog to fw logs to other services
# Jun 24th, 10:07 imonsei ah dang. I have to run off again. I will come online again tomorrow. laters o/
# Jun 24th, 10:02 imonsei side note, I cant make "cake bake" show the list with the "foo" command in it, no matter where i have the twig and php file placed, so I am definitely doing something entirely wrong
# Jun 24th, 09:59 imonsei am I supposed to put the examples from "creating new bake command options" inside my theme, or in the vendor/cakephp folders?
# Jun 24th, 09:59 imonsei i have used the above chapters to create my theme, which works nicely
# Jun 24th, 09:59 unclezoot morning, how do you remove these warnings from error.log? Debug: command 'acl' in plugin 'Acl' was not aliased, conflicts with 'AclManager'
# Jun 24th, 09:59 imonsei hia again. I'm having some problems with the "extending bake" part of the cake book. I'm at the "creating new bake commands options"
# Jun 24th, 09:53 JayCH It's the prefix "api/1.0" mapping to the "Api10" plugin that I'm having issues setting up
# Jun 24th, 09:51 JayCH I was unsuccessful so here's what i'm trying to do. I want to have all my API related Controllers as a plugin "Api10", but I would like to "version" these, so say if I call "/api/1.0/images", it calles "plugin/Api10/src/Controller/ImagesController.php. I'm not quite sure if I can do that with just routing, or if I need a custom routeClass?
# Jun 24th, 09:50 neon1024 Morning all :wave:
# Jun 24th, 09:45 JayCH Thanks for the link, that sparked an idea that I'll try before wasting your time :)
# Jun 24th, 09:43 dereuromark you can also check the sandbox app and how it works there ( https://github.com/dereuromark/cakephp-sandbox/blob/master/plugins/Sandbox/config/routes.php ) in real life.