# |
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? |
# |
Dec 9th 2019, 11:24 |
slackebot2 |
to locate the file under `vendor/cakephp/cakephp/tests/PHPStan/AssociationTableMixinClassReflectionExtension.php` Any help would be appreciated. |
# |
Dec 9th 2019, 11:24 |
ondrej.nedvidek |
Does anybody have experience with `phpstan` when dev cakephp project? I have tried to install `phpstan` but it ignores cakephp 'magic' therefore `helpers` is ignored and then I get complaints about `$this->Html` is undefined property etc What I tried is to use `phpstan.neon` from `cakephp/cakephp` bue there is problem the `Service '0149': Class Cake\PHPStan\AssociationTableMixinClassReflectionExtension not found.` Though I am able |
# |
Dec 9th 2019, 11:24 |
challgren |
Client originally had it written in DropWizard but the higher quality cameras mess with barcode reading. So device side with a webservice it is |
# |
Dec 9th 2019, 11:22 |
challgren |
@ndm im really replacing a webservice that use to decode the images on the server side but now Im trying to read Code 128 and Datamatrix so doing it device side is our better option, provides the quickest feedback to the user and its not an endless loop of uploading an image, having it fail decoding and then the user has to try again. |
# |
Dec 9th 2019, 11:09 |
gianmarxgagliardi |
I uploaded the DB of the old tutorial that you told me not to use |