Closed (fixed)
Project:
GraphQL
Version:
5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2026 at 18:20 UTC
Updated:
14 May 2026 at 12:55 UTC
Jump to comment: Most recent
Services should not keep the container. This refactors two scenarios where that occurs.
The Executor uses the Factory directly to pass on the dependencies, rather than delegating this, which allows removing the create method.
For the PasswordReset data producer a test is written to document the current behaviour. Then the controller instantiation from the container is moved to a HTTP sub-request that calls the controller directly. This allows injecting the HTTP kernel rather than the entire container.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
kingdutchComment #4
kingdutchComment #5
klausiThanks, approach looks good to me. Just minor comments.
Comment #6
kingdutchI rebased the work to fix the comment about the container, that was part of the other issue that's now merged.
I've added a type intersection (supported in PHP 8.1) to indicate MailManager is a MockObject which should satisfy PHPStan in the test :) That should've addressed all comments.
Comment #7
kingdutch