coblocks icon indicating copy to clipboard operation
coblocks copied to clipboard

Introduce Composer autoloader

Open szepeviktor opened this issue 4 years ago • 2 comments

As we run on the latest PHP 5 version

Requires PHP: 5.6

and Composer autoloader only needs 5.3 we could let Composer load everything.

NOT Composer the tool, only the generated autoloader: vendor/composer/*

What do you think?

szepeviktor avatar Apr 10 '20 16:04 szepeviktor

Then we could clean up side-effects from class files! e.g.

CoBlocks_Block_Assets::register();

🧽

szepeviktor avatar Apr 10 '20 16:04 szepeviktor

Thank you @szepeviktor for this suggestion!

I agree that using the Composer autoloader would be a nice update to our PHP code. I'd actually like to refactor our "classes" to actually represent objects in the future which would also enable them to be tested easier.

However, this isn't a huge priority right now. Regardless, I will leave this issue open for now. We would be happy to review and merge any PR's submitted towards this effort if you would like to contribute in that way.

jrtashjian avatar Jul 14 '20 01:07 jrtashjian