Skip to content

Commit fe0cc84

Browse files
committed
add description to custom autoloader for git submodules
1 parent d79d8f7 commit fe0cc84

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/autoloader.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<?php
22
/**
3-
* Automatically loads all required und used classes.
3+
* php-graphql features an own autoloader, for cases where this library is not
4+
* used and included via composer, but rather as a git submodule. If you are using
5+
* composer for managing libraries, etc. you can ignore this file and use the default
6+
* composer autoloader via `require '/vendor/autoload.php'`. However if you prefer using this
7+
* project via git submodules, you can use this autoloader via `require /php-graphql/src/autoloader.php`.
48
*/
59
spl_autoload_register(function ($className) {
6-
// replace remove GraphQL namespace
10+
// remove GraphQL namespace
711
$className = str_replace("GraphQL\\", "", $className);
812

913
// change \ to /

0 commit comments

Comments
 (0)