- Issue created by @longwave
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 6:37am 23 January 2024 - Status changed to Needs work
about 1 year ago 7:08am 23 January 2024 - 🇳🇱Netherlands spokje
Probably wasn't ready for review yet on purpose.
Anyway, to be blatantly obvious: PHPStan baseline needs updating, CR needs to exist and linked.
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 8:42am 23 January 2024 - 🇺🇦Ukraine taraskorpach Lutsk 🇺🇦
Based on #5 I've removed PHPStan messages and added the mentions of QueueFactory to the main CR → . So, marking it as needs review now.
- Status changed to Needs work
about 1 year ago 8:49am 23 January 2024 - 🇳🇱Netherlands spokje
Thanks @taraskorpach.
Hate to be that guy, but well, I _am_ that guy: New PHPStan issues showed up in the MR after removing the original one, so back to NW for that.
- 🇺🇦Ukraine taraskorpach Lutsk 🇺🇦
Yes, I've seen it. Issues arose due to the missing ContainerAwareInterface and ContainerAwareTrait, along with the new paths from 📌 Fork Symfony's ContainerAwareTrait and ContainerAwareInterface into core Needs work .
I haven't discovered what @arunkumark has done, but what would be the best solution here? Should we wait until the parent issue is merged, or should we just add the changes from this MR to the parent MR?
- 🇬🇧United Kingdom longwave UK
This should use the service locator pattern, similar to 📌 Convert StreamWrapperManager to use a service locator Needs review , rather than injecting the entire container.
- 🇺🇦Ukraine taraskorpach Lutsk 🇺🇦
I'm not entirely confident in what I'm saying, but how can we use the service locator pattern if we don't know which services to include in the container in the register method of
ServiceLocatorTagPass
?In the
get
method, we use a service name obtained from theSettings
. Does this mean we should include the entire container, or am I misunderstanding something? Please clarify this for me. Thank you in advance. - 🇬🇧United Kingdom longwave UK
However, there is only one queue backend service in core (queue.database) and there is no base class or interface to identify queue backends.
I think we have to:
- add an interface for queue factory/backend services, similar to CacheFactoryInterface
- add a tag to services with that interface via autoconfiguration
- collect all services using that tag in the service locator
This might need to be broken into two issues, to add the interface first, and then deal with the service locator later.
- 🇫🇷France andypost
It also needs to find contrib usage and file isssues about change
- 🇬🇧United Kingdom longwave UK
@andypost Any ideas how to find affected contrib? There is no interface to search for, which is why we need the other issue. For example I know Redis will be affected by this, but queue_unique is not (because it just extends DatabaseQueueFactory) but I don't know of any other queue backends.
- 🇬🇧United Kingdom longwave UK
- Status changed to Needs review
about 1 year ago 10:43pm 8 March 2024 - 🇬🇧United Kingdom longwave UK
Now 📌 Queue factory services do not conform to an interface RTBC has landed we can do this in 11.x, it was simpler than I first thought once I learned about
#[AutowireLocator]
.We could partially backport this to 10.3.x by injecting the entire container as the second constructor argument, but is it worth the effort?
- Status changed to Needs work
about 1 year ago 1:11pm 13 March 2024 The Needs Review Queue Bot → tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇳🇱Netherlands spokje
There's a (IMHO) valid question from @andypost in the MR and it needs a reroll/rebase after the PHPStan-PHP-Baseline landed, but otherwise this looks fine to me.
- Status changed to Needs review
about 1 year ago 11:22pm 15 March 2024 - 🇬🇧United Kingdom longwave UK
Rebased, responded to @andypost's question in the MR.
- Status changed to RTBC
about 1 year ago 2:04pm 18 March 2024 - 🇺🇸United States smustgrave
I'm still amazed seeing autowire work.
Conversion seems good, the one thread has an answer as mentioned.
- Status changed to Fixed
about 1 year ago 3:50pm 18 March 2024 - 🇬🇧United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
- 🇬🇧United Kingdom catch
Re-read things here and reverted from 10.3.x, we need to keep that constructor deprecation in and not sure it's worth the juggling to do so per #18.
Automatically closed - issue fixed for 2 weeks with no activity.