- Does Cosmologist Gears integrate with Laravel’s queue system for async workflows?
- The package isn’t explicitly designed for Laravel queues, but its Symfony Messenger utilities *could* be adapted for async tasks. For Laravel-specific async needs, consider pairing it with `laravel/queue` or exploring alternatives like `spatie/laravel-activitylog` for workflows. Check the Symfony Messenger utils section for potential overlaps.
- Can I use Cosmologist Gears for complex workflows like event sourcing or multi-step processes?
- While the package offers utility helpers, it lacks native Laravel workflow orchestration features. For event sourcing or DAG workflows, alternatives like `spatie/laravel-workflow` or `laravel/horizon` (for queues) are better suited. Gears’ Symfony Messenger utils *might* help, but integration would require custom bridging.
- How do I install Cosmologist Gears in a Laravel project?
- Run `composer require cosmologist/gears` in your project root. No Laravel-specific setup is required—it’s a standalone utility library. For Symfony components (e.g., Messenger), ensure your Laravel app can resolve those dependencies via Composer autoloading.
- Will this package work with Laravel 10+? Are there version conflicts?
- The package targets PHP 8.1+ and Symfony 6.x, which aligns with Laravel 10+. However, Symfony dependencies (e.g., `symfony/messenger`) might conflict if your project uses older Laravel versions. Test thoroughly, especially if using Symfony-specific features.
- Does Cosmologist Gears support Laravel’s service container or DI?
- The package is container-agnostic by design. You’ll need to manually bind services or use Laravel’s `app()->bind()` for integration. For Symfony components, consider wrapping them in Laravel-compatible interfaces to avoid DI conflicts.
- Are there Laravel-specific examples or documentation?
- The README focuses on PHP/Symfony. For Laravel use cases, explore the utility helpers (e.g., array functions, cache utils) directly—they’re framework-agnostic. For async workflows, you’ll need to adapt Symfony Messenger examples to Laravel’s queue system manually.
- Can I use Cosmologist Gears for simple CRUD helpers or just complex workflows?
- Yes! The package includes lightweight helpers for arrays, strings, files, and more—ideal for CRUD projects needing reusable utilities. Avoid it for async workflows unless you’re comfortable bridging Symfony components to Laravel’s ecosystem.
- How does failure handling work in async tasks using this package?
- The package doesn’t natively support Laravel’s `failed_jobs` table. For async tasks, rely on Laravel’s queue drivers (Redis, database) for retries/backoffs. Symfony Messenger utils may offer additional features, but you’d need to implement custom error handling or use Laravel’s job middleware.
- What are the alternatives to Cosmologist Gears for Laravel workflows?
- For workflows: `spatie/laravel-activitylog` (auditing), `laravel/horizon` (queue monitoring), or `spatie/laravel-workflow` (state machines). For utilities: Laravel’s built-in helpers (e.g., `Str::`, `Arr::`) or packages like `laravelcollective/html`. Gears shines for Symfony-adjacent projects.
- Does Cosmologist Gears require a database or additional setup?
- No database is required for the utility helpers (arrays, strings, etc.). Symfony Messenger or Doctrine utils *might* need configurations, but core features like `ArrayType::get()` or `CacheType::store()` work out-of-the-box. Always check the specific component’s docs.