# |
Mar 8th 2018, 15:59 |
neon1024 |
Wow, quite a bit then! Thanks, I’ll have a read of the code an see if a more concrete implementation helps get it into my brain |
# |
Mar 8th 2018, 15:58 |
lorenzo |
formatResults is a decorator of the result set |
# |
Mar 8th 2018, 15:58 |
lorenzo |
the code that converts the rows to entities is a decorator of the statement… |
# |
Mar 8th 2018, 15:58 |
lorenzo |
the code that casts the results to the right type (int, dates…) is a decorator of the statement |
# |
Mar 8th 2018, 15:57 |
lorenzo |
the statement object is a decorator for pdo statement |
# |
Mar 8th 2018, 15:57 |
lorenzo |
I sued decorator for a bunch of stuff, but where it is more obvious is in the result set |
# |
Mar 8th 2018, 15:56 |
neon1024 |
@lorenzo The decorator in the ORM, is that for the query building, the sql, or the entities? I’m unsure |
# |
Mar 8th 2018, 15:55 |
ricksaccous |
heh |
# |
Mar 8th 2018, 15:55 |
ricksaccous |
so no issue |
# |
Mar 8th 2018, 15:55 |
ricksaccous |
i see, so the issue with the docs is actually probably a difference in version between me and repo rather than a bug |
# |
Mar 8th 2018, 15:55 |
em. |
ok, thx! |
# |
Mar 8th 2018, 15:55 |
lorenzo |
haha |
# |
Mar 8th 2018, 15:55 |
lorenzo |
@em. that is a really bad error message, it actaully should say “the table you are trying to use does not exist. please check your database or for typos” |
# |
Mar 8th 2018, 15:55 |
savant |
my favorite pattern is to write code and have @lorenzo write the tests |
# |
Mar 8th 2018, 15:54 |
lorenzo |
decorator is one of my favorite patterns :slightly_smiling_face: |
# |
Mar 8th 2018, 15:54 |
em. |
This is something new… “Cannot describe sessions. It has 0 columns.” |
# |
Mar 8th 2018, 15:54 |
neon1024 |
Or try `composer outdated` |
# |
Mar 8th 2018, 15:54 |
ricksaccous |
ok |
# |
Mar 8th 2018, 15:54 |
ricksaccous |
ahhhh |
# |
Mar 8th 2018, 15:54 |
neon1024 |
I’d have a look in your composer.lock |
# |
Mar 8th 2018, 15:54 |
savant |
its currently 3.8.0 |
# |
Mar 8th 2018, 15:54 |
savant |
check the releases |
# |
Mar 8th 2018, 15:53 |
ricksaccous |
how do i know the version of cakephpupload that's on your repo? |
# |
Mar 8th 2018, 15:50 |
neon1024 |
@savant I remember that big Jose demonstrated the Command pattern and DI container using Pimple at the Cakefest workshops, but I didn’t take enough notes at the time |
# |
Mar 8th 2018, 15:46 |
neon1024 |
I didn’t read that one yet. `Facade::read(false)` |
# |
Mar 8th 2018, 15:45 |
neon1024 |
I don’t know if some of the Registry stuff counts as a Facade |
# |
Mar 8th 2018, 15:45 |
neon1024 |
Service locator pattern is in there as well as the Repository pattern. Those are the ones I know of |
# |
Mar 8th 2018, 15:45 |
savant |
like we support DI (just dont have a container and everyone gets really upset if you dont have a super-global to contain your stuff) |
# |
Mar 8th 2018, 15:44 |
neon1024 |
My focus this year is trying to work slower and invest more in code quality, I think patterns can help with that to some degree |
# |
Mar 8th 2018, 15:44 |
savant |
We use a ton of fun patterns in cake3 |
# |
Mar 8th 2018, 15:44 |
neon1024 |
Let alone trying to remember them! |
# |
Mar 8th 2018, 15:43 |
neon1024 |
I agree, but it’s also hard to know when you need a pattern I find |
# |
Mar 8th 2018, 15:43 |
neon1024 |
@savant I think the CakePHP ORM uses the Decorator pattern |
# |
Mar 8th 2018, 15:43 |
savant |
I think thats a trap many devs fall into |
# |
Mar 8th 2018, 15:43 |
savant |
@neon1024 maybe, but I havent ever purposefully been like “I have this problem, I wonder what pattern I should use :thinking_face: ” |
# |
Mar 8th 2018, 15:42 |
ricksaccous |
sure |
# |
Mar 8th 2018, 15:42 |
ricksaccous |
on the upload plugin repo? |
# |
Mar 8th 2018, 15:42 |
savant |
@ricksaccous can you file an issue? |
# |
Mar 8th 2018, 15:42 |
neon1024 |
@savant I still think patterns are important to know. As they’ll solve common problems in sensible ways. |
# |
Mar 8th 2018, 15:42 |
savant |
maybe some misconfiguration on readthedocs end |
# |
Mar 8th 2018, 15:42 |
savant |
since the online ones are generated from the repo |