When creating a new BuildTask, the URL used to run the task is auto-generated based on the ClassName. However, with the introduction of namespacing, this means you end up with clunky URLs such as:
mysite.example.com/dev/tasks/andante-newproject-americasnexttopmodule-tasks-StillInTheRunningTask
I think there should be the ability to set the command URL, something like:
public function getCommandURL()
{
return "StillInTheRunningTask";
}
Which appends it to dev/tasks.
Makes sense to me! How would we deal with (incredibly unlikely) conflicts? Perhaps if it鈥檚 a config variable it would be easier to fix if you were to encounter that?
Yep, config variable makes sense. I don't think resolving conflicts needs to be automatic - we'd want to throw some sort of error if a conflict came about, not sure where or how though. At the moment I suppose we'd have a class-clash error.
My preference is to fail to run either task, log an error and allow override via config (in case you clash with a module or something like that).
@andrewandante you can define private static $segment = 'StillInTheRunningTask'; to achieve this. This should be more prominently placed in the changelog/upgrade guide.
P.s. Nice namespace :)
Awesome! Well there you go. Thanks @robbieaverill
@andrewandante do you want to backport this to 3.x or shall we close?
I'll backport it. Seems a good thing to have, and will make upgrading from 3 to 4 easier for existing projects.
馃憤 for better NS support in 3.x!