phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 430 forks source link

Sort tasks by priority in the TaskRunner #16

Closed veewee closed 8 years ago

veewee commented 9 years ago

In a Task service it must be possible to add a "priority" tag to the service configuration. E.g.:

parameters:
    tasks:
        taskname:
            metadata:
                priority: 1000

The higher the priority, the earlier the task is executed. The tasks will be sorted during runtime in the TasksCollection or in the TasksComilerPass.

The metadata functionallity is already available with the getTaskMetadata() method on the GrumPHP object.

More information: https://github.com/phpro/grumphp/blob/master/doc/tasks.md#metadata

veewee commented 8 years ago

Fixed in #92