Skip to content

Releases: rougin/slytherin

v0.9.8

23 May 07:54
32fb82c
Compare
Choose a tag to compare

Added

  • phpcsfixer.php as custom rules for the friendsofphp/php-cs-fixer package
  • Test cases for the complete code coverage after running friendsofphp/php-cs-fixer
  • @deprecated notices for specified classes from previous versions
  • HandlerInterface for all wrapper variants of PSR-15 middlewares

Changed

  • Router::__construct supports adding RouteInterface in the array
  • Code styling based on friendsofphp/php-cs-fixer package

v0.9.7

12 Jan 11:03
Compare
Choose a tag to compare

Added

  • preferred property in integrations
  • ContainerException in Container
  • RouteInterface for handling specific routes
  • Support for all versions of http-interop/http-middleware (0.3, 0.4, 0.5)
  • Support version for PHP v8.3
  • Routing for creating HTTP routes directly in Application

Changed

  • Third-party packages in Routing extends to Slytherin's Dispatcher, Router
  • Conformed all application logic to RouteInterface
  • UnexpectedValueException to BadMethodCallException in DispatcherInterface
  • Conformed Middleware to the official PSR-15 package (psr/http-server-middleware)
  • Application class to System
  • Improvement to unit tests (renamed to snake_case, improved logic)

Fixed

  • Type hinting of all classes using PHPStan (up to level 9)
  • Forward slash (\\) not required if setting $namespace in Router
  • Checking of available instances in Container::value
  • If ServerRequestInterface is an argument with a middleware
  • Backward compatibility for LeagueContainer::set (as of ~3.0)
  • Backward compatibility for TwigRenderer::render (as of ~3.0)
  • Backward compatibility for StratigilityDispatcher::process (until ~3.0)
  • Resolving type hinted routes for third-party routing dispatchers

Removed

  • Integration\ConfigurationInterface as its not being used
  • Resolver inside Container (will now not provide autowiring by default)

v0.9.6

16 Nov 14:23
Compare
Choose a tag to compare

Added

  • Support versions for PHP v8.0, v8.1, v8.2
  • Parameter in Container for compatibility to PHP v8.0 and above

Changed

  • Replaced Scrutinizer CI with Codecov for code coverage
  • Replaced Travis CI with Github Actions for workflow

Fixed

  • Compatibility of LeagueContainer in PHP v7.2.0 (only supports versions until 2.9)
  • Initializing of AurynContainer in PHP v7.0 and above
  • Errors during unit tests in migrating to Github Actions

Removed

  • Changes from the initial v0.9.6 pre-release version

v0.9.5

23 Feb 03:15
Compare
Choose a tag to compare

Changed

  • Unit test cases
  • LICENSE.md

Fixed

  • Returning templates from Template\Renderer with insensitive-case

Removed

  • Dependency of Dispatcher in FastRouteDispatcher and PhrouteDispatcher

v0.9.4

07 Feb 02:38
Compare
Choose a tag to compare

Fixed

  • Empty attributes when using ServerRequest::getAttribute

v0.9.3

05 Feb 01:24
Compare
Choose a tag to compare

Added

  • Middleware\HandlerInterface

Changed

  • Allowed IntegrationInterface instances to be added in Application::integrate
  • Returning data in Http\Uri::withUserInfo
  • Return headers based from HTTP_* values in $_SERVER global variable
  • Rewrite logic of Http package
  • Move Container\Exception\NotFoundException to Container\NotFoundException
  • Change array_push to $array[]
  • Rewrite logic of Template\Renderer

Fixed

  • Running test cases without third-party packages

Removed

  • xdebug_get_headers and headers_list in HttpIntegration

v0.9.2

27 Oct 07:39
Compare
Choose a tag to compare

Fixed

  • Getting default values of a class in Container\ReflectionContainer
  • Returning empty values in Integration\Configuration

v0.9.1

21 Jul 01:32
Compare
Choose a tag to compare

Fixed

  • Retrieving a single uploaded file in ServerRequest::getUploadedFiles

v0.9.0

08 Jul 11:48
Compare
Choose a tag to compare

NOTE: This release may break your application if upgrading from v0.8.0 release.

Added

  • Implementation of PSR-7, PSR-11, and PSR-15 standards.
    • Packages psr/container and psr/http-message are already included in this release
    • Install http-interop/http-middleware if you want to use middlewares in Middleware directory
  • Middlewares in FastRoute\Dispatcher and Phroute\Dispatcher
  • Integration for integrating third-party packages to Slytherin
  • Configuration for ease of access in getting configurations inside integrations
  • Integrations for existing directories (e.g Http\HttpIntegration, Debug\ErrorHandlerIntegration)
  • Routing\Router::prefix for adding prefix in succeeding route endpoints
  • Routing\Router::restful for adding RESTful routes based on one base route
  • Routing\DispatcherInterface::router for setting up routers manually
  • Application::container for getting the static instance of PSR-11 container
  • Container\ReflectionContainer for using PHP's Reflection API for solving class dependencies
  • Resolving of type hinted parameters in functions or class methods
  • Application\CallbackHandler and Application\FinalCallback for building a callback for the application

Changed

  • Minimum required PHP version to v5.3.0
  • Dispatching directory to Routing
  • IoC directory to Container
  • Debug\Debugger to Debug\ErrorHandler
  • Middleware\MiddlewareInterface to Middleware\DispatcherInterface
  • Emit headers on Application::run only
  • Allow anonymous functions and objects in adding middleware from a specified route in Middleware\Stratigility

Deprecated

  • Application\Application class
  • Component directory
  • Debug\Debugger class
  • Debugger related classes
  • Dispatching directory
  • ErrorHandler directory
  • IoC directory
  • Middleware\MiddlewareInterface interface
  • Middleware\Stratigility\Middleware class
  • Template\Twig\Renderer class
  • Vanilla related classes

Fixed

  • Appending of middleware response from DispatcherInterface's result in Application::run
  • Array to string conversion error when add callback routes with arguments
  • Compatibility issue for Statigility\Middleware
  • Getting $request object in container after being defined in Application::handle

Removed

  • HTTP method spoofing (apply it on a middleware instead)
  • Traits (in order to achieve PHP v5.3.0 as the minimum required version)
  • getEnvironment and setEnvironment in Debug\ErrorHandlerInterface

v0.8.0

01 Sep 10:38
Compare
Choose a tag to compare

Added

  • Implementation for Phroute package

Changed

  • Set globals to Twig_Environment when creating an instance in Template\TwigRenderer

Fixed

  • Using add in Component\Collector if not using IoC\Vanilla\Container

Removed

  • Third party packages in require-dev