# |
Jan 3rd 2019, 16:30 |
yamcomnet |
thanks again @jeremyharris |
# |
Jan 3rd 2019, 16:29 |
yamcomnet |
ok. that makes sense then |
# |
Jan 3rd 2019, 16:27 |
jeremyharris |
as per the docs, the CSRF protection is only for PATCH, POST, PUT, or DELETE |
# |
Jan 3rd 2019, 16:27 |
yamcomnet |
or Ajax |
# |
Jan 3rd 2019, 16:27 |
yamcomnet |
ok. seems that it works on POST requests but not on GET |
# |
Jan 3rd 2019, 16:18 |
yamcomnet |
ok. will test |
# |
Jan 3rd 2019, 16:13 |
jeremyharris |
what kind of test? if you just want to test via the browser, change the token and it will blackhole. or, POST without a token |
# |
Jan 3rd 2019, 16:12 |
yamcomnet |
hmm. what is the easiest way to test if Csrf middleware works? |
# |
Jan 3rd 2019, 16:05 |
ricksaccous |
who knows |
# |
Jan 3rd 2019, 16:05 |
ricksaccous |
might be able to just copy paste stuff |
# |
Jan 3rd 2019, 16:05 |
ricksaccous |
http://php.net/manual/en/function.version-compare.php#89416 |
# |
Jan 3rd 2019, 16:00 |
dereuromark |
Darn, everything you have to do yourself :P |
# |
Jan 3rd 2019, 16:00 |
jeremyharris |
I would as well, in composer |
# |
Jan 3rd 2019, 16:00 |
dereuromark |
i would expect to have sth in composer to normalize this |
# |
Jan 3rd 2019, 16:00 |
jeremyharris |
it’s for comparing PHP versions first and foremost |
# |
Jan 3rd 2019, 15:59 |
jeremyharris |
well your “o” is wrong based on the docs |
# |
Jan 3rd 2019, 15:59 |
dereuromark |
from a composer perspective they are the same |
# |
Jan 3rd 2019, 15:59 |
dereuromark |
thats nonsense imo |
# |
Jan 3rd 2019, 15:59 |
jeremyharris |
from SO: “You’re comparing one PHP-standardized version number string with one non-PHP-standardized version number string” https://stackoverflow.com/questions/10997482/php-version-compare-returns-1-when-comparing-5-2-and-5-2-0 |
# |
Jan 3rd 2019, 15:58 |
jeremyharris |
it is expected |
# |
Jan 3rd 2019, 15:57 |
dereuromark |
Same result for Comparator::equalTo() of composer, But I am fairly certain this is not correct.. |
# |
Jan 3rd 2019, 15:54 |
dereuromark |
is this a php bug? `1.4` and `1.4.0` should be equal right? version_compare($definedMinimum, $version, '=') for this says false? |
# |
Jan 3rd 2019, 14:52 |
jhall |
ok |
# |
Jan 3rd 2019, 14:52 |
dereuromark |
as for model validation. check if it is part of the incoming data in beforemarshall etc. then you could do it, otherwise this almost sounds like a domain validation |
# |
Jan 3rd 2019, 14:51 |
jhall |
ok |
# |
Jan 3rd 2019, 14:51 |
dereuromark |
one can easily disable that, making your validation fail semantically |
# |
Jan 3rd 2019, 14:51 |
dereuromark |
template and required attribute must never be the primary one. only syntactic sugar |
# |
Jan 3rd 2019, 14:49 |
jhall |
or is that going to be done in the template programatically applying the required attribute? |
# |
Jan 3rd 2019, 14:49 |
jhall |
like I want a field to be required only if another model's field is true |
# |
Jan 3rd 2019, 14:48 |
jhall |
is using an entity method the way to go? |
# |
Jan 3rd 2019, 14:47 |
jhall |
If I wanted to apply a rule check based on another model's value what does that look like? |
# |
Jan 3rd 2019, 14:11 |
prasanna.venkat |
unable to update hasmany associated data, data getting inserted instead of update |
# |
Jan 3rd 2019, 12:45 |
rogerpro |
Happy new year, mates! I wonder if CakePHP 2 implements a way for a model to use an SQL UNION statement, so, using 2 db tables together. Or I must just set no table and build the union manually. |
# |
Jan 3rd 2019, 12:21 |
dereuromark |
eaiser just reuse or see docs about prefix |
# |
Jan 3rd 2019, 12:08 |
asdfgh |
should i use follow this "design" or can i think about a tags system that avoid me creating many tables |
# |
Jan 3rd 2019, 12:07 |
asdfgh |
now i do agents_hobbies (linked to hobbies and agents) agents_experiences (linked to experiences and agents) and so on |
# |
Jan 3rd 2019, 12:07 |
asdfgh |
so i would like to tag with more types an agent |
# |
Jan 3rd 2019, 12:06 |
asdfgh |
dereuromark i mean that a table can have many types of tags, i mean...for example my agents table can have hobbies tags, experiences tags etc |
# |
Jan 3rd 2019, 11:51 |
dereuromark |
what u mean? |
# |
Jan 3rd 2019, 10:56 |
asdfgh |
i would like to use your cakephp-tags, can i add more tags "types" to the same table ? |
# |
Jan 3rd 2019, 10:56 |
asdfgh |
HI! dereuromark are you there? |