Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Added PHP 7.3 support - updated Travis CI configuration #80

Merged
merged 4 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
sudo: false

language: php

cache:
Expand Down Expand Up @@ -33,6 +31,15 @@ matrix:
- php: 7.2
env:
- DEPS=latest
- php: 7.3
env:
- DEPS=lowest
- php: 7.3
env:
- DEPS=locked
- php: 7.3
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- Nothing.
- [#80](https://github.com/zendframework/zend-expressive-router/pull/80) adds support for PHP 7.3.

### Changed

Expand Down
16 changes: 15 additions & 1 deletion test/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,28 @@ public function testRouteNameWithGetAndPost()
$this->assertSame('/test^GET' . Route::HTTP_METHOD_SEPARATOR . RequestMethod::METHOD_POST, $route->getName());
}

public function testThrowsExceptionDuringConstructionIfPathIsNotString()
/**
* @requires PHP < 7.3
*/
public function testThrowsExceptionDuringConstructionIfPathIsNotStringPhpPriorTo73()
{
$this->expectException(TypeError::class);
$this->expectExceptionMessage('must be of the type string, integer given');

new Route(12345, $this->noopMiddleware);
}

/**
* @requires PHP 7.3
*/
public function testThrowsExceptionDuringConstructionIfPathIsNotString()
{
$this->expectException(TypeError::class);
$this->expectExceptionMessage('must be of the type string, int given');

new Route(12345, $this->noopMiddleware);
}

public function testThrowsExceptionDuringConstructionOnInvalidMiddleware()
{
$this->expectException(TypeError::class);
Expand Down