cosmologist/gears
Handy helper library for PHP and Symfony with utility functions for arrays, strings, objects, numbers, files, cache, callables, classes, and Guzzle, plus integrations for Doctrine, Symfony components (Forms, Messenger, Security, Twig, Validator) and value objects (identifiers/UUID).
laravel/queue) and Symfony’s messaging components. If the package offers composable, event-driven workflows, it could enhance Laravel’s native queue system by adding state management, retries with backoff, or conditional branching—features lacking in vanilla Laravel queues.Messenger or Workflow components. If Laravel’s ecosystem lacks a direct equivalent (e.g., for complex DAG workflows), this could fill a gap. However, Laravel’s laravel/horizon or spatie/laravel-activitylog may overlap in some use cases.DependencyInjection, custom bridges may be needed.failed_jobs)?jobs, failed_jobs)?Artisan::call() for complex workflows?symfony/messenger, symfony/workflow) if Laravel’s ecosystem diverges.HttpKernel or other Laravel-absent components.README or laravel.md would be critical.laravel/queue + spatie/laravel-activitylog doesn’t?
gears-database-connector)?ShouldQueue?symfony/http-client or other non-Laravel dependencies?timeout in seconds; does this package align or require custom logic?gear_id, state).GearStarted, GearFailed) for observability.symfony/messenger, consider replacing it with Laravel’s queues or using a wrapper (e.g., league/clock for time handling).symfony/workflow, evaluate if Laravel’s spatie/laravel-workflow is a lighter alternative.spatie/laravel-activitylog (for auditing)laravel/framework (native queues)spatie/laravel-backup (for async backups)spatie/laravel-medialibrary (if gears are for file processing)Kernel, create a Laravel-compatible facade (e.g., GearManager).// app/Providers/GearServiceProvider.php
public function register() {
$this->app->singleton(GearManager::class, function ($app) {
return new LaravelGearManager($app->make(Queue::class));
});
}
gears table, scaffold it alongside Laravel’s jobs table.Schema::create('gears', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->json('metadata');
$table->string('status')->default('pending');
$table->timestamps();
});
php artisan queue:work --queue=gears
composer.json conflicts (e.g., symfony/* version constraints).pcntl or symfony/process is available.Illuminate\Pipeline can adapt it.Monolog) and events.symfony/messenger:6.0, but Laravel 11 uses Symfony 6.2, test thoroughly.try-catch).try {
$gear->execute();
} catch (GearException $e) {
event(new GearFailed($gear, $e));
\Log::error("Gear failed: {$e->getMessage()}");
}
How can I help you explore Laravel packages today?