# |
Jun 19th 2018, 16:09 |
rquadling |
I am a "phinx dude". Ha !!! |
# |
Jun 19th 2018, 16:09 |
josbeir |
i have no answer for you, best check with phinx dudes :slightly_smiling_face: |
# |
Jun 19th 2018, 16:09 |
rquadling |
So overrides the standard. |
# |
Jun 19th 2018, 16:08 |
rquadling |
Interestingly, the phpcs.xml.dist is PSR2, but the composer.json file run script uses --standard=vendor/cakephp/cakephp-codesniffer/CakePHP |
# |
Jun 19th 2018, 16:07 |
josbeir |
not cake |
# |
Jun 19th 2018, 16:07 |
josbeir |
but you said phinx codebase, thats using PSR2... |
# |
Jun 19th 2018, 16:07 |
rquadling |
I ran composer cs-fix and got no changes. Reformatted in PHPStorm. LOAD of changes. Re-ran composer cs-fix. Nothing. Seems that the majority of w/s issues aren't defined in CakePHP's definition. Don't want to push a load of w/s for no reason. |
# |
Jun 19th 2018, 16:05 |
josbeir |
that should be improved as well :P |
# |
Jun 19th 2018, 16:05 |
josbeir |
thats right |
# |
Jun 19th 2018, 16:04 |
rquadling |
Seems that the CakePHP standard doesn't define things like blank lines after file level docblock, or before @return / return. |
# |
Jun 19th 2018, 16:01 |
josbeir |
thats good, does phpcbf fix that automatically ? |
# |
Jun 19th 2018, 16:01 |
admad |
@josbeir it's intended to be changed in next major |
# |
Jun 19th 2018, 16:00 |
josbeir |
use sorting should be improved tho :P |
# |
Jun 19th 2018, 16:00 |
rquadling |
Aha! Found it. |
# |
Jun 19th 2018, 15:58 |
admad |
I would say CakePHP's standard since it's now part of the cake family |
# |
Jun 19th 2018, 15:58 |
rquadling |
Yes,. |
# |
Jun 19th 2018, 15:58 |
admad |
@rquadling coding standard? |
# |
Jun 19th 2018, 15:54 |
rquadling |
What c/s should be applied to the Phinx code base? Or is this not really a concern? |
# |
Jun 19th 2018, 15:14 |
mdunham |
https://imgur.com/a/5zIF9I3 |
# |
Jun 19th 2018, 15:14 |
mdunham |
howdy |
# |
Jun 19th 2018, 15:07 |
mari_ |
however i am lost from now on what do i have to adjust regarding the "table / model" |
# |
Jun 19th 2018, 15:07 |
mari_ |
and updated the app.default.php with this: 'Session' => [ 'defaults' => 'database' ] |
# |
Jun 19th 2018, 15:06 |
mari_ |
i created the database table liuke this: CREATE TABLE `sessions` ( `id` char(40) CHARACTER SET ascii COLLATE ascii_bin PRIMARY KEY, `created` datetime DEFAULT CURRENT_TIMESTAMP, -- Optional `modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Optional `data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob `expires` int(10) unsigned DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
# |
Jun 19th 2018, 15:06 |
mari_ |
i have troubles understanding the chapter with database sessions on cakephp 3.6 |
# |
Jun 19th 2018, 15:05 |
mari_ |
hi all! |
# |
Jun 19th 2018, 14:40 |
birdy247 |
If saving to a join table, that is using "cake magic", whats the best way to validate at least 1 is selected |
# |
Jun 19th 2018, 14:29 |
kaliel |
ok, what's important is that i get my results, i'll dig into it to try the same with a single query |
# |
Jun 19th 2018, 14:28 |
kaliel |
erro :slightly_smiling_face: |
# |
Jun 19th 2018, 14:27 |
neon1024 |
Just call `->first()` after the `->where()` I think |
# |
Jun 19th 2018, 14:27 |
kaliel |
but is there a way for "contain" to return a single entity instead of array ? |
# |
Jun 19th 2018, 14:27 |
neon1024 |
:thumbsup: |
# |
Jun 19th 2018, 14:26 |
kaliel |
File uploaded https://cakesf.slack.com/files/U38NH0S01/FB9ULC4AG/-.php / https://slack-files.com/T053DPNCM-FB9ULC4AG-80c5c7a040 - <@U1BT622HW> thanks to your advices, now get it working like this : |
# |
Jun 19th 2018, 14:19 |
neon1024 |
Bad times yo |
# |
Jun 19th 2018, 14:19 |
neon1024 |
Just don’t use a custom header like I did |
# |
Jun 19th 2018, 14:18 |
LubosR |
mikesmoniker use https://github.com/ADmad/cakephp-jwt-auth |
# |
Jun 19th 2018, 14:18 |
neon1024 |
I wrote my own for our web service |
# |
Jun 19th 2018, 14:18 |
neon1024 |
I would recommend using Bearer token auth and your own Auth adapter |
# |
Jun 19th 2018, 14:17 |
mikesmoniker |
Is it possible to use Cake’s build in basic auth functionality w/ just a username or password (i.e. an “api token”) through configuration or would I need to write my own version of the auth component? |
# |
Jun 19th 2018, 14:12 |
neon1024 |
Perhaps it just needs `return $query->where(['Bids.prix' => $query->func()->max('Bids.prix')]);` ? |
# |
Jun 19th 2018, 14:11 |
kaliel |
@neon1024 Thanks, but it didn't do the trick :S |
# |
Jun 19th 2018, 14:11 |
neon1024 |
Why is it that when I post to my method, which has `$this->getRequest()->allowMethod('post');` I get a Method Not Allowed exception?! I’m using the correct method |