Skip to content

Adding basic structure + PHPUnit + PHPCS

Choose a tag to compare

@juananrey juananrey released this 14 Apr 11:10
· 13 commits to master since this release
  • Adding FrameworkExtraBundle to render controllers with given Annotations.
  • Adding HealthCheckController, minimal piece of code which will determine if our API is running or not.
  • Adding custom exceptions for our application: the idea behind this is that every exception within our domain shall extend from AppException, which have the control on two things:
    • All our exceptions will have specific error codes (of course, already known by our clients).
    • In order to avoid bubbling up exceptions and make an infinite try/catch, such exceptions will also contain a predefined HTTP error code.
  • Adding ExceptionListener, which will render every exception within the system in a json format, to be consistent with the rest of the API.
  • Adding PHPUnit unit and functional test possibilities, which can be executed running bin/phpunit.
  • Adding PHP Code Sniffer which defaults to the PSR-2 standard, and that can be executed by running bin/phpcs.