Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge details: commit 85259b7 Author: Jelle Sebreghts <[email protected]> Date: Tue Jul 2 16:29:40 2019 Refactoring to move away from monolithic RoboFile. - Use the command builder - Define task classes and traits Why we use traits instead of command classes. Command classes define a command. Each public method on a RoboFile (in the root of the project) is also a command. Public methods can be overridden by the RoboFile. Command classes cannot (at least not in a reliable way, there's no way of telling robo which of the command classes that define a command with the same name, is the actual command you want to use). I also introduced TraitDependencyCheckerTrait (not my proudest moment), because traits cannot extend other traits, but some have overlapping functionality, and, you know, DRY. This trait helps other traits define dependencies (on yet some other traits) and checks if these dependencies are met. Just add a method named get[MyTraitClassName]Dependencies, and return an array of full trait names (with namespace). If the class using this trait doesn't also use every dependend trait, an exception will be thrown. Also: Roave/BetterReflection#486
- Loading branch information