src/Resources/config/services.xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://symfony.com/schema/dic/services"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service class="Hmaus\Spas\SpasApplication" id="hmaus.spas.spas_application"/>
<service class="Symfony\Component\EventDispatcher\EventDispatcher" id="hmaus.spas.event_dispatcher"/>
<service class="Symfony\Component\Console\Input\ArgvInput" id="hmaus.spas.console_input"/>
<service class="Symfony\Component\Console\Output\ConsoleOutput" id="hmaus.spas.console_output"/>
<!-- Logging -->
<service class="Hmaus\Spas\Logger\TruncateableConsoleLogger" id="hmaus.spas.logger"/>
<service class="Symfony\Component\Console\Style\SymfonyStyle" id="hmaus.spas.io"/>
<!-- HTTP -->
<service class="GuzzleHttp\Client" id="hmaus.spas.httpclient">
<factory class="Hmaus\Spas\Request\HttpClientFactory" method="create" />
<argument type="string">curl</argument>
</service>
<service class="Hmaus\Spas\Request\HttpClient" id="hmaus.spas.request.httpclient">
<argument type="service" id="hmaus.spas.httpclient"/>
<argument type="service" id="hmaus.spas.logger"/>
<argument type="service" id="hmaus.spas.spas_application"/>
</service>
<!-- Files and Filesystem -->
<service class="Symfony\Component\Filesystem\Filesystem" id="hmaus.spas.filesystem"/>
<service class="Hmaus\Spas\Filesystem\InputFinder" id="hmaus.spas.filesystem.input_finder"/>
<!-- Execution of Requests -->
<service class="Hmaus\Spas\Request\Executor" id="hmaus.spas.request.executor">
<argument type="service" id="hmaus.spas.logger"/>
<argument type="service" id="hmaus.spas.event_dispatcher"/>
<argument type="service" id="hmaus.spas.request.processor"/>
<argument type="service" id="hmaus.spas.request.hook_handler"/>
</service>
<service class="Hmaus\Spas\Request\HookHandler" id="hmaus.spas.request.hook_handler">
<argument type="service" id="hmaus.spas.console_input"/>
<argument type="service" id="hmaus.spas.event_dispatcher"/>
<argument type="service" id="hmaus.spas.logger"/>
<argument type="service" id="hmaus.spas.filesystem"/>
<argument type="service">
<service class="Symfony\Component\HttpFoundation\ParameterBag"/>
</argument>
<argument type="service">
<service class="Seld\JsonLint\JsonParser"/>
</argument>
</service>
<service class="Hmaus\Spas\Request\RequestProcessor" id="hmaus.spas.request.processor">
<argument type="service" id="hmaus.spas.console_input"/>
<argument type="service" id="hmaus.spas.logger"/>
<argument type="service" id="hmaus.spas.event_dispatcher"/>
<argument type="service" id="hmaus.spas.validator"/>
<argument type="service" id="hmaus.spas.request.httpclient"/>
<argument type="service" id="hmaus.spas.request.result.exception_handler"/>
<argument type="service" id="hmaus.spas.formatter.service"/>
<argument type="service" id="hmaus.spas.request.filter_handler"/>
<argument type="service" id="hmaus.spas.processor_report"/>
</service>
<service class="Hmaus\Spas\Request\FilterHandler" id="hmaus.spas.request.filter_handler">
<argument type="service" id="hmaus.spas.console_input"/>
</service>
<!-- Error and Exception Handling -->
<service class="Hmaus\Spas\Request\Result\ExceptionHandler" id="hmaus.spas.request.result.exception_handler">
<argument type="service" id="hmaus.spas.logger"/>
<argument type="service" id="hmaus.spas.formatter.service"/>
</service>
<!-- Formatting -->
<service class="Hmaus\Spas\Formatter\FormatterService" id="hmaus.spas.formatter.service"/>
<service class="Hmaus\Spas\Formatter\JsonFormatter" id="hmaus.spas.formatter.json">
<tag name="hmaus.spas.tag.formatter"/>
</service>
<service class="Hmaus\Spas\Formatter\ValidationErrorFormatter" id="hmaus.spas.formatter.validation_error">
<tag name="hmaus.spas.tag.formatter"/>
</service>
<service class="Hmaus\Spas\Formatter\XmlFormatter" id="hmaus.spas.formatter.xml">
<tag name="hmaus.spas.tag.formatter"/>
</service>
<service class="Hmaus\Spas\Formatter\HtmlFormatter" id="hmaus.spas.formatter.html">
<tag name="hmaus.spas.tag.formatter"/>
</service>
<service class="Hmaus\Spas\Request\Result\ProcessorReport" id="hmaus.spas.processor_report"/>
</services>
</container>