I tried to autoload a file with PSR-0 ,but it is not auto loading that file. I tried the same file with PSR-4 auto loading. With PSR-4 it worked perfectly. Is there any difference in folder structure needed for PSR-0?
I couldn't make PSR-0 working even if keep the folder structure mentioned in What is the difference between PSR-0 and PSR-4?
Here is my folder structure.
Test
--Package
--Test.php
I have in Test.php
:
<?php
namespace Test\Package;
class Test
{
public function __construct()
{
echo "In Test class";
}
}
and composer.json
looks like
{
"autoload": {
"psr-0": {
"Test\\Package\\": "Test/Package/"
}
}
}