# |
Jul 24th 2017, 14:55 |
inoas |
and dereuromark the barrier will not go down... people will see the verbosity and walk to laravel. |
# |
Jul 24th 2017, 14:54 |
inoas |
I don't want to diminish the work being done to have a consistent API across all of Cake - I think that's very important. <= leaving out set or get PER class or there doesnt make it inconsistent - magic setters/getters may do ... and they are luckly gone |
# |
Jul 24th 2017, 14:53 |
inoas |
yeah all I am saying is - me neither ;-) |
# |
Jul 24th 2017, 14:53 |
jeremyharris |
I wasn’t suggesting that :slightly_smiling_face: |
# |
Jul 24th 2017, 14:53 |
inoas |
so no work is wasted! |
# |
Jul 24th 2017, 14:53 |
inoas |
@jeremyharris https://github.com/cakephp/cakephp/issues/10930#issuecomment-317447201 I did not want to - in any way - reverse the removal of magic getters/setters |
# |
Jul 24th 2017, 14:52 |
jeremyharris |
you could go with a less strict regexp that allows [0-9a-f] for all the chunks |
# |
Jul 24th 2017, 14:52 |
inoas |
I am just testing for strlen 36 now as long as the other side doesn't fix their broken uuids ;) |
# |
Jul 24th 2017, 14:51 |
inoas |
which is all good @ jeremy :) |
# |
Jul 24th 2017, 14:51 |
inoas |
the uuid is invalid it seems |
# |
Jul 24th 2017, 14:45 |
jeremyharris |
save allowing a 0 as the first char of the 4th part |
# |
Jul 24th 2017, 14:45 |
jeremyharris |
looks like the validator also applies that strict regexp |
# |
Jul 24th 2017, 14:44 |
cleptric |
And it’s false on both |
# |
Jul 24th 2017, 14:44 |
cleptric |
Cake 2 and 3 uses the same regex for uuid matching |
# |
Jul 24th 2017, 14:43 |
lorenzo |
nervermind, I counted incorrectly the number of chars |
# |
Jul 24th 2017, 14:43 |
jeremyharris |
according to this SO post which is a regexp based on the RFC, the 4th part fails as it starts with 3, not [89ab] https://stackoverflow.com/questions/7905929/how-to-test-valid-uuid-guid |
# |
Jul 24th 2017, 14:42 |
lorenzo |
does not look like a cake 2 uuid |
# |
Jul 24th 2017, 14:37 |
inoas |
can someone in a Cakephp2 project replicate: call debug(Validation::uuid('0ff94cdc-70fe-45fe-3279-6345fc757763')) returning false? |
# |
Jul 24th 2017, 12:51 |
birdy247 |
I tried beforeSave aslo |
# |
Jul 24th 2017, 12:51 |
birdy247 |
right |
# |
Jul 24th 2017, 12:50 |
lorenzo |
@birdy247 |
# |
Jul 24th 2017, 12:50 |
lorenzo |
maybe not the beforeMarshal, but 100% sure it is used for saving |
# |
Jul 24th 2017, 12:50 |
lorenzo |
I’m pretty certain the join table is used for saving |
# |
Jul 24th 2017, 12:50 |
sonu_nk |
ah got it |
# |
Jul 24th 2017, 12:50 |
cleptric |
The auth plugin is not quite ready yet. I would recommend using the AuthComponent in the mean time. |
# |
Jul 24th 2017, 12:50 |
lorenzo |
or that you are doing something that I did not understand |
# |
Jul 24th 2017, 12:49 |
lorenzo |
most probably your code |
# |
Jul 24th 2017, 12:49 |
hmic |
just put "use Cake\Datasource\ModelAwareTrait;" in the top of your class - INSIDE the class! and the loadModel() method will be available to you, like in the controllers. |
# |
Jul 24th 2017, 12:49 |
birdy247 |
@lorenzo it would be good to know if this is a Bug with cake or my code |
# |
Jul 24th 2017, 12:48 |
sonu_nk |
ah again i am not aware about this " modelAwareTrait " .. some intro please |
# |
Jul 24th 2017, 12:46 |
hmic |
but it will get there ;-) |
# |
Jul 24th 2017, 12:45 |
hmic |
as the middlewares got introduced past 3.0, it's not quite how it is by now |
# |
Jul 24th 2017, 12:45 |
hmic |
should |
# |
Jul 24th 2017, 12:45 |
sonu_nk |
so hmic in cakephp3 every authentication and common method should come in middleware or i am wrong ? |
# |
Jul 24th 2017, 12:45 |
hmic |
or use the modelAwareTrait trait the controllers use too to be able to use $this->loadModel() if you like that better. |
# |
Jul 24th 2017, 12:43 |
sonu_nk |
honesly i was not aware about this... |
# |
Jul 24th 2017, 12:43 |
sonu_nk |
hmic, you encourage me to use this middleware ..thanx to you.. |
# |
Jul 24th 2017, 12:43 |
hmic |
yes |
# |
Jul 24th 2017, 12:42 |
sonu_nk |
should i create use Cake\ORM\TableRegistry; in my //In src/Middleware/VerifyApiKeysMiddleware.php to make a communication with DB ? |
# |
Jul 24th 2017, 12:07 |
lorenzo |
ah ok |
# |
Jul 24th 2017, 12:02 |
birdy247 |
but wanted to check if they are called |