- Can I use elasticms/client-helper-bundle in Laravel 10.x without conflicts?
- The bundle targets Laravel 9.x+ via Symfony 6.x dependencies, but Laravel 10.x may require manual conflict resolution. Run `composer require elasticms/client-helper-bundle` and check for Symfony/Laravel HttpClient collisions. Override service bindings in `AppServiceProvider` if needed.
- What if I’m not using ElasticMS but need generic API client helpers?
- Core utilities (e.g., standardized error handling, pagination) remain usable, but CMS-specific features like content previews will be unavailable. Alternatives like `spatie/laravel-api` or Laravel’s native `HttpClient` may suffice for non-ElasticMS projects.
- How do I integrate this bundle with a React/Vue frontend using Vite?
- The bundle provides UMD/ESM builds for direct imports. Add the CDN or local path to your `vite.config.js` and import utilities like `useApiClient`. Check the README for Webpack/Vite plugin setup if using older build tools.
- Will this bundle slow down my API responses compared to Laravel’s native HttpClient?
- Performance depends on implementation. Benchmark the bundle’s client against Laravel’s `HttpClient` for your use case. The bundle adds abstraction layers for CMS features, so test with and without ElasticMS-specific logic to isolate overhead.
- How do I handle authentication (e.g., Sanctum/Passport) with this bundle?
- The bundle aligns with Laravel’s API resources and Sanctum/Passport. Configure authentication via Laravel’s standard methods (e.g., middleware, guards) and pass tokens through the bundle’s client utilities. CMS-specific auth may require ElasticMS integration.
- Are there alternatives if this bundle lacks GraphQL support?
- Yes. For GraphQL, consider `webonyx/graphql-php` or Laravel-specific packages like `filp/whoops` for debugging. If you need a lightweight wrapper, build a minimal service around Laravel’s `HttpClient` or fork the bundle to add GraphQL.
- How do I configure the bundle to avoid conflicts with Laravel’s HttpClient?
- Explicitly bind services in `AppServiceProvider` to override defaults. Example: `$this->app->bind('elasticms.client_helper', fn($app) => new CustomClientHelper($app['http.client']));`. Also, prioritize Laravel’s config in `config/app.php` to resolve dependency precedence.
- Can I use this bundle for a headless CMS other than ElasticMS?
- Generic client utilities (e.g., API wrappers, form handlers) will work, but CMS-specific features like dynamic routing or content previews require ElasticMS. Audit the source code to identify ElasticMS dependencies before adoption.
- Where should I report bugs or request features for this bundle?
- All issues and pull requests are managed in the [elasticMS monorepo](https://github.com/ems-project/elasticms). Link to the bundle’s documentation or GitHub repo in your issue to ensure visibility with maintainers.
- How do I test this bundle in a Laravel project before full integration?
- Start with a minimal setup: install via Composer, configure in `config/bundles.php`, and test a single utility (e.g., `useApiClient`) in your frontend. Use Laravel’s `php artisan config:clear` to debug configuration issues early.