robertwesner/simple-mvc-php-demo-bundle

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/robertwesner/simple-mvc-php-demo-bundle

v1.0.1 2025-06-08 14:35 UTC

This package is auto-updated.

Last update: 2025-10-08 15:18:42 UTC


README

Simple Bundle for simple-mvc-php

License: MIT

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();
    }
}