Skip to content

Commit

Permalink
Reimplement Middleware package (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin authored Dec 9, 2023
1 parent d52dd3a commit 2dde754
Show file tree
Hide file tree
Showing 109 changed files with 3,255 additions and 1,685 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,29 @@ jobs:
if: ${{ matrix.php-versions != '5.3' }}
run: composer require filp/whoops league/container nikic/fast-route phroute/phroute rdlowrey/auryn twig/twig zendframework/zend-diactoros http-interop/http-middleware:^0.4.1 --dev

- name: Install third-party packages for PHP 5.4
if: ${{ matrix.php-versions == '5.4' }}
run: composer require zendframework/zend-stratigility --dev

- name: Install third-party packages for PHP 5.5
if: ${{ matrix.php-versions == '5.5' }}
run: composer require zendframework/zend-stratigility --dev

- name: Install third-party packages for PHP 7.1
if: ${{ matrix.php-versions == '7.1' }}
run: composer require zendframework/zend-stratigility:~2.0 --dev
run: composer require zendframework/zend-stratigility --dev

- name: Install third-party packages for PHP 7.2
if: ${{ matrix.php-versions == '7.2' }}
run: composer require zendframework/zend-stratigility:~2.0 --dev
run: composer require zendframework/zend-stratigility --dev

- name: Install third-party packages for PHP 7.3
if: ${{ matrix.php-versions == '7.3' }}
run: composer require zendframework/zend-stratigility:~2.0 --dev
run: composer require zendframework/zend-stratigility --dev

- name: Install third-party packages for PHP 7.4
if: ${{ matrix.php-versions == '7.4' }}
run: composer require zendframework/zend-stratigility:~2.0 --dev

- name: Install third-party packages for PHP 8.1
if: ${{ matrix.php-versions == '8.1' }}
run: composer require twig/twig --dev
run: composer require zendframework/zend-stratigility --dev

- name: Run test suite
run: vendor/bin/phpunit --coverage-clover=coverage.clover
Expand Down
102 changes: 92 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ All notable changes to `Slytherin` will be documented in this file.
- `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`)
- `ERRATUM.md` for changes in `README.md` for specified versions
- `UPGRADE.md` for documentation on how to upgrade versions with BC breaks

### 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`

### Fixed
- Type hinting of all classes using `PHPStan` (up to `level 9`)
Expand All @@ -21,10 +26,8 @@ All notable changes to `Slytherin` will be documented in this file.
- 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`)
- Resolving typehinted routes for third-party routers

### Removed
- `__call` methods in `Router`, use the defined methods instead (e.g., `get()`, `post()`, etc.)
- Backward compatibility for `StratigilityDispatcher::process` (until `~3.0`)
- Resolving type hinted routes for third-party routers

## [0.9.6](https://github.com/rougin/slytherin/compare/v0.9.5...v0.9.6) - 2023-11-16

Expand Down Expand Up @@ -92,7 +95,7 @@ All notable changes to `Slytherin` will be documented in this file.
### Fixed
- Retrieving a single uploaded file in `ServerRequest::getUploadedFiles`

## [0.9.0](https://github.com/rougin/slytherin/compare/v0.8.0...v0.9.0) - 2017-07-08
## [0.9.0](https://github.com/rougin/slytherin/compare/v0.8.2...v0.9.0) - 2017-07-08

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

Expand Down Expand Up @@ -145,7 +148,25 @@ All notable changes to `Slytherin` will be documented in this file.
- Traits (in order to achieve PHP `v5.3.0` as the minimum required version)
- `getEnvironment` and `setEnvironment` in `Debug\ErrorHandlerInterface`

## [0.8.0](https://github.com/rougin/slytherin/compare/v0.7.0...v0.8.0) - 2016-09-08
## [0.8.2](https://github.com/rougin/slytherin/compare/v0.8.1...v0.8.2) - 2023-12-09

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Fixed
- Compatibility issues from `v0.7.2` release

## [0.8.1](https://github.com/rougin/slytherin/compare/v0.8.0...v0.8.1) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Added
- `alias` method in `AurynContainer` for backport fix from previous versions

### Fixed
- Compatibility issues from `v0.7.1` release
- `html` as the default `$fileExtension` instead of `twig`

## [0.8.0](https://github.com/rougin/slytherin/compare/v0.7.2...v0.8.0) - 2016-09-08

### Added
- Implementation for [Phroute](https://github.com/mrjgreen/phroute) package
Expand All @@ -159,7 +180,26 @@ All notable changes to `Slytherin` will be documented in this file.
### Removed
- Third party packages in `require-dev`

## [0.7.0](https://github.com/rougin/slytherin/compare/v0.6.0...v0.7.0) - 2016-07-17
## [0.7.2](https://github.com/rougin/slytherin/compare/v0.7.1...v0.7.2) - 2023-12-09

### Added
- `setTemplate` for setting `RendererInterface` in `Collection`
- `ComponentInterface` for defining Slytherin implementations

### Changed
- Rework `Collection`, `Collector`

### Fixed
- Add items in `Auryn\Container`

## [0.7.1](https://github.com/rougin/slytherin/compare/v0.7.0...v0.7.1) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Fixed
- Compatibility issues from `v0.6.1` release

## [0.7.0](https://github.com/rougin/slytherin/compare/v0.6.1...v0.7.0) - 2016-07-17

### Added
- HTTP method spoofing
Expand All @@ -174,7 +214,14 @@ All notable changes to `Slytherin` will be documented in this file.
### Removed
- `HttpKernelInterface`

## [0.6.0](https://github.com/rougin/slytherin/compare/v0.5.0...v0.6.0) - 2016-05-24
## [0.6.1](https://github.com/rougin/slytherin/compare/v0.6.0...v0.6.1) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Fixed
- Compatibility issues from `v0.5.1` release

## [0.6.0](https://github.com/rougin/slytherin/compare/v0.5.1...v0.6.0) - 2016-05-24

### Added
- Parameter for adding default data and file extension in `Template\TwigRenderer`
Expand All @@ -183,7 +230,18 @@ All notable changes to `Slytherin` will be documented in this file.
### Changed
- File and directory structure

## [0.5.0](https://github.com/rougin/slytherin/compare/v0.4.3...v0.5.0) - 2016-04-14
## [0.5.1](https://github.com/rougin/slytherin/compare/v0.5.0...v0.5.1) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Added
- `NoopFinalHandler` in `StratigilityMiddleware`

### Fixed
- Compatibility issues from `v0.4.4` release
- Issue if no middleware was defined in `Application`

## [0.5.0](https://github.com/rougin/slytherin/compare/v0.4.4...v0.5.0) - 2016-04-14

### Added
- `Middleware` component
Expand All @@ -195,6 +253,19 @@ All notable changes to `Slytherin` will be documented in this file.
- PHP version to `v5.4.0`
- Interface from `RequestInterface` to `ServerRequestInterface` in `Components`

## [0.4.4](https://github.com/rougin/slytherin/compare/v0.4.3...v0.4.4) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Added
- `ComponentCollection`
- `ErrorHandler` (`ErrorHandlerInterface`, `Whoops`)
- `IoC\Auryn`
- `Template\Twig`

### Fixed
- Missing `container-interop/container-interop` package in `composer.json`

## [0.4.3](https://github.com/rougin/slytherin/compare/v0.4.2...v0.4.3) - 2016-02-19

### Added
Expand Down Expand Up @@ -239,7 +310,7 @@ All notable changes to `Slytherin` will be documented in this file.
- `Http\ResponseInterface` dependency in `Dispatching\Dispatcher`
- Dependency of [nikic/fast-route](https://github.com/nikic/FastRoute) in `Dispatching` (use `Dispatching\FastRoute` instead)

## [0.3.0](https://github.com/rougin/slytherin/compare/v0.2.1...v0.3.0) - 2015-11-02
## [0.3.0](https://github.com/rougin/slytherin/compare/v0.2.2...v0.3.0) - 2015-11-02

**NOTE**: This release will break your application if upgrading from `v0.2.0` release.

Expand All @@ -253,6 +324,17 @@ All notable changes to `Slytherin` will be documented in this file.
### Removed
- Almost everything, this release will be no longer an application skeleton

## [0.2.2](https://github.com/rougin/slytherin/compare/v0.2.1...v0.2.2) - 2023-12-08

**NOTE**: This is a backport fix to lessen backward compatibility issues.

### Changed
- `post-install-cmd` to `post-update-cmd` in `README.md`
- Detailed example in creating the `CRUD` code

### Fixed
- Missing `APPPATH` after generating `index.php` from `Installer`

## [0.2.1](https://github.com/rougin/slytherin/compare/v0.2.0...v0.2.1) - 2015-09-30

### Added
Expand Down
Loading

0 comments on commit 2dde754

Please sign in to comment.