The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Slim\Container isn't passing settings to Pimple\Container?

gp's Avatar


04 Aug, 2015 11:17 PM

Trying to setup to DI using config files so I can modify them based on environment. However, I distinctly noticed this one call:

     * Create new container
     * @param array $userSettings Associative array of application settings
    public function construct(array $userSettings = [])

Is it intentional that Slim isn't passing the user settings over to Pimple? Without this one missing piece, I can't pass through Pimple settings via config file.

  1. 1 Posted by gp on 04 Aug, 2015 11:25 PM

    gp's Avatar

    FYI, my app.php config file looks like:

    return [
        // Slim configuration.
        'env' => 'production',
        // DI classes
        'logger' => PhpConsole\Handler::getInstance(),

    Unless there's something else I'm supposed to be doing here, the above missing $userSettings is preventing Pimple (and in turn Slim\Container) from finding $app->logger.

  2. 2 Posted by gp on 05 Aug, 2015 05:35 PM

    gp's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac