Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Schema Context Bundle

Schema Context Bundle Laravel Package

macpaw/schema-context-bundle

A Symfony bundle that provides a structured schema context layer, helping you define, organize, and share schema definitions consistently across your PHP application. Useful for projects that need reusable, metadata-driven configuration and cleaner separation between schema logic and application cod...

View on GitHub
Deep Wiki
Context7

Schema context bundle

Frequently asked questions about Schema Context Bundle
Does macpaw/schema-context-bundle work with Laravel?
Not natively. It is a Symfony bundle built around a Bundle subclass and DependencyInjection extension, and Laravel has no bundle registry or kernel extension lifecycle. You can only use it in Laravel by re-hosting its services in an Illuminate\Support\ServiceProvider, which is an adapter you own and maintain.
How do I install macpaw/schema-context-bundle in a Laravel app?
You can composer require it in a scratch Laravel 11 or 12 app, but installation alone does not integrate it. Inspect the vendor tree for Bundle inheritance, Extension classes, and service definitions before writing any glue. If the public API is plain classes, hand-wire a provider; if it relies on tagged services or compiler passes, vendor the domain logic instead.
What does schema context mean in macpaw/schema-context-bundle?
The package manages the active database schema for applications that select a schema per request or tenant, and integrates with Doctrine to resolve and apply it. It centralizes schema resolution, configurable mapping, fallback behavior, and per-request listeners. It is not a JSON-LD or Schema.org vocabulary package.
Is macpaw/schema-context-bundle a Symfony bundle or a plain PHP library?
The name and packaging indicate a Symfony bundle, but you must verify whether it extends Symfony\Component\HttpKernel\Bundle\Bundle and ships an Extension. If the useful surface is just a few value objects and a manager, treating it as a plain library is practical. If the value lives in container wiring, tagged services, or compiler passes, porting it to Laravel means rewriting the package.
Which Laravel and Symfony versions does macpaw/schema-context-bundle support?
The available context does not list declared version ranges, so check composer.json before assuming compatibility. Symfony majors move faster than Laravel's pinned Symfony components, so a bundle built for Symfony 7 can create composer conflicts on Laravel upgrades. Run composer why-not against your lockfile during the spike.
Can I use macpaw/schema-context-bundle for multi-tenant schema switching in Laravel?
Conceptually yes, but not as a drop-in. The bundle provides request-aware schema resolution and Doctrine integration, not Eloquent connection switching. In Laravel you would need to translate its resolution result into a database connection or search_path change, and own that adapter layer.
How do I test schema context resolution in Laravel?
Test the package's public API directly with unit tests around its resolver and mapping classes, then test your adapter with feature tests that simulate tenant or request context. Do not rely on the Symfony kernel or bundle test helpers. Include a composer conflict check in CI to catch Symfony version drift.
Is macpaw/schema-context-bundle safe for production?
Treat it as a pre-community artifact: low stars, zero dependents, and no issue history to learn from. The MIT license limits the downside because you can fork, but a single-vendor package can be abandoned without notice. For production, vendor the logic behind your own interface rather than depending on the bundle directly.
What are alternatives to macpaw/schema-context-bundle for Laravel?
For multi-tenant schema switching, Laravel-native packages and custom connection resolvers are usually a better fit. For Doctrine schema management in Symfony, use the bundle as intended. If you only need plain schema definitions or metadata, a small internal library avoids the framework coupling entirely.
How do I convert the Symfony bundle into a Laravel service provider?
First map the bundle's public API: identify which classes are plain value objects and which are container-wired services. Then register only the plain classes in a Laravel provider, bind interfaces, and publish any configuration into config/schema-context.php. Keep the adapter thin and add tests so you can retire it if upstream changes service IDs or ships a Laravel bridge.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo