Skip to content

Commit

Permalink
Fix compatibility for php 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Nov 26, 2023
1 parent 1adbc80 commit e439b28
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,31 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Install Composer packages not for PHP 5.3
- name: Install third-party packages for PHP 5.3
if: ${{ matrix.php-versions == '5.3' }}
run: composer require http-interop/http-middleware:^0.4.1 twig/twig:~1.4 --dev

- name: Install third-party packages not for PHP 5.3
if: ${{ matrix.php-versions != '5.3' }}
run: composer require filp/whoops nikic/fast-route phroute/phroute rdlowrey/auryn zendframework/zend-diactoros http-interop/http-middleware:^0.4.1 league/container:~2.4 twig/twig:~1.4 --dev

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

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

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

- name: Install Composer packages for PHP 7.4
- 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 Composer packages for PHP 8.1
- name: Install third-party packages for PHP 8.1
if: ${{ matrix.php-versions == '8.1' }}
run: composer require twig/twig --dev

Expand Down
2 changes: 1 addition & 1 deletion tests/Sample/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function routes($parsed = false)

$this->get('/param', 'Home@param');

$this->get('/handler/const', 'Hello@const');
$this->get('/handler/conts', 'Hello@conts');

$this->get('/handler/param', 'Hello@param');

Expand Down
2 changes: 1 addition & 1 deletion tests/Sample/Routes/Hello.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class Hello extends Route
{
public function const()
public function conts()
{
$data = $this->request->getParsedBody();

Expand Down
2 changes: 1 addition & 1 deletion tests/Sample/SampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function test_with_middleware_changing_the_request_constructor()
{
$this->builder->addHandler(new Parsed);

$this->builder->setUrl('GET', '/handler/const');
$this->builder->setUrl('GET', '/handler/conts');

$this->expectOutputString('Hello, Slytherin!');

Expand Down

0 comments on commit e439b28

Please sign in to comment.