Download the PHP package tourze/doctrine-entity-routing-bundle without Composer
On this page you can find all versions of the php package tourze/doctrine-entity-routing-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/doctrine-entity-routing-bundle
More information about tourze/doctrine-entity-routing-bundle
Files in tourze/doctrine-entity-routing-bundle
Package doctrine-entity-routing-bundle
Short Description Symfony bundle for automatic Doctrine entity routing
License MIT
Informations about the package doctrine-entity-routing-bundle
Doctrine Entity Routing Bundle
中文
A Symfony Bundle that automatically generates REST API routes for Doctrine entity metadata inspection.
Features
- Automatically discovers all Doctrine entities in your application
- Generates REST API endpoints for entity metadata inspection
- Provides JSON responses with table structure information
- Supports environment-based route generation control
- Includes comprehensive test coverage
Installation
Configuration
Register the Bundle
Add the bundle to your config/bundles.php:
Enable Route Generation
Set the environment variable to enable route generation:
Add Route Loader
Add the route loader to your config/routes.yaml:
Usage
Once configured, the bundle will automatically generate routes for all your Doctrine entities.
API Endpoints
For each entity table, the bundle generates:
Example Response
Error Response
If the table is not found:
Requirements
- PHP 8.1+
- Symfony 6.4+
- Doctrine ORM 3.0+
- Doctrine Bundle 2.13+
Dependencies
tourze/symfony-routing-auto-loader-bundle- For automatic route loading- Standard Symfony and Doctrine components
Testing
Run the test suite:
Run PHPStan analysis:
How It Works
- Route Discovery: The
AttributeControllerLoaderautomatically discovers all Doctrine entities - Route Generation: For each entity table, it generates a REST endpoint
- Controller: The
EntityMetadataControllerhandles requests and returns JSON metadata - Environment Control: Routes are only generated when
ENTITY_METADATA_ROUTESis set
Architecture
- AttributeControllerLoader: Implements
RoutingAutoLoaderInterfaceto automatically generate routes - EntityMetadataController: Handles API requests and returns JSON metadata
- Integration: Works with
tourze/symfony-routing-auto-loader-bundlefor seamless route loading
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
Changelog
Please see CHANGELOG.md for details on what has changed recently.
License
The MIT License (MIT). Please see LICENSE file for more information.
All versions of doctrine-entity-routing-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
monolog/monolog Version ^3.1
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-routing-auto-loader-bundle Version 1.0.*