# |
Dec 9th 2019, 14:28 |
japerlman |
```'fields' => ('SUM(ClientLogs.hours) AS hours')``` |
# |
Dec 9th 2019, 14:28 |
japerlman |
I'm really struggling with the different from 2.x when creating queries, can anyone help me SUM a field in the query? Everything I'm finding is saying to just run the query without the sum, then do the sum after it's returned, I don't understand why that's better. |
# |
Dec 9th 2019, 13:43 |
jotpe |
any suggestions? |
# |
Dec 9th 2019, 13:43 |
jotpe |
If I set debugging in app.php it's working |
# |
Dec 9th 2019, 13:43 |
jotpe |
The error only appears when change debug to true in my .env file |
# |
Dec 9th 2019, 13:42 |
jotpe |
`Error: Nesting level too deep - recursive dependency?` `File /usr/www/users/xxx/xxx-dev/vendor/cakephp/cakephp/src/Error/Debugger.php` `Line: 575` |
# |
Dec 9th 2019, 13:42 |
gianmarxgagliardi |
`bin/cake.bat bake all xxx` <-with this it works |
# |
Dec 9th 2019, 13:42 |
jotpe |
I've got this error again. It disappears when I change my debug mode to false: |
# |
Dec 9th 2019, 13:41 |
gianmarxgagliardi |
@steinkel ok it works thanks |
# |
Dec 9th 2019, 13:40 |
steinkel |
no, run it from the parent folder is OK |
# |
Dec 9th 2019, 13:40 |
gianmarxgagliardi |
do I have to enter the bin folder? |
# |
Dec 9th 2019, 13:39 |
steinkel |
@gianmarxgagliardi in windows, try using `bin/cake.bat bake all xxx` or `path_to_php.exe bin/cake.php bake xxx` |
# |
Dec 9th 2019, 13:37 |
gianmarxgagliardi |
@conehead when I go to the project on wamp and try to start cooking the user table with the `cake bake all user` command _"cake" is not recognized as an internal or external command, a executable program a batch file. cake php_ |
# |
Dec 9th 2019, 13:33 |
conehead |
`bin/cake bake all users` ? |
# |
Dec 9th 2019, 13:28 |
gianmarxgagliardi |
when i do `cake bake all users` _"cake" is not recognized as an internal or external command, a executable program a batch file. cake php_ you know how i can solve |
# |
Dec 9th 2019, 13:14 |
javier.villanueva |
works perfect! |
# |
Dec 9th 2019, 13:12 |
javier.villanueva |
ok thanks admad |
# |
Dec 9th 2019, 12:47 |
admad |
set $modelClass property to 'Users` in the extended controller |
# |
Dec 9th 2019, 12:28 |
javier.villanueva |
what is the best way to extend a controller from other.... I mean for instance if I have "Users" and "PowerUsers" . I have PowerUsers extends Users. But in my functions I have $this->Users... then crash. Is a good way use this extentends or there are another best way? Thanks |
# |
Dec 9th 2019, 12:22 |
ndm |
If the foreign key column is nullable, then it means both of those things... I'm not sure that the `dependent` part is true though, I'd thought it would be the opposite, |
# |
Dec 9th 2019, 12:17 |
val |
Or does it mean "the foreign key will be set to null"? |
# |
Dec 9th 2019, 12:15 |
val |
Does it mean "will not be removed"? |
# |
Dec 9th 2019, 12:14 |
val |
what does it mean "will be orphaned"? https://book.cakephp.org/3/en/orm/associations.html#hasmany-associations |
# |
Dec 9th 2019, 12:14 |
val |
> If the foreign key is a nullable column or if dependent is true records will be orphaned. |
# |
Dec 9th 2019, 11:41 |
challgren |
3 is way too many errors |
# |
Dec 9th 2019, 11:41 |
challgren |
What level for a 3.8 app? |
# |
Dec 9th 2019, 11:38 |
alexdd55976 |
morning, troopers |
# |
Dec 9th 2019, 11:38 |
challgren |
ahh ok |
# |
Dec 9th 2019, 11:38 |
admad |
It provides phar which avoids any conflicts |
# |
Dec 9th 2019, 11:37 |
admad |
Use psalm/phar |
# |
Dec 9th 2019, 11:37 |
slackebot2 |
<challgren> |
# |
Dec 9th 2019, 11:37 |
challgren |
Bah |
# |
Dec 9th 2019, 11:36 |
admad |
But my personal preference these days is pslam |
# |
Dec 9th 2019, 11:35 |
admad |
We use both for cake 4.x code base |
# |
Dec 9th 2019, 11:35 |
challgren |
Hmm, is that what everyone is switching to? |
# |
Dec 9th 2019, 11:34 |
admad |
It doesn't force you to stick to predefined levels as phpstan does |
# |
Dec 9th 2019, 11:34 |
admad |
@challgren use psalm :) |
# |
Dec 9th 2019, 11:33 |
slackebot2 |
} $this->Flash->error('Your username or password is incorrect.'); } }``` `var_dump($user);` returns me `C:\wamp64\www\example\src\Controller\UsersController.php:51:boolean false` |
# |
Dec 9th 2019, 11:33 |
gianmarxgagliardi |
once I have entered a user in the users table, when I try to log in it tells me that the password and username are not valid. ```// In src/Controller/UsersController.php public function login() { if ($this->request->is('post')) { $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); return $this->redirect($this->Auth->redirectUrl()); |
# |
Dec 9th 2019, 11:30 |
challgren |
0.12 has too many false positives and pretty much everyone isnt touching it with a 10 foot pole til its fixed |
# |
Dec 9th 2019, 11:29 |
ondrej.nedvidek |
@challgren thanks for hint, I will try to downgrade @jotpe thanks for the travis.yml config, will give it chance if phpstan downgrade won't help brb |