Frequently Asked Questions¶
How is Castor different from Robo?¶
Feature | Castor | Robo |
---|---|---|
π‘ Philosophy | Simple PHP functions with attributes | OOP-based task classes |
βοΈ Task definition | Annotated PHP functions (#[AsTask] ) |
Methods inside a class extending Tasks |
π¦ Installation | Phar, static binary, Composer, Github Action | Phar, Composer |
π§ CLI autocompletion | β Built-in | β Not by default |
π§ͺ Learning curve | Very low β just write a function | Requires boilerplate and understanding of inheritance |
π οΈ Modern PHP | β Uses modern features (attributes, PHP 8+) | β οΈ More traditional OOP, less "modern PHP"-oriented |
πͺ Symfony Console-based | β Yes (under the hood) | β Yes (used directly) |
π₯ Community | Small but active (built by JoliCode) | Larger but not very active |
TL;DR
- Castor is minimal, expressive, and easy to use. You define tasks as plain PHP functions with attributes β thatβs it.
- Robo is powerful but more verbose and class-oriented. It might feel too heavy for small or script-like automation needs.
If you prefer "just PHP" over complex CLI frameworks, you'll love Castor.
If you're building a full-featured CLI app, Robo might fit β but Castor often gets you there faster.
How is Castor different from Make?¶
Feature | Castor | Make |
---|---|---|
π‘ Language | PHP β your own language | Makefile syntax (custom DSL) |
π§ Learning curve | Easy for any PHP dev | Steep if you're not familiar with Makefile syntax nor Shell |
π§° Task definition | PHP functions with attributes | Rule-based, using targets and dependencies |
πͺ Dynamic logic | β Native in PHP (conditions, loops, etc.) | β οΈ Harder β requires shell scripting or complex rules |
π₯ Error handling | Try/catch, logging, etc. in PHP | Shell-based error codes and operators (like && ) |
π§© Dependencies | Composer-managed | External shell commands |
π Cross-platform | β Fully portable (runs with PHP) | β οΈ Depends on shell tools β may vary on Windows/Linux |
π§ͺ Designed for PHP devs | β Yes | β Not really |
TL;DR
- Make is great for compiling C projects in 1995.
- Castor is great for automating (PHP or not) projects in 2025.
Make is powerful, but its syntax is obscure and hard to debug.
Castor lets you write tasks in PHP β the language you already know.
How is Castor different from raw Symfony Console usage?¶
Castor is a task runner, so it's primary goal is to run simple tasks to simplify the project development. Usually, it is used to run Docker commands, database migrations, cache clearing, etc.
Usually, tasks are very small, like 1 or 2 lines of code. So you probably don't want to waste your project with ops command that are not strictly related to the business.
Why "Castor"?¶
Castor means "beaver" in french. It's an animal building stuff. And this is what this tool does: it helps you build stuff π