Issue #3586667: Add the $object parameter to ExecutableInterface::execute() implementations.
Description
Core will require a ?object $object = NULL argument on ExecutableInterface::execute() in Drupal 12. This adds it to all 8 classes here that declare that method, plus a test and a docs update. The issue lists 6; ai_automators' AutomatorPluginBase and RunAutomatorAction have the same problem. A 9th, ai_test's NoopSystemAction, already had a parameter named $object and is untouched.
The name has to be $object, because DebugClassLoader matches on the parameter name. RunAutomatorAction used $entity, so it is renamed with a local $entity = $object; to leave its body unchanged.
The interface is left alone on purpose: declaring the argument there would fatal for every bare execute() still out there. The same caveat applies to subclasses of ActionPluginBase and AutomatorPluginBase, which are public and non-final, so a downstream override with the old zero-arg signature fatals at autoload. Core imposes that in Drupal 12 anyway. I found no such subclass in 15 dependent projects, but drupalcode's global code search is unavailable to confirm it across contrib.
UrlTestFunctionCallTest goes from 16 deprecations to 10, with none of this kind left. Zero is not reachable: 2 belong to key, 6 are @EntityType conversions covered by #3554806, 2 are unrelated. This also unblocks ai_integration_eca's non-gating phpunit (next major) job, which names these classes while pointing at #3586555.
Same defect on 2.x and 2.0.x. Happy to port, one MR per branch. Not a clean cherry-pick: RunAutomatorAction::execute() there has a : void return type.
Testing instructions
Paths relative to the module root. Deprecation counts need SYMFONY_DEPRECATIONS_HELPER unset locally; the CI template sets it to disabled.
- Without this MR:
vendor/bin/phpunit tests/src/Kernel/Service/FunctionCalling/UrlTestFunctionCallTest.phpgives 16 deprecations, 6 of themwill require a new "object|null $object". - With it, the same test gives 10, none of that kind.
vendor/bin/phpunit tests/src/Kernel/ExecutableSignatureTest.phppasses, and fails naming the class if you drop the parameter from any of the 8.
Local on 1.x: phpcs clean, phpstan 21 errors unchanged and none in a changed file, ai Kernel 396 / 0 failures, ai_automators Kernel 65 / 0 failures, ai Unit 502 with the 2 pre-existing built-asset failures. cspell is not reproducible locally, so the pipeline is authoritative. FunctionalJavascript not run, no webdriver.
Checklist
- I have linked the related issue in the MR title or description
- I have performed a self-review of my own code
- I have added or updated tests, or explained in the description why this change is not covered by tests
- I have updated documentation for any new or changed functionality
- I have written testing instructions and verified them locally
- I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
- This MR contains no breaking API or hook changes, or they are explicitly documented in the description
No post-merge steps: no schema, config or hook changes.
AI Compliance
Note
Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.
-
AI Assisted Code
Mainly written by a human; AI used for autocomplete or partial generation under full human supervision. -
AI Generated Code
Mainly generated by AI, reviewed and approved by a human before this MR was created. -
Vibe Coded
Generated by AI and only functionally reviewed before this MR was created.
Generated by Claude Code, then reviewed, applied, run and verified by me.
Closes #3586667