Looking to hire Laravel developers? Try LaraJobs

roach-php-laravel maintained by alex-kassel

Description
Community fork of roach-php/laravel with Laravel 10–13 compatibility, powered by optimized lazy-core
Last update
2026/08/28 11:51 (dev-main)
License
Downloads
13

Comments
comments powered by Disqus

[!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-core fork 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, 8.4, and 8.5)
  • 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

From the monorepo root, run the complete package verification pipeline:

composer pkg:check alex-kassel/roach-php-laravel --json

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.