vamsiikrishna / html-to-bbcode

HTML To BBCode Converter
3 stars 2 forks source link

autoload.php is missing #2

Closed dreaming-augustin closed 7 years ago

dreaming-augustin commented 7 years ago

In example/example.php there is the line: require_once __DIR__ . '/../vendor/autoload.php'; but autoload.php does not appear to be included in the source repository.

I managed to use this otherwise very fine library (Thanks!) by including all the files first:

include_once('src/ConfigurationAwareInterface.php');
include_once('src/Configuration.php');
include_once('src/Converter/ConverterInterface.php');
include_once('src/Converter/BreakConverter.php');
include_once('src/Converter/DefaultConverter.php');
include_once('src/Converter/FontConverter.php');
include_once('src/Converter/HeadConverter.php');
include_once('src/Converter/ImageConverter.php');
include_once('src/Converter/LinkConverter.php');
include_once('src/Converter/ListConverter.php');
include_once('src/Converter/ParagraphConverter.php');
include_once('src/Converter/TextStyleConverter.php');
include_once('src/ElementInterface.php');
include_once('src/Element.php');
include_once('src/Environment.php');
include_once('src/HtmlConverter.php');
vamsiikrishna commented 7 years ago

its' assumed that the user is using composer to manage their PHP library dependencies. ( sorry for not making it clear on README, this is still a work in progress )

Once you have composer installed, you can add this library as a dependency in your projects and let composer download the source code and generating the Autoloader.

composer.json

    "require": {
        "vamsiikrishna/html-to-bbcode": "dev-master"
    }
}

Please check out https://getcomposer.org/doc/00-intro.md

dreaming-augustin commented 7 years ago

Oh, OK. Thanks for the feedback. It's the first time I hear about composer. I am on Gentoo and Composer is only available in the unstable branch. I will check it out. Meanwhile, I'm guessing that there is no inconvenience in using the library without Composer, provided we manually include all the files, as I did above.

Thanks a lot for your work. :)

vamsiikrishna commented 7 years ago

composer installation is as simple as downloading a single composer.phar file ( wget, curl etc ). you can also install it via the instructions that composer offers on their website , which just uses PHP.

dreaming-augustin commented 7 years ago

Thanks. https://github.com/vamsiikrishna/html-to-bbcode/wiki