Speeding Up Laravel Tests with tmpfs (MySQL in RAM)
If your Laravel test suite is painfully slow and does a lot of database work (multi-tenancy, migrations, seeding), the bottleneck is almost…
When developing Laravel projects with Docker and Sail, it’s important that all commands use Sail to ensure the environment is consistent. However, the AI models and agents in Cursor IDE often default to running commands like php artisan or composer install directly, even when told to use Sail.
This can cause errors if the host PHP environment is missing extensions or not set up for your project.
To solve this, you can add shell aliases that display a message whenever php or composer are called directly. This way, when Cursor’s agent runs these commands, it will receive a clear message to use Sail or Docker instead.
Add these aliases to your shell configuration:
echo -e "\nalias php='echo \"Do not use php directly. Use sail or docker run instead.\"'\nalias composer='echo \"Do not use composer directly. Use sail or docker run instead.\"'" >> ~/.bashrc && source ~/.bashrc
Now, if Cursor’s agent tries to run php or composer, it will get this output:
Do not use php directly. Use sail or docker run instead.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com