# |
Apr 2nd 2019, 14:07 |
weto.jc |
I changed the php version of docker, it looks like it worked, I'll do more testing. |
# |
Apr 2nd 2019, 13:54 |
dereuromark |
yeah, and old 2.x core |
# |
Apr 2nd 2019, 13:53 |
neon1024 |
I think that’s a PHP 7 issue right? |
# |
Apr 2nd 2019, 13:44 |
dereuromark |
make sure you run php in low enough version. there arent many workarounds otherwise than upgrading to latest 2.x |
# |
Apr 2nd 2019, 13:43 |
weto.jc |
Good morning staff, I'm creating a Docker environment for a legacy Cakephp application (version 2.x), but I'm having a problem starting the application version: ``` Fatal error: Cannot use 'Object' as class name as it is reserved in /var/www/html/lib/Cake/Core/Object.php on line 26``` how do you solve this problem without application upgrade? |
# |
Apr 2nd 2019, 11:43 |
challgren |
810498 |
# |
Apr 2nd 2019, 11:33 |
berarma |
@abdualelah.mdy, I guess you're trying to extend the object. You shoud call the initialize method from the UsersTable object. |
# |
Apr 2nd 2019, 11:17 |
challgren |
Would be helpful is RepositoryInterface included aliasField() instead of just getAlias() |
# |
Apr 2nd 2019, 11:06 |
challgren |
But I’m not 100% sure, I use a custom table because I use some of @dereuromark’s plugins such as ShimTable and my own AppTable |
# |
Apr 2nd 2019, 11:06 |
abdualelah.mdy |
I will give try. Thank you have been a great help @challgren |
# |
Apr 2nd 2019, 11:03 |
challgren |
You might need a $this->setTable(‘users’); in your initialize(array $config) |
# |
Apr 2nd 2019, 11:02 |
abdualelah.mdy |
so by doing this . will i have the same table as the plugin? |
# |
Apr 2nd 2019, 11:01 |
slackebot2 |
<abdualelah.mdy> |
# |
Apr 2nd 2019, 11:01 |
challgren |
Yep! Thanks for the tip! Also 3.8 beta 1 is doing great so far |
# |
Apr 2nd 2019, 11:00 |
steinkel |
that's the reason for aliasField |
# |
Apr 2nd 2019, 10:59 |
steinkel |
very similar to what you do, see ORM/Table.php:445 |
# |
Apr 2nd 2019, 10:59 |
challgren |
Was tired of the damm ambiguous column warnings so that was my quick hack |
# |
Apr 2nd 2019, 10:58 |
challgren |
Ohh ok, I’ll have to switch to that. Still learning the 3.x setup |
# |
Apr 2nd 2019, 10:58 |
steinkel |
I usually do `$this->aliasField('active')` instead of `$this->getAlias() . '.active'` |
# |
Apr 2nd 2019, 10:57 |
steinkel |
nice example @challgren |
# |
Apr 2nd 2019, 10:55 |
slackebot2 |
<challgren> |
# |
Apr 2nd 2019, 10:54 |
slackebot2 |
<challgren> |
# |
Apr 2nd 2019, 10:53 |
challgren |
Yeah let me show you my example users table/entityu |
# |
Apr 2nd 2019, 10:53 |
challgren |
But personally I’m getting ready for the 9.x release on the develop branch. Since it uses the new Authentication and Authorization middleware |
# |
Apr 2nd 2019, 10:53 |
abdualelah.mdy |
will inherit all behaviors entities functions? |
# |
Apr 2nd 2019, 10:51 |
challgren |
https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md |
# |
Apr 2nd 2019, 10:50 |
abdualelah.mdy |
I want to reuse their model (i don't want my model ) -> for API logic |
# |
Apr 2nd 2019, 10:48 |
slackebot2 |
<challgren> |
# |
Apr 2nd 2019, 10:47 |
challgren |
@abdualelah.mdy yes, you just need to specify it in your users.php config |
# |
Apr 2nd 2019, 10:45 |
acosonic |
Any way to solve this get_setting function so that it uses currently used data-source, not just default...? https://gist.github.com/acosonic/5cd559baff78bd815ea4e4e5e416152b speaking about Cake2 ...? |
# |
Apr 2nd 2019, 10:42 |
abdualelah.mdy |
@challgren you use cakedc/user .right? I noticed that the plugin is using its own model . can I have its model as mine? |
# |
Apr 2nd 2019, 10:29 |
challgren |
Having an issues where PDFs are set as text/plain for the content type |
# |
Apr 2nd 2019, 10:25 |
challgren |
Anyone using FOC/cakephp-upload for uploading files to S3? |
# |
Apr 2nd 2019, 09:40 |
dereuromark |
crazy world |
# |
Apr 2nd 2019, 09:39 |
challgren |
See all you gotta do is think about the bug/feature and @dereuromark will implement it before you can even report it :P |
# |
Apr 2nd 2019, 09:38 |
challgren |
https://github.com/cakephp/migrations/pull/387 |
# |
Apr 2nd 2019, 09:37 |
dereuromark |
see open pr :) |
# |
Apr 2nd 2019, 09:36 |
challgren |
@willem I noticed this too and I believe its a Migrations bug that has yet to be reported |
# |
Apr 2nd 2019, 09:23 |
willem |
this is in the migrations help `-x, --dry-run Dump queries to standard output instead of executing it` but running migrate with -x shows: `Error: Unknown short option 'x'` |
# |
Apr 2nd 2019, 08:47 |
neon1024 |
snake-venom: I’d suggest writing your own api authentication adapter |
# |
Apr 2nd 2019, 08:46 |
roel |
Hello everyone, Currently I am using the Translate Behavior to save translations for my entities. Whenever I save an entity which has no translations (yet), it will save that record with a `NULL` value in my "default" table and it will set the actual value in the translationsTable. I would like the value to be stored in the "default" table and only the translations in the translations table. Thanks in advance. |