{"action":"created","issue":{"url":"https://api.github.com/repos/zendframework/tutorials/issues/56","repository_url":"https://api.github.com/repos/zendframework/tutorials","labels_url":"https://api.github.com/repos/zendframework/tutorials/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/zendframework/tutorials/issues/56/comments","events_url":"https://api.github.com/repos/zendframework/tutorials/issues/56/events","html_url":"https://github.com/zendframework/tutorials/issues/56","id":175202096,"number":56,"title":"Undefined index db in ZF3 tutorial","user":{"login":"DragonBe","id":282825,"avatar_url":"https://avatars.githubusercontent.com/u/282825?v=3","gravatar_id":"","url":"https://api.github.com/users/DragonBe","html_url":"https://github.com/DragonBe","followers_url":"https://api.github.com/users/DragonBe/followers","following_url":"https://api.github.com/users/DragonBe/following{/other_user}","gists_url":"https://api.github.com/users/DragonBe/gists{/gist_id}","starred_url":"https://api.github.com/users/DragonBe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DragonBe/subscriptions","organizations_url":"https://api.github.com/users/DragonBe/orgs","repos_url":"https://api.github.com/users/DragonBe/repos","events_url":"https://api.github.com/users/DragonBe/events{/privacy}","received_events_url":"https://api.github.com/users/DragonBe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-06T09:34:04Z","updated_at":"2016-09-06T14:59:33Z","closed_at":null,"body":"Following the instructions on [Getting started: A skeleton application](https://docs.zendframework.com/tutorials/getting-started/skeleton-application/) including all modules during installation, I get the following error when going to the app locally using Apache or the build-in php web server:\r\n\r\n```\r\nNotice: Undefined index: db in /var/www/zf3-tutorial/vendor/zendframework/zend-db/src/Adapter/AdapterServiceFactory.php on line 27\r\n\r\nFatal error: Uncaught Zend\\Db\\Adapter\\Exception\\InvalidArgumentException: The supplied or instantiated driver object does not implement Zend\\Db\\Adapter\\Driver\\DriverInterface in /var/www/zf3-tutorial/vendor/zendframework/zend-db/src/Adapter/Adapter.php:82 Stack trace: \r\n#0 /var/www/zf3-tutorial/vendor/zendframework/zend-db/src/Adapter/AdapterServiceFactory.php(27): Zend\\Db\\Adapter\\Adapter->__construct(NULL) \r\n#1 /var/www/zf3-tutorial/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(750): Zend\\Db\\Adapter\\AdapterServiceFactory->__invoke(Object(Zend\\ServiceManager\\ServiceManager), 'Zend\\\\Db\\\\Adapter...', NULL) \r\n#2 /var/www/zf3-tutorial/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(198): Zend\\ServiceManager\\ServiceManager->doCreate('Zend\\\\Db\\\\Adapter...') \r\n#3 /var/www/zf3-tutorial/vendor/zendframework/zend-developer-tools/src/Module.php(204): Zend\\ServiceManager\\ServiceMa in /var/www/zf3-tutorial/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 757\r\n```\r\n\r\nThe configuration for the database is only 2 pages further in [Database and models - Using ServiceManager to configure the table gateway and inject into the AlbumTable](https://docs.zendframework.com/tutorials/getting-started/database-and-models/#using-servicemanager-to-configure-the-table-gateway-and-inject-into-the-albumtable).\r\n\r\nMaybe it would be good to add in the  [Getting started: A skeleton application](https://docs.zendframework.com/tutorials/getting-started/skeleton-application/) a minimal db configuration example like the following:\r\n\r\n```php\r\n// file: config/autoload/global.config\r\nreturn [\r\n        'driver' => 'Pdo',\r\n        'dsn' => 'sqlite::memory:',\r\n];\r\n```\r\n\r\nThis small addition will allow new users to at least see the ZF example page without errors if they install all modules, including `zend-db`.\r\n\r\n[![zf3_demo_page](https://cloud.githubusercontent.com/assets/282825/18268789/9e56e440-7425-11e6-8ee8-bf6e5e634626.png)](https://cloud.githubusercontent.com/assets/282825/18268789/9e56e440-7425-11e6-8ee8-bf6e5e634626.png)\r\n\r\nOn page [Database and models - Using ServiceManager to configure the table gateway and inject into the AlbumTable](https://docs.zendframework.com/tutorials/getting-started/database-and-models/#using-servicemanager-to-configure-the-table-gateway-and-inject-into-the-albumtable) mention can be made to replace the existing `db` configuration with the example configuration."},"comment":{"url":"https://api.github.com/repos/zendframework/tutorials/issues/comments/244978450","html_url":"https://github.com/zendframework/tutorials/issues/56#issuecomment-244978450","issue_url":"https://api.github.com/repos/zendframework/tutorials/issues/56","id":244978450,"user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T14:59:33Z","updated_at":"2016-09-06T14:59:33Z","body":"Never mind, just found #57, @DragonBe — thanks!"}}
{"actor":{"display_login":"weierophinney"}}