alex-kassel / roach-php-laravel
Community fork of roach-php/laravel with Laravel 10–13 compatibility, powered by optimized lazy-core
Fund package maintenance!
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0
- alex-kassel/roach-php-core: ^1.0
- laravel/framework: ^10.0 || ^11.0 || ^12.0 || ^13.0
- spatie/laravel-package-tools: ^1.11
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0 || ^11.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.0 || ^11.0 || ^12.0
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2026-08-26 22:30:55 UTC
README
Laravel 10–13 adapter for Roach PHP web scraping toolkit. Community fork of roach-php/laravel.
Key Features • Requirements • Installation • Usage • Testing • Credits • Changelog
Note
Community Fork
This package is a Laravel adapter fork of the original roach-php/laravel created by Kai Sassnowski.
As described by the original author:
"Roach is a complete web scraping toolkit for PHP. It is heavily inspired (read: a shameless clone) of the popular Scrapy package for Python."
Improvements in this Fork:
- Laravel 13 Support: Compatible with Laravel 10.x, 11.x, 12.x, and Laravel 13.x.
- Enhanced Core Dependency: Configured to pull our
alex-kassel/roach-php-corefork to leverage lazy DOM crawler loading and native JSON response handling.
📖 Laravel Documentation: https://roach-php.dev/docs/laravel • Core Docs: https://roach-php.dev
Key Features
- Laravel Service Container Bridge: First-class dependency injection and configuration bindings for all spiders and item pipelines.
- Artisan Scaffolding: Generate spiders, middlewares, and item processors instantly via
php artisan roach:spider. - Queue Integration: Asynchronously dispatch spider runs onto Laravel Queues for background processing.
- Multi-Version Laravel Compatibility: Fully tested across Laravel 10.x, 11.x, 12.x, and 13.x.
Requirements
- PHP: 8.2+ (tested on PHP 8.2, 8.3, and 8.4)
- Laravel Framework: 10.x | 11.x | 12.x | 13.x
- Core Library:
alex-kassel/roach-php-core: ^1.0
Installation
Install the package via Composer:
composer require alex-kassel/roach-php-laravel
Optionally publish the configuration file:
php artisan vendor:publish --tag="roach-config"
Usage
Generate a new spider:
php artisan roach:spider ExampleSpider
Start the spider through the Roach facade or dependency injection:
use RoachPHP\Laravel\Facades\Roach; // Run synchronously Roach::startSpider(\App\Spiders\ExampleSpider::class); // Or dispatch as a queued job Roach::queueSpider(\App\Spiders\ExampleSpider::class);
Testing
Execute the test suite using PHPUnit:
composer test
Credits
This package is a modern community fork and continuation of the original roach-php/laravel created by Kai Sassnowski.
- Kai Sassnowski (@kaisassnowski) — Original Author & Architecture
- Alexander Macenko (@alex-kassel) — Fork Maintainer & Modern Laravel Compatibility
- All Contributors — Thanks to all Open Source contributors who have contributed to Roach PHP
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
Security Vulnerabilities
Please review Security Policies on how to report vulnerabilities.
License
The MIT License (MIT). Please see LICENSE.md for more information.