Issue Feature Closed

#107151Allow disable of schedulable in AsCommand attribute

Stefan Froemken 07/26/25, 19:31 updated 12/02/25, 13:58

Description

Hi,

in ext_kickstarter we have a lot of make:whatever commands. We just want to switch to new AsCommand PHP attribute, but in that case “schedulable” is activated by default, which does not make sense for us. Please add an option to also disable “schedulable”.

Stefan

Reviews 6

History 815

  1. Garvin Hicking commented and changed category status New Needs Feedback target version <span data-processor="relativetime" data-value="2025-07-26T21:35:51+00:00" > 07/26/25, 21:35 </span>

    The problem is that the symfony AsCommans attribute doesnt know this option. I think in the patch ti the introduction of this attribute this shortcoming was also addressed.

    The only option I could think of would be an additinonal attribute like #[NotAsSchedulableCommand] which would (quite unconveniently) try to change the “AsCommans” wiring?

    I believe in this case the Services.yaml registration is more feasible.

    The scheduler API in v14 is changing a lot and the lines between schedulable tasks and (schedulable) commands will probably become much more blurry.

  2. Lina Wolf commented <span data-processor="relativetime" data-value="2025-07-29T14:18:00+00:00" > 07/29/25, 14:18 </span>

    We could also introduce some kind of Interface like `implements NonSchedulableCommand`

  3. Gerrit Code Review pushed patch set 1 for main to change 91623 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2025-11-13T15:28:18+00:00" > 11/13/25, 15:28 </span>

  4. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-11-19T20:10:08+00:00" > 11/19/25, 20:10 </span>

    Applied in changeset commit:21c484b9fa539e8b20697c6e001eee94c18bb6bb.