Closed chrispenny closed 2 years ago
Thanks for the feedback, @emteknetnz! I've actioned all of that. 🤞 tests come back green 😄
Tests are now green. I'll run through all of my manual tests again tomorrow and re-mark them as complete once done.
@emteknetnz I'm having some issues after defining the properties on the Job classes.
It seems that if the properties are defined (and I've tried private
/protected
/public
) then we get no Job data, but if the properties are left as dynamic, then we do get Job data.
Defined:
Dynamic:
Unless there's just something obvious that I'm missing, and considering I'm trying to get this across the line due to it being a blocker for PHP 8.0 and 8.1: Could this please be something we raise for PHP 8.2? Potentially it's also something that QueuedJobs will need to look in to?
@emteknetnz I've raised the question on the Queued Jobs module: https://github.com/symbiote/silverstripe-queuedjobs/issues/377
I've also completed another round of my manual testing, and I'm happy that everything in our project is still functioning.
OK fair enough, keep the dynamic properties
I've posted a follow up comment https://github.com/symbiote/silverstripe-queuedjobs/issues/377#issuecomment-1158178650 tl;dr we need to release a new major of queuedjobs to support non-dynamic properties, which we will need to do for PHP 9
Have chatted offline, we'll prioritize PHP 8.0 support and and leave the PHP 8.1 deprecation warnings, for now
PHP Unit 9
We need to upgrade PHP Unit in order to get PHP 8 support. The
withMethods()
method was deprecated in5.6
. TheonlyMethods()
is the closest I can find to a replacement (I'm hoping it's correct).Significant (ish) changes
IndexJob
was previously setting theIndexer
to a property during__construct()
. This means that theIndexer
is saved as part of ourjobData
. Queued jobs then usesserialize($jobData)
as part of the Job Signature.Unfortunately, from PHP 8, our
Indexer
can no longer be serialised. This is because it includesGuzzle
, andGuzzle
includesCurlHandle
, andCurlHandle
cannot be serialised.The solution is to store the "pagination" information is
jobData
(rather than theIndexer
) and then we can just instantiate theIndexer
duringprocess()
."Forks"
I had to republish 2 abandoned modules in order to increase the platform requirements to allow for PHP 8. I want to make it really clear that I have no intension of maintaining these modules in any way (in fact I've already
abandoned
them).If I had used forks rather than publishing, then every dev using this module would also have to define these forks in their project's
composer.json
(because Composer doesn't fetch forks recursively), and I didn't think that that would be a great experience.Manual testing
dev/build
triggers indexing of default recordsADD
method) are queued when a page is publishedREMOVE
method) are queued when a page is unpublished