I made a laravel package with this composer.json:
{
"name": "calcanotica/file-storage",
"type": "library",
"description": "A file storage module for laravel.",
"homepage": "<<gitlab url>>",
"authors": [
{
<<authors>>
}
],
"autoload": {
"psr-4": { "Calcanotica": "src" }
},
"require": {
"php": "^5.5.9 || ^7.0",
"illuminate/contracts": "5.1.* || 5.2.* || 5.3.* || 5.4.*",
"illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.*",
"league/flysystem-aws-s3-v3": "~1.0",
"nesbot/carbon": "^1.0"
}
}
The structure of the package is:
-src
-Storage
-S3FileStorage.php
In the S3FileStorage.php file I have the following class:
namespace Calcanotica\Storage;
class S3FileStorage { ... }
But, when I try to use the class inside another application as \Calcanotica\Storage\S3FileStorage, I get a Class \Calcanotica\Storage\S3FileStorage not found error.
I already execute composer dump-autoload.
What's the problem?
requireentries makes no sense. Please read getcomposer.org/doc/articles/versions.md