jenssegers / lean

Use the PHP League's Container package with auto-wiring support as the core container in Slim 3
31 stars 5 forks source link

Make defaultSettings inheritable #1

Closed wouterds closed 7 years ago

wouterds commented 7 years ago

Allows to extend from this service provider and change only 1 setting without manually copying them all over.

E.g.: something like this

$this->container->share('settings', function() {
    return array_merge($this->defaultSettings, [
        'displayErrorDetails' => true,
    ]);
});
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 70.886% when pulling a9207171b9af863b9a65f053d05ae4b3d509811a on wouterds:feature/protected-default-settings into 3c1c67e7af0c622657b962b0d706dde2300fe330 on jenssegers:master.