Skip to content

Commit 9941ed2

Browse files
authored
Adding autoload to the Composer file
We can specify the directory with the file to load in the Composer file. The [Composer's doc](https://getcomposer.org/doc/01-basic-usage.md#autoloading) says: ``` For libraries that specify autoload information, Composer generates a vendor/autoload.php file. You can simply include this file and you will get autoloading for free. require __DIR__ . '/vendor/autoload.php'; ``` It makes it easier for the dev using Composer to include the library.
1 parent e164376 commit 9941ed2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
"license": "APACHE",
88
"require-dev": {
99
"satooshi/php-coveralls": ">=0.6"
10+
},
11+
"autoload": {
12+
"classmap": ["libs/csrf/"]
1013
}
1114
}

0 commit comments

Comments
 (0)