Advise the use of absolute paths, fixes #4259
parent
00c26791fa
commit
c6cc6dd607
|
@ -152,7 +152,7 @@ For libraries that specify autoload information, Composer generates a
|
|||
autoloading for free.
|
||||
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
```
|
||||
|
||||
This makes it really easy to use third party code. For example: If your project
|
||||
|
@ -192,7 +192,7 @@ the return value of the include call in a variable and add more namespaces.
|
|||
This can be useful for autoloading classes in a test suite, for example.
|
||||
|
||||
```php
|
||||
$loader = require 'vendor/autoload.php';
|
||||
$loader = require __DIR__ . '/vendor/autoload.php';
|
||||
$loader->add('Acme\\Test\\', __DIR__);
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue