# |
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 |
# |
Dec 9th 2019, 11:28 |
challgren |
https://github.com/dereuromark/cakephp-ide-helper/blob/master/tests/PHPStan/AssociationTableMixinClassReflectionExtension.php also provides a good one too |
# |
Dec 9th 2019, 11:27 |
challgren |
I have a custom AssociationTableMixinClassReflectionExtension in /tests/PHPStan |
# |
Dec 9th 2019, 11:26 |
slackebot2 |
<challgren> |
# |
Dec 9th 2019, 11:26 |
jotpe |
@ondrej.nedvidek I use this (travis.yml): `- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --ignore=\./src/Controller/TestController.php,*/config/Migrations*,*/plugins/*/vendor --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot ./plugins; fi` |
# |
Dec 9th 2019, 11:26 |
challgren |
Third add this to your composer |
# |
Dec 9th 2019, 11:26 |
challgren |
Second your project should be 3.7+ |
# |
Dec 9th 2019, 11:25 |
challgren |
@ondrej.nedvidek first only use 0.11.9 or lower |
# |
Dec 9th 2019, 11:24 |
jotpe |
I have a http 500 error, but my httpd logs doesn't show anything and cake's logs neither. Any ideas? |