Jump to content

Why is wire/core/ProcessWire.php the only file autoloaded in composer.json


MrSnoozles
 Share

Recommended Posts

Hey everyone,

I was just wondering what is the purpose of autoloading the file wire/core/ProcessWire.php in composer.json? As far as I can see that file gets required again anyway in index.php, around line 32.

image.png.e52017276f8013714a86d597aeaf3280.png

For me this line has no purpose but one major drawback: When requiring ProcessWire as dependecy in a module (e.g. to write tests against a clean ProcessWire installation), an error is thrown that the class is already in use.

Fatal error: Cannot declare class ProcessWire\ProcessWire, because the name is already in use

 

Does this autoloading have any purpose?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...