Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement Middleware package #23

Merged
merged 46 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8c52799
Change "Middleware" to "Server"
rougin Dec 2, 2023
5c7856f
Fix unit tests for "Server"
rougin Dec 3, 2023
e613018
Change details in CHANGELOG.md
rougin Dec 3, 2023
30d280d
Fix issues in php >= 8.0
rougin Dec 3, 2023
ab9562a
Add additional unit test in SampleTest
rougin Dec 3, 2023
c84a222
Improve type hinting of Server
rougin Dec 3, 2023
ec2a077
Add Callback, Wrapper in Server
rougin Dec 3, 2023
8440afc
Fix type hinting in Dispatch
rougin Dec 3, 2023
ef7755b
Implement Callback in MiddlewareInterface
rougin Dec 3, 2023
4a0306d
Allow usage of double pass middlewares
rougin Dec 3, 2023
431a1fb
Remove Doublepass class
rougin Dec 3, 2023
571b5c3
Change details in FastRouteRouter, PhrouteRouter
rougin Dec 3, 2023
8cb8e2f
Change details in CHANGELOG.md, Collection
rougin Dec 3, 2023
050f461
Integrate "Server" back to "Middleware"
rougin Dec 4, 2023
91c8a5a
Reimplement zend/stratigility package
rougin Dec 4, 2023
20850a0
Remove unused __invoke in Callback
rougin Dec 4, 2023
5cc3070
Add backward compatibility for zend/stratigility in v2.0, v3.0
rougin Dec 5, 2023
d53609b
Do not support zend/stratigility ~1.0
rougin Dec 5, 2023
430980a
Allow zend/stratigility ~1.0 except single pass middlewares
rougin Dec 5, 2023
3ebc02d
Fix issue in php 5.6, 7.0
rougin Dec 5, 2023
ea84717
Add @codeCoverageIgnore in StratigilityDispatcher
rougin Dec 5, 2023
13d14d2
Move "Server" back to "Middleware"
rougin Dec 5, 2023
d84208b
Change type hinting to Rougin\Slytherin\Middleware\MiddlewareInterface
rougin Dec 5, 2023
32eccf9
Fix issue in build.yml
rougin Dec 5, 2023
c5a087e
Change details in CHANGELOG.md
rougin Dec 5, 2023
96754b9
Change details in CHANGELOG.md
rougin Dec 5, 2023
deec233
Add v0.2.2 in CHANGELOG.md
rougin Dec 7, 2023
f0c7b13
Add ERRATUM.md, UPGRADE.md
rougin Dec 7, 2023
722a9ac
Change details in CHANGELOG.md, UPGRADE.md
rougin Dec 8, 2023
b4bad6e
Change details in CHANGELOG.md
rougin Dec 8, 2023
f43ecab
Change details in CHANGELOG.md
rougin Dec 8, 2023
58a809b
Add v0.6.1 backport fix in CHANGELOG.md
rougin Dec 8, 2023
c9409a6
Add v0.7.1 backport fix in CHANGELOG.md
rougin Dec 8, 2023
5e77433
Add v0.8.1 backport fix in CHANGELOG.md
rougin Dec 8, 2023
d001c1f
Fix compatibility issues from v0.8.1
rougin Dec 8, 2023
394c210
Change details in TwigRenderer
rougin Dec 8, 2023
66e4f37
Fix styling issues from compatibility fixes
rougin Dec 8, 2023
2da2ee0
Change details in ERRATUM.md, UPGRADE.md
rougin Dec 8, 2023
4d209b3
Change details in UPGRADE.md
rougin Dec 8, 2023
355616d
Add test app for backward compatibility
rougin Dec 8, 2023
b5587a1
Add v0.7.2, v0.8.2 backport fix in CHANGELOG.md
rougin Dec 9, 2023
beddc7f
Fix issue in TwigLoader::load
rougin Dec 9, 2023
2a10eac
Fix issue in TwigRenderer::render
rougin Dec 9, 2023
c254f51
Fix compatibility issue from v0.8.2
rougin Dec 9, 2023
67ad744
Improve type hinting in Component
rougin Dec 9, 2023
ea17d77
Change details in ERRATUM.md, CHANGELOG.md
rougin Dec 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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