Skip to content

Commit

Permalink
Merge pull request #455 from paxal/php-7.3-tests
Browse files Browse the repository at this point in the history
Php 7.3 tests
  • Loading branch information
Ocramius authored Dec 7, 2018
2 parents 1efdfe5 + 6c16905 commit f54261a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 8 deletions.
32 changes: 31 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ jobs:
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: vendor/bin/phpunit

- stage: Test
php: 7.3
env: DEPENDENCIES=""
script: vendor/bin/phpunit

- stage: Test
php: 7.3
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: vendor/bin/phpunit

- stage: Test Compatibility
php: 7.1
env: DEPENDENCIES=""
Expand All @@ -46,6 +56,16 @@ jobs:
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: vendor/bin/phpunit test/compat

- stage: Test Compatibility
php: 7.3
env: DEPENDENCIES=""
script: vendor/bin/phpunit test/compat

- stage: Test Compatibility
php: 7.3
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: vendor/bin/phpunit test/compat

- stage: Check Demo Scripts
php: 7.1
env: DEPENDENCIES=""
Expand All @@ -66,8 +86,18 @@ jobs:
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: test/demo/check-demo.sh

- stage: Check Demo Scripts
php: 7.3
env: DEPENDENCIES=""
script: test/demo/check-demo.sh

- stage: Check Demo Scripts
php: 7.3
env: DEPENDENCIES="--prefer-lowest --prefer-stable"
script: test/demo/check-demo.sh

- stage: Check Coding Standard
php: 7.2
php: 7.3
env: DEPENDENCIES=""
before_script:
- travis_retry composer install
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "Better Reflection - an improved code reflection API",
"license": "MIT",
"require": {
"php": ">=7.1.0,<7.3.0",
"nikic/php-parser": "^4.0.0",
"php": ">=7.1.0,<7.4.0",
"nikic/php-parser": "^4.0.4",
"phpdocumentor/reflection-docblock": "^4.1.1",
"phpdocumentor/type-resolver": "^0.4.0",
"roave/signature": "^1.0"
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/SourceLocator/Reflection/SourceStubber.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private function addParameterModifiers(ReflectionParameter $parameterReflection,
$parameterType = $parameterReflection->getType();

if ($parameterReflection->getType() !== null) {
$parameterNode->setTypeHint($this->formatType($parameterType));
$parameterNode->setType($this->formatType($parameterType));
}

return $parameterNode;
Expand Down
2 changes: 1 addition & 1 deletion stub/SoapServer.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SoapServer
{
}

public function setClass($class_name, $args = null)
public function setClass($class_name, ...$args)
{
}

Expand Down
10 changes: 10 additions & 0 deletions test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,16 @@ private function assertSameParameterAttributes(
self::markTestSkipped('New type hints were introduced in PHP 7.2 for ' . $parameterName);
}

if (PHP_VERSION_ID < 70300
&& in_array(
$parameterName,
['SoapServer#setClass.args'],
true
)
) {
self::markTestSkipped('New type hints were introduced in PHP 7.3 for ' . $parameterName);
}

if (in_array(
$parameterName,
[
Expand Down

0 comments on commit f54261a

Please sign in to comment.