Log message #4182881

# At Username Text
# Apr 11th 2019, 14:14 dereuromark https://github.com/dereuromark/cakephp-shim/blob/2.x/Model/ShimModel.php#L312-L338 => saveFieldById() is the proper one for 2.x, and the other one can throw soft deprecation notice to help upgrading. Just have to leverage the right planning and tooling to make things easier for you.
# Apr 11th 2019, 14:14 ricksaccous 4 is non-deprecated 3
# Apr 11th 2019, 14:13 neothermic I suspect I'll get to 3 and you'll all be in 4 ;)
# Apr 11th 2019, 14:13 ricksaccous weeeee
# Apr 11th 2019, 14:13 ricksaccous join us in 3 we're waiting for you :slightly_smiling_face:
# Apr 11th 2019, 14:12 neothermic 1.3 to 2.x took ~3 months and that was with the upgrade console too
# Apr 11th 2019, 14:12 neothermic this codebase is.. fun
# Apr 11th 2019, 14:12 dereuromark nah, the original one is bad, it uses a stateful ->id usually
# Apr 11th 2019, 14:11 admad or make all your table extends an `AppTable` which implements that method
# Apr 11th 2019, 14:11 dereuromark actually, if you were pro-active you could have fixed it already in 2.x to use the shim version there, wich works future-proof :slightly_smiling_face:
# Apr 11th 2019, 14:11 neothermic oh, the shim puts it back?
# Apr 11th 2019, 14:11 dereuromark problem solved
# Apr 11th 2019, 14:11 dereuromark or use the shim plugin :slightly_smiling_face:
# Apr 11th 2019, 14:10 neothermic that's painful. if saveField is gone from 3.0, I have 112 places to fix to migrate this codebase :P
# Apr 11th 2019, 13:38 conehead just seen the service layer plugin the first time. I really like the idea of having a service layer. Might try it out when I finished migrating!
# Apr 11th 2019, 13:28 ricksaccous you can do it!
# Apr 11th 2019, 13:20 admad time to dig the trenches
# Apr 11th 2019, 13:20 neon1024 Moral is wavering!
# Apr 11th 2019, 13:20 admad hah
# Apr 11th 2019, 13:20 neon1024 Day three!
# Apr 11th 2019, 13:20 neon1024 In that horrible zone where it works locally, the test suite passes, the dev versions of the consuming front-ends work, but prod is not happy
# Apr 11th 2019, 13:20 admad marching forward or retreating in the battle? :slightly_smiling_face:
# Apr 11th 2019, 13:19 neon1024 I’m battling with league/fractal at the moment
# Apr 11th 2019, 13:19 neon1024 Then there are the form resource bits I think
# Apr 11th 2019, 13:19 neon1024 Then everything in my fork is covered off in the plugin I think
# Apr 11th 2019, 13:18 neon1024 I’d like to get the pagination in ideally
# Apr 11th 2019, 13:18 admad you can now start working on cake 4 compatible v3 :P
# Apr 11th 2019, 13:18 admad @neon1024 2.0.0 tagged
# Apr 11th 2019, 13:13 dereuromark a propos ide autocomplete: @burzum, i have a small PR: https://github.com/burzum/cakephp-service-layer/pull/11
# Apr 11th 2019, 13:12 neon1024 Oooh! :tada:
# Apr 11th 2019, 13:11 admad @neon1024 waiting for travis to give the green https://github.com/UseMuffin/Webservice/pull/85
# Apr 11th 2019, 13:05 admad anything that can be easily achieved with a plugin doesn't need to be in core :slightly_smiling_face:
# Apr 11th 2019, 13:05 neon1024 Agreed, and it’s worth noting that because you think a feature is great, doesn’t mean it needs to be in the framework. You are not confined to the framework, you can add your own bits too!
# Apr 11th 2019, 13:03 admad and those annotations can be updated later on if you change table fields by using @dereuromark's IdeHelper plugin
# Apr 11th 2019, 13:02 admad https://github.com/cakephp/bake/blob/master/tests/comparisons/Model/testBakeEntitySimple.php#L9
# Apr 11th 2019, 13:01 admad in case you haven't noticed baked entities do have annotations for the magic methods
# Apr 11th 2019, 13:00 admad framework can't always cater to everyone's preferences
# Apr 11th 2019, 12:59 admad still anyone who prefers magic methods can achieve it with their own entity class with a few lines of code
# Apr 11th 2019, 12:57 admad @val 1. it's a matter of perception 2. IDE autocompletion would be no different for magic methods vs magic props, both need annotations. Infact using getter method like you propose would mean typing extra 3 chars "get" each time before you start getting useful autocompletion 3. This is PHP not Java :slightly_smiling_face:
# Apr 11th 2019, 12:46 dereuromark Setting on properties is indeed not nice, thus I do not use this for the Dto plugin. Providing the actual methods via generated code is the smartest and best option if you know the fields. With entities and virtual fields or alike this is too tricky to do probably. thus the simple (magic) property way here.
# Apr 11th 2019, 12:39 val Of course, a plugin could be used or a custom implementation. But it would be nice to have such basic features in the framework. IMHO.