# |
May 17th 2019, 14:01 |
nils |
Did anyone migrate from 2.x to 3.x? How time consuming should I expect it to be? |
# |
May 17th 2019, 14:00 |
neothermic |
but yeah, any thoughts on why this isn't behaving the same? |
# |
May 17th 2019, 13:57 |
neothermic |
:) |
# |
May 17th 2019, 13:57 |
dereuromark |
I know I am |
# |
May 17th 2019, 13:56 |
dereuromark |
you know, there are things in life where you want to be replaced by machines |
# |
May 17th 2019, 13:56 |
neothermic |
but this one is odd, as I'm not sure why I'm losing the subkey; is that expected? |
# |
May 17th 2019, 13:56 |
neothermic |
well, the basic testcase is me running the change manually, comparing the outputs :) |
# |
May 17th 2019, 13:56 |
dereuromark |
always good to have basic test cases around your internal business logic to catch this early on when migrating |
# |
May 17th 2019, 13:55 |
neothermic |
but Hash::Extract with the path of `'Report'` returns the data without the 'Report' subkeying |
# |
May 17th 2019, 13:54 |
neothermic |
So we have an array that is basically from a find, that contains a key called 'Report', and then has subitems, and each item is an array of id, etc. `Set::extract('/Report'` on the data returns structure like: ```array( (int) 0 => array( 'Report' => array( 'id' => '45' |
# |
May 17th 2019, 13:52 |
neothermic |
argh, Hash::extract is doing something slightly different from Set::extract :O |
# |
May 17th 2019, 13:20 |
neon1024 |
Sounds good, sign me up @admad |
# |
May 17th 2019, 13:20 |
admad |
are PHP "influencers" available for hire? we could then spend 1 year's cakefest budget on them instead :P |
# |
May 17th 2019, 13:18 |
np |
:wave: I forwarded your response to my colleague. Thanks |
# |
May 17th 2019, 13:18 |
dereuromark |
One reddit article after 4.0 release might do the trick :P and noise |
# |
May 17th 2019, 13:17 |
admad |
I hope people care enough about clean code and it gets us more users :slightly_smiling_face: |
# |
May 17th 2019, 13:15 |
dereuromark |
I am shocked and suprised at the same time that both laravel and symfony are not using phpstan/psalm and dismiss any addition as "current code is fine", even though the people showed them that the opposite is true.. Funny that cake already has - and soon will even more so have - the cleanest framework code by far :slightly_smiling_face: |
# |
May 17th 2019, 13:13 |
nils |
@dereuromark trying to convince the client to move to 3.x. But it's a huge job, I guess. |
# |
May 17th 2019, 13:10 |
dereuromark |
that is too long ago, I cant recall, but could very well be not in schema. You can either PR it, or we ignore it (as I would) |
# |
May 17th 2019, 13:09 |
dereuromark |
sry, my brain starts to ignore 2.x :P |
# |
May 17th 2019, 13:08 |
nils |
That's only for 3.x, or am I mistaken? I'm running 2.x. |
# |
May 17th 2019, 13:03 |
dereuromark |
but it is all documented even in mine: https://github.com/dereuromark/cakephp-queue/tree/master/docs#installation |
# |
May 17th 2019, 13:03 |
dereuromark |
make sure you ran the right mgiraitons, that is how it its done as per migrations plugin |
# |
May 17th 2019, 13:00 |
nils |
@dereuromark oh, and one more thing. I got an error about a column missing called "priority", it wasn't added when running "Schema create -p Queue" - so I manually added it. Is that a bug maybe? |
# |
May 17th 2019, 12:48 |
nils |
The overlap with CronJobs are really smart though, I hit myself for not coming up with that as a solution myself. |
# |
May 17th 2019, 12:48 |
nils |
Like built in? I've looked at some third-party ones, but none that really came to my liking. So it all fell on Gearman, which has been working ok. However, lately I've been getting some "Error while sending QUERY packet" - and I do believe it has to do with Gearman |
# |
May 17th 2019, 12:46 |
dereuromark |
I asked a while ago if some costs/weight system exists yet for queue jobs, as we run very expensive tasks. But so far I dont think there is something here yet, i was planning to build that in soon as well, as opt-in feature. |
# |
May 17th 2019, 12:45 |
dereuromark |
jep |
# |
May 17th 2019, 12:43 |
nils |
@dereuromark that's awesome. One more question, all the config-times are put in seconds, right? |
# |
May 17th 2019, 12:42 |
dereuromark |
We are running it for our complete release process with tons of jobs per day, works quite well if you have enough server power |
# |
May 17th 2019, 12:40 |
nils |
@dereuromark just figured it out on my local machine - it runs fine but this is better. Changing this from Gearman which isn't that stable on my server, can't tell why. |
# |
May 17th 2019, 12:38 |
dereuromark |
that is the most important part of the whole system :slightly_smiling_face: otherwise the workers wont run, yeah |
# |
May 17th 2019, 12:38 |
nils |
@dereuromark yeah, read it. Maybe the cronjob thing will do the trick? |
# |
May 17th 2019, 12:34 |
dereuromark |
if you follow the docs, this is exactly how it works. |
# |
May 17th 2019, 12:30 |
nils |
@dereuromark I'm implementing the Queue-plugin you created. I'm still on 2.x though. When implementing it on the production server, is there a way to run the worker in the background? Like a daemon? |
# |
May 17th 2019, 11:01 |
jojomartius |
ahhhh ok.. i gound it... :) you should not have (new ErrorHandler(Configure::read('Error')))->register(); in the cli part, you should have (new ConsoleErrorHandler(Configure::read('Error')))->register(); |
# |
May 17th 2019, 10:53 |
jojomartius |
mh yes. could be but the only place where it should be is the bootstrap.php and if i turn back to the default " (new ErrorHandler(Configure::read('Error')))->register();" it should behave normal, right? |
# |
May 17th 2019, 10:47 |
neon1024 |
Sounds like a missing `if (PHP_SAPI === 'cli') {` somewhere |
# |
May 17th 2019, 10:45 |
jojomartius |
for example... if the database connection of a fixture is not present in a test i got all the stuff i would normaly in the browser starting with a <pre class="cake-error" until the closing html tag :slightly_smiling_face: |
# |
May 17th 2019, 10:44 |
jojomartius |
Hey all, somehow i messed up my error handling and if i produce an error on cli - it outputs me everything as an very long html file so i've struggle to see what went wrong :) any idea how to fix this? |
# |
May 17th 2019, 10:02 |
neon1024 |
@mehov What is the use-case you’re trying to solve? |