- Is fresh/common-api-bundle compatible with Laravel?
- No. It is explicitly a Symfony bundle for RESTful API services, and Symfony bundles are not consumable by Laravel because they depend on Symfony's Kernel, dependency injection compiler passes, event dispatcher, and bundle registration. Laravel uses service providers, its own container, and an HTTP kernel and middleware pipeline, so there is no native bridge. Treat it as a design reference or port source, not a composer require for a Laravel app.
- Can I install fresh/common-api-bundle with Composer in a Laravel project?
- You can run composer require in a Laravel project only if dependency constraints happen to resolve, but installing it does not integrate it with Laravel. The package expects Symfony bundle registration and configuration, so its services will not be loaded or usable in Laravel's container. In practice, installation is not the same as support, and the recommendation is not to add it to a Laravel composer.json.
- What Laravel versions does fresh/common-api-bundle support?
- None are documented for Laravel because this is a Symfony bundle, not a Laravel package. Its actual constraints are Symfony and PHP versions, which are unverified here and likely target an older Symfony 2 or 3 era codebase. For Laravel compatibility, the correct answer is that framework support is not applicable and should be confirmed only if you are evaluating it inside Symfony.
- How do I install and configure fresh/common-api-bundle?
- In a Symfony application, installation would use Composer and then bundle registration in the kernel or bundles.php, with configuration under Symfony's config directory. In Laravel, there is no equivalent registration path because Laravel does not load Symfony bundles. Before any Symfony-side install, verify the PHP version, Symfony major version, license, and transitive dependency constraints.
- What features does fresh/common-api-bundle provide for REST APIs?
- The package is described as providing shared building blocks and some missing out-of-box features for Symfony-based RESTful API services, such as common utilities, configuration, and reusable components. The exact feature inventory is not specified in the provided context, so you should audit the repository for capabilities like content negotiation, pagination, error normalization, or HATEOAS helpers. Map each feature to a Laravel-native equivalent before deciding to port anything.
- What are the best Laravel alternatives to fresh/common-api-bundle?
- For Laravel API responses, use Laravel API Resources and, where transformation layers are needed, spatie/laravel-fractal or league/fractal. For serialization concerns, symfony/serializer can be used standalone without adopting Symfony's framework. For pagination, error handling, and content negotiation, Laravel's built-in HTTP layer plus first-party or well-maintained community packages are safer than porting a Symfony bundle.
- Is fresh/common-api-bundle safe and well maintained for production?
- The available signals are negative: zero stars, zero dependents, a Bitbucket-hosted repository, and a namespace and naming style that suggest an older Symfony codebase. License terms, PHP and Symfony version support, security posture, and whether the repository is archived are unverified, which makes it an unvetted dependency. For production, supply-chain and abandonment risk dominate, and the default recommendation is to avoid it.
- How can I use fresh/common-api-bundle features in a Laravel app without installing it?
- Use it as a design reference: inventory the specific features you need, such as content negotiation, pagination, error normalization, or HATEOAS helpers, and reimplement each one as a Laravel package or service class. This avoids framework bridging debt and keeps the application on Laravel conventions. Prototype one feature first, then expand only after tests and a compatibility check pass.
- Should I run fresh/common-api-bundle as a sidecar Symfony service?
- A sidecar is technically possible: run the bundle in a small Symfony service and call it over HTTP from Laravel. That preserves the original code but adds a second runtime, deployment pipeline, network hop, and operational overhead. For a package described as providing some missing out-of-box features, that cost is rarely justified unless the bundle contains heavy, non-trivial domain logic.
- What should I check before porting or depending on fresh/common-api-bundle?
- Verify the license, PHP and Symfony version constraints, PSR compliance, and transitive dependency conflicts against the Laravel app's composer.lock. Confirm whether the Bitbucket repository is archived and whether any active fork exists on Packagist or GitHub. Inventory the exact missing features, compare each to a maintained Laravel or standalone equivalent, and review any security-sensitive HTTP handling such as authentication, serialization, or deserialization. Do not let it force a PHP downgrade in the main application.