{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1407","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1407/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1407/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1407/events","html_url":"https://github.com/slimphp/Slim/issues/1407","id":99258770,"number":1407,"title":"Slim\\Container isn't passing settings array to Pimple","user":{"login":"guice","id":205378,"avatar_url":"https://avatars.githubusercontent.com/u/205378?v=3","gravatar_id":"","url":"https://api.github.com/users/guice","html_url":"https://github.com/guice","followers_url":"https://api.github.com/users/guice/followers","following_url":"https://api.github.com/users/guice/following{/other_user}","gists_url":"https://api.github.com/users/guice/gists{/gist_id}","starred_url":"https://api.github.com/users/guice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guice/subscriptions","organizations_url":"https://api.github.com/users/guice/orgs","repos_url":"https://api.github.com/users/guice/repos","events_url":"https://api.github.com/users/guice/events{/privacy}","received_events_url":"https://api.github.com/users/guice/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-05T17:35:37Z","updated_at":"2015-08-06T07:51:54Z","closed_at":null,"body":"We're unable to leverage full Pimple due to a key pass-thru missing in Slim\\Container's constructor:\r\n```php\r\n    /**\r\n     * Create new container\r\n     *\r\n     * @param array $userSettings Associative array of application settings\r\n     */\r\n    public function __construct(array $userSettings = [])\r\n    {\r\n        parent::__construct();\r\n        [...]\r\n    } \r\n```\r\n\r\nSlim\\Container does not pass $userSettings to the parent (Pimple) class, resulting in a failed Pimple initialization. This doesn't work:\r\n```php\r\n// config.php\r\nreturn [\r\n    // Slim configuration.\r\n    'env' => 'production',\r\n    // DI classes\r\n    'logger' => PhpConsole\\Handler::getInstance(),\r\n];\r\n\r\n// index.php\r\n$app = new \\Slim\\App('config.php');\r\n$app->logger->debug('test'); // Call fails, but is successful if I add $userSettings to parent::__construct().\r\n```\r\n\r\nOr should this be handled some other way within Slim? The point here is to use DI to pass in environment dependent classes, not hard code them into my index.php file."},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/128281936","html_url":"https://github.com/slimphp/Slim/issues/1407#issuecomment-128281936","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1407","id":128281936,"user":{"login":"akrabat","id":33135,"avatar_url":"https://avatars.githubusercontent.com/u/33135?v=3","gravatar_id":"","url":"https://api.github.com/users/akrabat","html_url":"https://github.com/akrabat","followers_url":"https://api.github.com/users/akrabat/followers","following_url":"https://api.github.com/users/akrabat/following{/other_user}","gists_url":"https://api.github.com/users/akrabat/gists{/gist_id}","starred_url":"https://api.github.com/users/akrabat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akrabat/subscriptions","organizations_url":"https://api.github.com/users/akrabat/orgs","repos_url":"https://api.github.com/users/akrabat/repos","events_url":"https://api.github.com/users/akrabat/events{/privacy}","received_events_url":"https://api.github.com/users/akrabat/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T07:51:54Z","updated_at":"2015-08-06T07:51:54Z","body":"If we did want to change the behaviour, the PR looks like this: https://github.com/slimphp/Slim/compare/slimphp:3.x...akrabat:di-settings?expand=1"}}