{"action":"opened","issue":{"url":"https://api.github.com/repos/bottlepy/bottle/issues/825","labels_url":"https://api.github.com/repos/bottlepy/bottle/issues/825/labels{/name}","comments_url":"https://api.github.com/repos/bottlepy/bottle/issues/825/comments","events_url":"https://api.github.com/repos/bottlepy/bottle/issues/825/events","html_url":"https://github.com/bottlepy/bottle/issues/825","id":128167335,"number":825,"title":"Plugin execution order","user":{"login":"foxx","id":651797,"avatar_url":"https://avatars.githubusercontent.com/u/651797?v=3","gravatar_id":"","url":"https://api.github.com/users/foxx","html_url":"https://github.com/foxx","followers_url":"https://api.github.com/users/foxx/followers","following_url":"https://api.github.com/users/foxx/following{/other_user}","gists_url":"https://api.github.com/users/foxx/gists{/gist_id}","starred_url":"https://api.github.com/users/foxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxx/subscriptions","organizations_url":"https://api.github.com/users/foxx/orgs","repos_url":"https://api.github.com/users/foxx/repos","events_url":"https://api.github.com/users/foxx/events{/privacy}","received_events_url":"https://api.github.com/users/foxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-22T14:29:48Z","updated_at":"2016-01-22T14:29:48Z","closed_at":null,"body":"It would appear that global plugins are not called in an expected order.\r\n\r\nFor example;\r\n\r\n```\r\nbottle.install(DatabasePlugin())\r\nbottle.install(PluginThatNeedsDatabase())\r\n```\r\n\r\nThe above would first call `PluginThatNeedsDatabase()`and then `DatabasePlugin()`. \r\n\r\nThis goes against the advice seen in [documentation][1];\r\n\r\n> The order of installed plugins is significant, though. If a plugin requires a database connection, you need to install the database plugin first.\r\n\r\nAs you can see from our example though, the database plugin cannot be installed first, otherwise dependant plugins will not work correctly.\r\n\r\n[1]: http://bottle.readthedocs.org/en/latest/tutorial.html#application-wide-installation"}}