php

Composer Autoload doesn't work anyway  #angularjs #reactjs

  • Stack Overflow works best with JavaScript enabled
  • I’m trying to use Composer’s autoloader but doesn’t work.
  • require “/vendor/autoload.php”; $ac = new DAO\Access();
  • autoload_psr4 file inside vendor/ return an array with all of the namespaces that I’ve written in composer.json
  • sign up log in tour help

I already ran composer dump-autoload and composer update and even did everything again in another folder but nothing is working. My Composer’ version is the latest and PHP too. I already changed the path on composer.json many times and nothing works.

@ng_real_ninja: Composer Autoload doesn’t work anyway #angularjs #reactjs

I’m trying to use Composer’s autoloader but doesn’t work. Look:

composer.json

Others classes start with namespace and class declaration like that:

The Access’ constructor echo a string just for testing. At index.php, I’ve:

But I always get the same error: Error: Class ‘DAO\Access’ not found in /var/www/html/keyguard/index.php on line 5

and even did everything again in another folder but nothing is working. My Composer’ version is the latest and PHP too. I already changed the path on composer.json many times and nothing works.

autoload_psr4 file inside vendor/ return an array with all of the namespaces that I’ve written in composer.json

Dude, please, help me.

I need help solving this riddle! It’s driving me crazy!

php

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.