# |
Apr 30th 2019, 15:23 |
this.impetus |
Soo... it seems like cake, when generating a form field for a database object with a `name` field, uses the hyphenated, **lower case**, version of that field for generating html ids. I can't find a method in either of the Inflector or Text utilities that does precisely this (`Inflector::slug()` does it but is deprecated and `Text:slug()` ignores case. Trying to hook up a JS app here and need my views to generate strings to match the IDs |
# |
Apr 30th 2019, 14:38 |
neothermic |
just 158 more to go |
# |
Apr 30th 2019, 14:38 |
neothermic |
Well, that's one less use of set that I have to change |
# |
Apr 30th 2019, 14:38 |
neon1024 |
Few path updates, few folder and file name changes |
# |
Apr 30th 2019, 14:38 |
neon1024 |
Yeah, 4.0.0-alpha1 wasn’t all that different |
# |
Apr 30th 2019, 14:37 |
dereuromark |
most is method signature and can be automated. not much left. |
# |
Apr 30th 2019, 14:37 |
dereuromark |
nah, 2.x++ was panic. nowadays super simple. |
# |
Apr 30th 2019, 14:37 |
neothermic |
Migrating from 3.x to 4.x: Panic! |
# |
Apr 30th 2019, 14:37 |
dereuromark |
Or more importantly contribute to rector tool to have a full auto-upgrade map there for trivial things. Swarm efforts |
# |
Apr 30th 2019, 14:36 |
dereuromark |
People should start adding notes for 4.x :slightly_smiling_face: |
# |
Apr 30th 2019, 14:35 |
neothermic |
indeed! |
# |
Apr 30th 2019, 14:35 |
admad |
@dereuromark is the patron saint of CakePHP upgrades |
# |
Apr 30th 2019, 14:34 |
neothermic |
aha, https://github.com/dereuromark/cakephp-upgrade/wiki/Tips-Upgrading-to-CakePHP-2.x-3.x |
# |
Apr 30th 2019, 14:33 |
neothermic |
hmm, I seem to remember there's a page somewhere with a cheat sheet on going from Set to Hash, but I can't find it |
# |
Apr 30th 2019, 13:54 |
ricksaccous |
@voycey i just add more fields to the group by, heh |
# |
Apr 30th 2019, 13:23 |
charolastra |
right, but running bin/cake CLI stuff doesn't seem to call that method |
# |
Apr 30th 2019, 13:18 |
admad |
https://book.cakephp.org/3.0/en/plugins.html#loading-a-plugin |
# |
Apr 30th 2019, 13:17 |
charolastra |
loading plugins has moved to Application::bootstrap(), right? |
# |
Apr 30th 2019, 11:51 |
dereuromark |
-p PluginName, as usual (and how --help would display) |
# |
Apr 30th 2019, 11:42 |
charolastra |
how to run migrations of plugins? cakephp-queue seems to have changed its DB definitions |
# |
Apr 30th 2019, 11:34 |
conehead |
but thanks! |
# |
Apr 30th 2019, 11:33 |
conehead |
@neon1024 well, using $entity->set seems to work as well. At least seems to be a better solution than setting it directly. Don't wanna convert objects to array data first so it gets converted back afterwards |
# |
Apr 30th 2019, 10:45 |
neon1024 |
Patch entity will work with array data though, but it must be organised correctly |
# |
Apr 30th 2019, 10:44 |
neon1024 |
Unless you’re going to save it |
# |
Apr 30th 2019, 10:44 |
neon1024 |
Although worth noting in the above instance, you might want to set an array of Tag entities |
# |
Apr 30th 2019, 10:44 |
neon1024 |
If you’re setting properties specifically perhaps you’re looking for `$entity->set('tags', $arrayOfTags)` |
# |
Apr 30th 2019, 10:43 |
neon1024 |
@conehead Er, well patchEntity is designed to patch request data into an entity, but it should set properties for anything which matches |
# |
Apr 30th 2019, 10:27 |
conehead |
Or is patchEntity only made for marshalling? |
# |
Apr 30th 2019, 10:24 |
conehead |
Hm...can't I `patchEntity` an object with other objects. e.g. `$this->patchEntity($object, ['tags' => $arrayOfTagObjects])` will not add the desired tags `object->tags = $arrayOfTagObjects` whereas works as desired |
# |
Apr 30th 2019, 10:20 |
charolastra |
cool, solved it :) |
# |
Apr 30th 2019, 10:18 |
neon1024 |
This is the specific line it’s complaining about https://github.com/cakephp/app/blob/master/src/Application.php#L79 |
# |
Apr 30th 2019, 10:18 |
neon1024 |
https://github.com/cakephp/app/blob/master/src/Application.php#L61 |
# |
Apr 30th 2019, 10:18 |
neon1024 |
Should be in the Application.php |
# |
Apr 30th 2019, 10:15 |
charolastra |
hi, working on upgrading an app from 3.4 to 3.7 but get warnings with "RoutingMiddleware should be passed an application instance." where is the RoutingMiddleware instantised? |
# |
Apr 30th 2019, 09:47 |
neon1024 |
Morning all :wave: |
# |
Apr 30th 2019, 08:58 |
nils |
I'm looking to use Gearman more effectively. Right now I can't use any of the native cakephp functions. Or at least, I don't know how. Anyone with experience from this? |
# |
Apr 30th 2019, 07:07 |
nils |
Oh, I thought that was just a plugin to use Gearman more effectively. My bad. :slightly_smiling_face: |
# |
Apr 30th 2019, 07:06 |
conehead |
But it says ```Overall functionality is inspired by systems like Gearman, Beanstalk or dropr, but without any illusion to compete with these more advanced Systems.``` |
# |
Apr 30th 2019, 07:06 |
conehead |
Well you were asking for a more modern way ;) |
# |
Apr 30th 2019, 07:05 |
nils |
@conehead I haven't used a plugin, simply using it "natively" - it works quite alright. |
# |
Apr 30th 2019, 07:04 |
conehead |
@nils Not really sure, but shouldnt marks queue plugin what you are looking for? https://github.com/dereuromark/cakephp-queue/tree/2.x |