{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4259","labels_url":"https://api.github.com/repos/composer/composer/issues/4259/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4259/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4259/events","html_url":"https://github.com/composer/composer/issues/4259","id":95107938,"number":4259,"title":"Use of __DIR__ in including vendor/autoload.php still best practice?","user":{"login":"spencerbaynton","id":1483584,"avatar_url":"https://avatars.githubusercontent.com/u/1483584?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerbaynton","html_url":"https://github.com/spencerbaynton","followers_url":"https://api.github.com/users/spencerbaynton/followers","following_url":"https://api.github.com/users/spencerbaynton/following{/other_user}","gists_url":"https://api.github.com/users/spencerbaynton/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerbaynton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerbaynton/subscriptions","organizations_url":"https://api.github.com/users/spencerbaynton/orgs","repos_url":"https://api.github.com/users/spencerbaynton/repos","events_url":"https://api.github.com/users/spencerbaynton/events{/privacy}","received_events_url":"https://api.github.com/users/spencerbaynton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-15T05:11:55Z","updated_at":"2015-07-16T11:36:33Z","closed_at":null,"body":"In #3902 the `__DIR__` constant was added to the example code for including `vendor/autoload.php`. However, that section of the introduction documentation was removed in #4172. If the best practice is still to use `__DIR__` when including `vendor/autoload.php` then the example code in [Basic usage](https://getcomposer.org/doc/01-basic-usage.md#autoloading) should be update to:\r\n```php\r\nrequire __DIR__ . '/vendor/autoload.php';\r\n```"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/121931878","html_url":"https://github.com/composer/composer/issues/4259#issuecomment-121931878","issue_url":"https://api.github.com/repos/composer/composer/issues/4259","id":121931878,"user":{"login":"alcohol","id":21414,"avatar_url":"https://avatars.githubusercontent.com/u/21414?v=3","gravatar_id":"","url":"https://api.github.com/users/alcohol","html_url":"https://github.com/alcohol","followers_url":"https://api.github.com/users/alcohol/followers","following_url":"https://api.github.com/users/alcohol/following{/other_user}","gists_url":"https://api.github.com/users/alcohol/gists{/gist_id}","starred_url":"https://api.github.com/users/alcohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcohol/subscriptions","organizations_url":"https://api.github.com/users/alcohol/orgs","repos_url":"https://api.github.com/users/alcohol/repos","events_url":"https://api.github.com/users/alcohol/events{/privacy}","received_events_url":"https://api.github.com/users/alcohol/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T11:36:33Z","updated_at":"2015-07-16T11:36:33Z","body":"I don't think this makes a difference really. Everyone should know how the `require` function works. It should be up to the user whether or not they want to use an absolute or relative path. This is PHP knowledge, not Composer knowledge."}}