- Can I use AdadgioGearBundle with Laravel, or is it only for Symfony?
- This bundle is designed for Symfony2 (EOL) and won’t work natively in Laravel. You’d need a wrapper or rewrite core components like annotations (to Laravel attributes) and Symfony services (to Laravel providers). Consider Laravel alternatives like Sanctum for auth or spatie/array-to-object for serialization.
- How do I install AdadgioGearBundle in a Laravel project?
- Run `composer require adadgio/gear-bundle`, but note this targets Symfony2. Laravel integration requires manual adaptation—annotations won’t work without PHP 8 attributes or a Symfony bridge. Test thoroughly; the package is deprecated and may conflict with Laravel’s architecture.
- What Laravel alternatives exist for API annotations and authentication?
- For annotations, use Laravel’s native `#[Route]` (PHP 8+) or packages like `fruitcake/laravel-cors` for middleware. For auth, prefer Sanctum (token-based) or `tylerjrichards/laravel-http-basic-auth` (Basic Auth). These are actively maintained and Laravel-optimized.
- Does AdadgioGearBundle support Laravel’s Eloquent or database-backed auth providers?
- No—this bundle relies on Symfony’s service container and EventDispatcher. To use Eloquent or database auth, rewrite the `AuthProvider` as a Laravel service bound to the container, or replace it entirely with Sanctum or Passport for modern Laravel auth flows.
- Is the Node-RED integration useful in Laravel, or should I avoid it?
- Node-RED integration is niche and risky. Laravel’s event/queue systems (e.g., Queues, Horizon) are more maintainable. If Node-RED is critical, use direct HTTP clients like Guzzle instead of bundling legacy Symfony logic.
- How do I configure Basic Auth in Laravel using this bundle?
- You can’t directly. The bundle’s `config.yml` expects Symfony2’s structure. For Laravel, use middleware like `auth:api` with Sanctum or `tylerjrichards/laravel-http-basic-auth`. These packages are Laravel-native and actively supported.
- Are there security risks using AdadgioGearBundle in production?
- Yes—this package is deprecated (last update: 2018) with no security patches. Symfony2 is EOL, and dependencies may have unpatched vulnerabilities. Avoid in production unless you fork and maintain it rigorously.
- Can I use the CSV export/import features in Laravel without Symfony?
- The bundle’s CSV tools are tightly coupled to Symfony. For Laravel, use `league/csv` or `spatie/laravel-csv`—these are actively maintained, Laravel-optimized, and avoid Symfony’s overhead.
- How do I migrate from AdadgioGearBundle’s annotations to Laravel’s attributes?
- Replace `@Api` annotations with PHP 8 attributes like `#[Api]` (custom) or Laravel’s `#[Route]`. Rewrite the annotation parser to use Laravel’s `Attribute` reflection. This requires refactoring the bundle’s core logic.
- What’s the long-term cost of using this bundle in a Laravel project?
- High. Deprecation, Symfony2 dependencies, and monolithic design introduce technical debt. Rewrite critical features (e.g., auth, CSV) using Laravel-native packages. Isolate the bundle in a microservice if you must use it, but plan for eventual replacement.