I've discovered that we're not able to add jobs with integer based ID's, as they will not be recognized as a "static dependency" here in mapDependencies():
To reproduce, add a job with an integer based dependency, then make a job depend on it:
$workflow = $this->define('Some workflow'):
$workflow->addJob(
job: new SomeJob(),
id: 1,
);
// throws Exception: Error: Call to a member function getID() on int
$workflow->addJob(
job: new SomeOtherJob(),
dependencies: [1],
);
I've discovered that we're not able to add jobs with integer based ID's, as they will not be recognized as a "static dependency" here in
mapDependencies()
:https://github.com/ksassnowski/venture/blob/73cdd0f05b32f161104d30f4e61c103b16845074/src/WorkflowDefinition.php#L454-L467
To reproduce, add a job with an integer based dependency, then make a job depend on it:
Should we do one of the below?