isaac/gazesymfonybundle
GazeSymfonyBundle is a Symfony integration bundle for Gaze, wiring services, configuration, and framework hooks so Symfony applications can add gaze-related functionality with minimal setup. Suitable for projects that need a standard bundle-based installation.
Read this first: the v0.2.0 release notes are effectively a single line — "Open Source Symfony Bundle". There is no changelog entry, no upgrade guide, and no stated feature set, so treat everything below as orientation to verify against the repo, not as documented behaviour.
Where to look, in order:
composer.json — this is the single most informative file. Check:
type: symfony-bundle vs library. A symfony-bundle type affects how (and whether) it is auto-registered.require: which symfony/* components and version constraints. Anything requiring symfony/framework-bundle or symfony/http-kernel is coupled to Symfony's kernel and will not "just work" in a Laravel app.require-dev / conflict: tells you which Laravel or Symfony versions are actually exercised in CI.README.md — installation instructions. For a Symfony bundle these will say "register the bundle in config/bundles.php", which is a file Laravel does not have.<Vendor><Package>Bundle) — it is the entry point and defines what the package actually contributes: DI extensions, compiler passes, routes, config tree.CHANGELOG.md / git tags — with only a v0.2.0 signal, confirm whether v0.1.x existed and what changed. Absent that, diff 0.1.0...0.2.0 yourself before upgrading anything in production.Minimal install attempt:
composer require <vendor>/<package>:^0.2
php artisan about # confirm package discovery registered anything
php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
If vendor:publish reports nothing, the package almost certainly ships no Laravel service provider and you are dealing with a Symfony-native bundle.
First use case: pick the narrowest leaf feature the README demonstrates and wire it in a scratch Laravel command or a single test, not in application code. At v0.2.0 the goal of your first integration is to prove the container can resolve the package's services at all — not to build a feature on it.
If you only need one Symfony component the bundle wraps (e.g. a mailer transport, a serializer normalizer), skip the bundle entirely and require the underlying component directly. The bundle adds framework wiring you would otherwise have to bypass in Laravel anyway.
Treat the package as a library, not a bundle. The dominant Laravel pattern for Symfony bundles is to ignore the bundle's kernel integration and consume its services directly:
// Bind the package's service in your own provider.
$this->app->singleton(SomePackageService::class, function ($app) {
return new SomePackageService(
config('some-package.api_key'),
);
});
Then keep all package-specific code behind that binding so an incompatible v0.3.0 costs you one file.
Configuration. A Symfony bundle exposes config via a Configuration tree and a DI Extension class, loaded from config/packages/*.yaml. Laravel has neither. Two workable translations:
config/some-package.php in your own service provider and pass scalars into the constructor. Config caching (php artisan config:cache) then works normally.Testing. Bind a fake at the container level rather than mocking the bundle internals; the bundle's own service definitions are the thing most likely to shift between 0.x releases.
$this->mock(SomePackageService::class, fn ($m) => $m->shouldReceive('send')->once());
If the package ships symfony/phpunit-bridge or its own test kernel, do not adopt it — that harness boots a Symfony kernel and will drag framework-bundle into your dependency tree.
Integration tip: wrap the package in a thin first-party adapter interface (Mailer, Normalizer, WebhookVerifier — whatever the package does). Call sites depend on your interface; one class depends on the package. This is cheap now and is the difference between a one-hour and a one-week upgrade when 1.0 lands.
CI: pin the exact constraint (0.2.*), not ^0.2, and run your suite against the lowest supported PHP alongside the highest. Pre-1.0 packages routinely drop PHP versions in minor releases.
^0.2 is not a safe range in the way it is for a 2.x package. Pin, and read the diff before bumping.config/bundles.php, YAML config, compiler passes) does not exist in Laravel. Absence of a *ServiceProvider with extra.laravel.providers in composer.json means no auto-discovery — php artisan will not see it, and it will not fail loudly. It will simply be inert.CompilerPassInterface, that logic runs only in a Symfony kernel. In Laravel you must replicate the wiring manually. Symptom: services resolve but behave as if unconfigured.php artisan tinker → app()->getLoadedProviders() confirms what registered; app(SomePackageService::class) confirms what resolves. For Symfony-side diagnosis, a standalone bin/console debug:container in a throwaway Symfony skeleton is often faster than reverse-engineering the DI extension by reading it. composer why symfony/http-kernel tells you whether Symfony is already in your tree via another dependency — if so, check for version-constraint conflicts before assuming the bundle is at fault.%env(FOO)%) and parameter references (%kernel.project_dir%). If a default value in the bundle's config tree uses either, you must resolve it yourself when hand-constructing — passing the literal string %env(FOO)% through is a common and confusing failure.How can I help you explore Laravel packages today?