robertwesner / simple-mvc-php-demo-bundle
v1.0.0
2025-06-04 18:05 UTC
Requires
- php: >=8.4
- robertwesner/dependency-injection: ^v1.3.0
- robertwesner/simple-mvc-php: ^0.10.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.10.2
README
Simple Bundle for simple-mvc-php
Small demo bundle that covers custom container configurations.
Installation
Add this package via composer.
composer require robertwesner/simple-mvc-php-demo-bundle
Then include the bundle in your $PROJECT_ROOT$/configurations/bundles.php
.
use RobertWesner\SimpleMvcPhpDemoBundle\DemoBundle; use RobertWesner\SimpleMvcPhpDemoBundle\DemoBundleConfiguration; Configuration::BUNDLES ::load( DemoBundle::class, new DemoBundleConfiguration( greeting: 'Hello', ), );
Usage
DemoInterface
can now be autowired from the container.
use RobertWesner\SimpleMvcPhpDemoBundle\Demo\DemoInterface; final readonly class GreetingService { public function __construct( private DemoInterface $demo, ) {} public function doGreet(): void { print $this->demo->greetWorld(); } }