# |
Dec 18th 2019, 11:15 |
dereuromark |
avoid using custom constants :) |
# |
Dec 18th 2019, 11:14 |
gianmarxgagliardi |
it works but it gives me some warnings ```Warning (2): Use of undefined constant full_name - assumed 'full_name' (this will throw an Error in a future version of PHP) [APP/Controller\SeasonTrainersController.php, line 62]``` |
# |
Dec 18th 2019, 11:09 |
gianmarxgagliardi |
it's works thanks |
# |
Dec 18th 2019, 10:54 |
challgren |
Virtual fields would be your friend |
# |
Dec 18th 2019, 10:54 |
challgren |
@gianmarxgagliardi https://book.cakephp.org/3/en/orm/entities.html#creating-virtual-fields |
# |
Dec 18th 2019, 10:53 |
gianmarxgagliardi |
in this way it returns the fields "name" and "surname" divided by a semicolon to avoid this I have to write a separate function or there is another way `$trainersUnmated=$this->SeasonTrainers->Trainers->find('list',['keyField' => 'id','valueField' =>['name','surname']])->notMatching('SeasonTrainers');` the result I get is e.g. `John; Milton` but I would like `John Milton` |
# |
Dec 18th 2019, 10:45 |
javier.villanueva |
thanks! |
# |
Dec 18th 2019, 10:43 |
challgren |
```$query = $articles->find()->contain('Comments', function (Query $q) { return $q->find('approved')->find('popular'); });``` |
# |
Dec 18th 2019, 10:41 |
javier.villanueva |
I have a custom finder in a table "Tasks" , Tasks belongsTo Users. If I find $this->Users->find()->contain(['Tasks']); Can I apply my custom finder ? |
# |
Dec 18th 2019, 10:37 |
rochasmarcelo |
remove composer.lock and update composer.json |
# |
Dec 18th 2019, 10:33 |
SvenBuis |
Yes, I will if I find any :) . To bad some of the 3rd party plugins I used are no longer maintained. Some I already had to fork to make them 3.8 compatible. If I find the time I will probably write my own plugin for those |
# |
Dec 18th 2019, 10:32 |
challgren |
And if the plugin doesn’t support cake 4.x help the community out and do a PR for 4.x support. Most 3.8 code should support 4.x without an issue |
# |
Dec 18th 2019, 10:31 |
SvenBuis |
So it might be possible to update cake and the plugin at once, that would be the easiest way hehe |
# |
Dec 18th 2019, 10:31 |
SvenBuis |
Okay. I will give that a go |
# |
Dec 18th 2019, 10:31 |
neon1024 |
..and `composer outdated -D` |
# |
Dec 18th 2019, 10:30 |
neon1024 |
Also try `composer why` and `composer why-not` |
# |
Dec 18th 2019, 10:30 |
neon1024 |
I’d probably hunt the plugins on Packagist.org to see which version constraints are, and updated my `composer.json` file with the new versions and then try updating |
# |
Dec 18th 2019, 10:30 |
jotpe |
Yes |
# |
Dec 18th 2019, 10:30 |
SvenBuis |
So, basically remove plugins, update Cake, install (newer versions) of the plugins |
# |
Dec 18th 2019, 10:29 |
jotpe |
I would try to remove the plugins first and upgrade the core app. Then update the plugins one after the other |
# |
Dec 18th 2019, 10:28 |
challgren |
You might need to specify dev-4.x for the plugin version |
# |
Dec 18th 2019, 10:28 |
SvenBuis |
Yes, but in this case the plugin has a 4.x branche. But updating to that branche gives the error that I have Cake 3.x installed, updating to Cake 4 gives the error that the plugin requires 3.x |
# |
Dec 18th 2019, 10:27 |
pieceof |
and here ima stuck |
# |
Dec 18th 2019, 10:27 |
challgren |
Over time most will update or die off |
# |
Dec 18th 2019, 10:27 |
challgren |
@svenbuis it really depends on the plugins, I know a lot dont have 4.x support just yet |
# |
Dec 18th 2019, 10:26 |
pieceof |
in my case they were lookin for someone with cakephp but i had only a bit of symfony got hired by luck i guess, there were a senior developing a crm with cake they tested several frameworks found cake to be out of the box more secure than the rest in that time |
# |
Dec 18th 2019, 10:26 |
SvenBuis |
This seems to me like a ‘chicken-egg’ problem. So I would like your advise, what is the best way to solve this. |
# |
Dec 18th 2019, 10:26 |
SvenBuis |
Hello, I have a question about how to upgrade to CakePHP 4. I have some plugins that require CakePHP 3.x at this moment (but versions for CakePHP 4 are available). But when I try to update to CakePHP 4, I get the message that this is not allowed by the plugin. When trying to update the plugin first I get the message that is requires CakePHP 4.x. |
# |
Dec 18th 2019, 10:24 |
neon1024 |
As I think it’s important to help CakePHP compete with other frameworks |
# |
Dec 18th 2019, 10:24 |
neon1024 |
I am always curious what brings people to the framework and how newcomers find the first contact experience with the framework |
# |
Dec 18th 2019, 10:24 |
gianmarxgagliardi |
@neon1024 why all these questions? |
# |
Dec 18th 2019, 10:23 |
javier.villanueva |
phpstorm the best |
# |
Dec 18th 2019, 10:23 |
jotpe |
vim for the win :troll: |
# |
Dec 18th 2019, 10:23 |
challgren |
Ewww Netbeans!!! |
# |
Dec 18th 2019, 10:23 |
neon1024 |
Netbeans :face_vomiting: |
# |
Dec 18th 2019, 10:22 |
pieceof |
netbeans, notepad++, em editor (for dumps) |
# |
Dec 18th 2019, 10:22 |
challgren |
https://www.jetbrains.com/shop/eform/startup |
# |
Dec 18th 2019, 10:22 |
challgren |
Oh and if you email them for a startup you get 50% off |
# |
Dec 18th 2019, 10:22 |
jotpe |
Protip: For educational organizations PHPStorm has a free license. |
# |
Dec 18th 2019, 10:21 |
challgren |
Plus Mr. Plugin wrote a great plugin called dereuromark/ide-helper that automatically annotes your code for you |
# |
Dec 18th 2019, 10:21 |
challgren |
PHPStorm has a 30 day trial |