Reputation: 287
I create a file named Util.php
and there are two class in the Util.php
file.
class StringUtil {}
class ArrayUtil {}
how can I make the Util.php
into composer library
for other project include? now I got a Class Not Found Exception
.
Upvotes: 0
Views: 128
Reputation: 66
I create a file named Util.php and there are two class in the Util.php file.
First of all this is bad practice
Anyway, it can help: https://getcomposer.org/doc/04-schema.md#files
{
"autoload": {
"files": ["src/MyLibrary/functions.php"]
}
}
Upvotes: 1