Log message #4179903

# At Username Text
# Mar 15th 2019, 15:17 neon1024 I presume the constant `LOCK_EX` is defined?
# Mar 15th 2019, 15:16 gareth.ellis this is in `FileEngine::write()`
# Mar 15th 2019, 15:16 gareth.ellis the middle line there is line 138
# Mar 15th 2019, 15:16 gareth.ellis ` if ($this->settings['lock']) { $this->_File->flock(LOCK_EX); }`
# Mar 15th 2019, 15:16 gareth.ellis `Warning: flock(): supplied resource is not a valid stream resource in C:\inetpub\itrans\app\Vendor\cakephp\cakephp\lib\Cake\Cache\Engine\FileEngine.php on line 138 `
# Mar 15th 2019, 15:15 gareth.ellis good question
# Mar 15th 2019, 15:15 challgren Well whats the exact error?
# Mar 15th 2019, 15:15 gareth.ellis i'd like to understand why this is happening and address it directly
# Mar 15th 2019, 15:15 gareth.ellis I feel like that just hides the problem
# Mar 15th 2019, 15:13 neon1024 Perhaps disable cache whilst the tests are running?
# Mar 15th 2019, 15:03 gareth.ellis :weary:
# Mar 15th 2019, 15:03 gareth.ellis or when running whole test suite
# Mar 15th 2019, 15:03 gareth.ellis I haven't seen any problems with it via web
# Mar 15th 2019, 15:03 gareth.ellis so the test actually passes, but I still get this random noise
# Mar 15th 2019, 15:02 gareth.ellis if I run a single test which hits the database, when the `Mysql::__destruct()` gets called at the end of the test run, it tries to write to the model method cache, and I get a bunch of warnings/errors
# Mar 15th 2019, 15:02 gareth.ellis this is a long-shot, but has anyone had any problems with `FileEngine` cache on cake 2.10 and php 7.2?
# Mar 15th 2019, 14:45 ricksaccous or should i drop the belongsTo and relate it differently based on modified conditions or something
# Mar 15th 2019, 14:45 ricksaccous would this even make sense
# Mar 15th 2019, 14:45 ricksaccous but i also want it to belongto the latest record of the model it has many of
# Mar 15th 2019, 14:44 ricksaccous so i have a model that has many of another model
# Mar 15th 2019, 14:14 cakephp-slack Nice! Thnx for the info!
# Mar 15th 2019, 14:10 neon1024 You can nest prefixes too which is a super handy feature I think 8)
# Mar 15th 2019, 14:10 neon1024 `Router::prefix('admin', function (RouteBuilder $routes) {`
# Mar 15th 2019, 14:10 neon1024 `Router::scope('/', function (RouteBuilder $routes) { }`
# Mar 15th 2019, 14:10 neon1024 Yep
# Mar 15th 2019, 14:07 cakephp-slack Do I put my “default” routing in scope(‘/’) and my prefix routing in prefix(‘admin’)?
# Mar 15th 2019, 14:06 neon1024 So when you add an api, you can use the ‘api’ prefix! :)
# Mar 15th 2019, 14:06 neon1024 Yes, use a prefix
# Mar 15th 2019, 14:03 cakephp-slack It’s separation of admin and frontend basically
# Mar 15th 2019, 14:02 cakephp-slack I think I’m trying to use a scope routing for a prefix goal ,:)
# Mar 15th 2019, 14:01 neon1024 Although it sounds a little XY. What is it you’re trying to achieve?
# Mar 15th 2019, 14:00 neon1024 @cakephp-slack I would use a custom routing param for this
# Mar 15th 2019, 13:41 cakephp-slack There has to be a better way right?
# Mar 15th 2019, 13:41 cakephp-slack `$this->request->getParams()` does not exist. `$this->request` has some info, closest info is the `_matchedRoute` but I would have to preg_match it or something to get the info.
# Mar 15th 2019, 13:37 berarma You mean ```debug($this->request)``` or ```debug($this->request->getParams())```
# Mar 15th 2019, 13:10 spriz @cakephp-slack did you try `debug($this->params)` ?
# Mar 15th 2019, 13:07 cakephp-slack CakePHP 3.7 btw
# Mar 15th 2019, 13:06 cakephp-slack When I’m using multiple scopes in my routing, is there a way of knowing which scope I’m in, in the controller?
# Mar 15th 2019, 12:35 berarma @half2me, I meant to use formatResults to load the comments not to filter them.
# Mar 15th 2019, 11:42 edgaras.jan add `group(Comments.article_id)` instead of `limit(1)`
# Mar 15th 2019, 11:10 half2me You definitely want to use SQL to sort out the data not PHP :S