Issue
I've made a little library for myself and I'm trying to autoload it into my laravel project, it installs fine but whenever I try to use the class it simply says it's not found.
I've checked all the classmap files in vendor/composer
and it doesn't seem to be in any of them.
This is my composer.json for my lib:
{
"name": "my-user/aspect-parser",
"version": "1.0.0",
"type": "package",
"require": {
"nesbot/carbon": "^1.22"
},
"autoload": {
"psr-4": {
"AspectParser\\": "src/"
}
}
}
My file structure is:
- AspectParser
- src
- Parser.php
- src
Solution
It was an issue with the type
in composer.json
. I've changed it to library
and it adds to the autoload classmap.
Answered By - Nathan
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.