Log message #4217483

# At Username Text
# Dec 5th 2019, 14:55 info315 It's also on GitHub if this helps: https://github.com/it-novum/openITCOCKPIT/tree/4.x-dev/app/cake4/src
# Dec 5th 2019, 14:49 angelxmoreno :scream:cake 4? @info315 you so fancy!:,)
# Dec 5th 2019, 14:45 slackebot2 //$this->loadComponent('Security'); }```
# Dec 5th 2019, 14:45 info315 In my AppController i still load the RequestHandler like so: ``` public function initialize(): void { parent::initialize(); $this->loadComponent('RequestHandler'); $this->loadComponent('Flash'); // Docs: https://book.cakephp.org/authentication/1/en/index.html $this->loadComponent('Authentication.Authentication', [ 'logoutRedirect' => '/users/login' // Default is false ]);
# Dec 5th 2019, 14:44 slackebot2 RoutingMiddleware($this)) ->add(new AppAuthenticationMiddleware($this, [ //Only redirect .html requests if login is invalid - no json requests 'htmlUnauthenticatedRedirect' => '/users/login' ])) ->add(new AuthorizationMiddleware($this)) ->add(new RequestAuthorizationMiddleware()); return $middlewareQueue; }```
# Dec 5th 2019, 14:44 slackebot2 [CORE/src/Core/functions.php, line 305]``` I use the BodyParserMiddleware in my Application.php: ``` public function middleware($middlewareQueue): MiddlewareQueue { $middlewareQueue ->add(new BodyParserMiddleware()) ->add(ErrorHandlerMiddleware::class) ->add(new AssetMiddleware([ 'cacheTime' => Configure::read('Asset.cacheTime') ])) ->add(new
# Dec 5th 2019, 14:44 info315 With CakePHP 4 i get this error on some on one post request: ```Deprecated (16384): Request's input data parsing feature has been removed from RequestHandler. Use the BodyParserMiddleware in your Application class instead. - /usr/share/openitcockpit/app/cake4/vendor/cakephp/cakephp/src/Event/EventManager.php, line: 311 You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL and ~E_USER_DEPRECATED` in your config/app.php.
# Dec 5th 2019, 13:38 josbeir no problem :slightly_smiling_face:
# Dec 5th 2019, 13:37 javier.villanueva ok i use matching, i read. thanks!
# Dec 5th 2019, 13:37 javier.villanueva ok thank you
# Dec 5th 2019, 13:37 javier.villanueva Do you say that $conditions not affect to this query?
# Dec 5th 2019, 13:36 josbeir so @javier.villanueva as @neon1024 said: check out https://book.cakephp.org/3/en/orm/retrieving-data-and-resultsets.html#filtering-by-associated-data-via-matching-and-joins
# Dec 5th 2019, 13:36 javier.villanueva sorry xD
# Dec 5th 2019, 13:36 josbeir i needed to read it twice to understand it tho :)
# Dec 5th 2019, 13:35 neon1024 @josbeir Nailing it again! :clap:
# Dec 5th 2019, 13:35 neon1024 Ah, matching?
# Dec 5th 2019, 13:35 josbeir you are just filtering the groups list but not the parent folders list using tat query @javier.villanueva
# Dec 5th 2019, 13:35 neon1024 Not sure I understand that @javier.villanueva but it seems like if your `$conditions` is something else or `[]` that’s not related to the query you pasted
# Dec 5th 2019, 13:30 javier.villanueva $conditions are other conditions or [ ]
# Dec 5th 2019, 13:30 javier.villanueva but... not is correct...
# Dec 5th 2019, 13:30 javier.villanueva return $query->find('list')->where($conditions)->contain('Groups', function (Query $q) use ($user) { return $q ->where(['Groups.id' => $user['group']['id']]); });
# Dec 5th 2019, 13:30 javier.villanueva I am trying to create a custom finder with the next condition. I have Folders , and Groups. The folder belongsToMany Groups. The user belongs to one Group. I want find all folders, but if folders has groups then only find if in these groups is the user's group :)
# Dec 5th 2019, 13:16 neon1024 That first contact experience is absolutely critical to me
# Dec 5th 2019, 13:16 neon1024 @challgren I’d agree with you. I’d rather use a bad package if it’s documented well, than great code with poor documentation
# Dec 5th 2019, 12:58 admad talking about phptan
# Dec 5th 2019, 12:57 admad @dereuromark i am waiting to see how many of those tickets are addressed vs closed with "no, this is how it should work"
# Dec 5th 2019, 12:44 challgren We tried bitwise but it was just becoming a mess people would choose the wrong status, etc
# Dec 5th 2019, 12:43 challgren I plan on using it for (construction) project workflow
# Dec 5th 2019, 12:43 challgren Or online order
# Dec 5th 2019, 12:42 challgren Car would be a perfect example
# Dec 5th 2019, 12:42 dereuromark A while ago I asked for good use cases for it to showcase, none were given :slightly_smiling_face: That would help draw up sth.
# Dec 5th 2019, 12:42 dereuromark I might want to add a screenshot of the live preview image functionality, that could help
# Dec 5th 2019, 12:40 dereuromark then do it
# Dec 5th 2019, 12:40 challgren Id rather learn statemachine vs this one
# Dec 5th 2019, 12:40 challgren The graph helps
# Dec 5th 2019, 12:39 dereuromark LOL
# Dec 5th 2019, 12:39 challgren The docs seem easier, I can understand it quickly
# Dec 5th 2019, 12:39 dereuromark "makes more sense than" why would you think that?
# Dec 5th 2019, 12:38 dereuromark Jep. We use it for complex releases with all the suroundings necessary, asynchronous pre and post changes and jobs.
# Dec 5th 2019, 12:37 challgren https://github.com/ludeus/cakephp3-state-machine this makes more sense that cakephp-statemachine
# Dec 5th 2019, 12:33 angelxmoreno :eyes: