{"action":"created","issue":{"url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/67","labels_url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/67/comments","events_url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/67/events","html_url":"https://github.com/creativedutchmen/email_newsletter_manager/issues/67","id":109059058,"number":67,"title":"Autoloader: Remove \"require\" Statements","user":{"login":"michael-e","id":40072,"avatar_url":"https://avatars.githubusercontent.com/u/40072?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-30T10:34:23Z","updated_at":"2015-09-30T14:47:40Z","closed_at":null,"body":"Symphony 2.6. uses an autoloader, so we should be able to clean up all the `require_once(TOOLKIT …` stuff. I found those statements in many files. It's not trivial, because we may have to add new/different stuff (especially for the background process), and everything must be tested properly.\r\n\r\nHere's what I normally use for running background processes with Symphony 2.6:\r\n\r\n```php\r\n// Include autoloader:\r\nrequire_once DOCROOT . '/vendor/autoload.php';\r\n\r\n// Include the boot script:\r\nrequire_once DOCROOT . '/symphony/lib/boot/bundle.php';\r\n\r\n// Begin Symphony proper\r\nob_start();\r\nsymphony('administration');\r\n// Drop useless session (if generated by Symphony)\r\n$_SESSION = array();\r\ncleanup_session_cookies();\r\nob_end_clean();\r\n// Disable query logging (Re: memory issues, #2398)\r\nSymphony::Database()->disableLogging();\r\n```"},"comment":{"url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/comments/144434555","html_url":"https://github.com/creativedutchmen/email_newsletter_manager/issues/67#issuecomment-144434555","issue_url":"https://api.github.com/repos/creativedutchmen/email_newsletter_manager/issues/67","id":144434555,"user":{"login":"michael-e","id":40072,"avatar_url":"https://avatars.githubusercontent.com/u/40072?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T14:47:40Z","updated_at":"2015-09-30T14:47:40Z","body":"You might try and remove all  `require_once(TOOLKIT …` lines except the ones in `cli.backgroundprocess.php` (which will be more complicated, see above). It would be interesting to see if everything still works if you remove the stuff."}}