thephpleague / html-to-markdown

Convert HTML to Markdown with PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autoloader not defined

andreamoro opened this issue · comments

Appreciate this is not a "real" issue, but having used in the past the v. 2.8.x that was all in one file, I now struggle to update to the most recent version not being able to use composer.

Any chance to add the __autoload method in each files or as in a general routine so to save the hassle to everybody willing to play with the class quickly?

Unfortunately, Composer is the only supported installation method (#95). We do not have any plans to create a dedicated autoload file for non-Composer installations.

In my personal experience, it should be possible to use Composer to install libraries like this into legacy projects. You may need to customize things like where the vendor dir is placed, or update your code to use spl_autoload_register instead of __autoload to support multiple autoloaders, but it should be doable. I'd be more than happy to offer any further advice on making that change so you can successfully use Composer with your project - just let me know! 😃

Well, i need this for an export exercise that one finished it will thrown away.
Anything easier I can do?

Using an autoloader would be the easiest approach. Otherwise, you could try a workaround like running require_once for all files in this library (maybe even automate that with some additional PHP?)