alex-kassel/roach-php-laravel

Community fork of roach-php/laravel with Laravel 10–13 compatibility, powered by optimized lazy-core

Maintainers

Package info

github.com/alex-kassel/roach-php-laravel

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

Transparency log

Fund package maintenance!

ksassnowski

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.2 2026-08-26 22:30 UTC

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 FeaturesRequirementsInstallationUsageTestingCreditsChangelog

Audit Verified Latest Version Laravel Support PHP Support PHPStan Level 8

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/laravelCore 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.