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

Disallow build failures on PHP 7.2 #392

Merged
merged 3 commits into from
Jan 31, 2018
Merged

Disallow build failures on PHP 7.2 #392

merged 3 commits into from
Jan 31, 2018

Conversation

kukulich
Copy link
Collaborator

@kukulich kukulich commented Jan 2, 2018

No description provided.

@kukulich
Copy link
Collaborator Author

kukulich commented Jan 2, 2018

Hmm, Travis uses PHP 7.1.1 but the bug in SoapClient is fixed in 7.1.2 :(

@asgrim
Copy link
Member

asgrim commented Jan 31, 2018

@kukulich Hmm, what's the SoapClient issue? I just restarted the build but fails again:

1) Roave\BetterReflectionTest\SourceLocator\Type\PhpInternalSourceLocatorTest::testAllGeneratedStubsAreInSyncWithInternalReflectionClasses with data set "SoapClient" ('SoapClient')
SoapClient#__setSoapHeaders.soapheaders
Failed asserting that true matches expected false.
/home/travis/build/Roave/BetterReflection/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php:400
/home/travis/build/Roave/BetterReflection/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php:357
/home/travis/build/Roave/BetterReflection/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php:303
/home/travis/build/Roave/BetterReflection/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php:209
$ php --version
PHP 7.1.11 (cli) (built: Oct 26 2017 16:25:55) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.11, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

@kukulich
Copy link
Collaborator Author

@asgrim It caused by this: https://github.com/php/php-src/blob/PHP-7.1/NEWS#L170

Travis still runs PHP 7.1.11 unfortunately :(

I can add if to the test probably for older PHP.

@asgrim
Copy link
Member

asgrim commented Jan 31, 2018

Ah sorry, your comment suggested it was fixed in 7.1.2 ;) Gotcha. Then yes indeed, we're going to need to hack it to support both versions unfortunately as someone may be trying to reflect SoapClient with BR :/

@kukulich
Copy link
Collaborator Author

@asgrim Solved :)

@@ -397,7 +397,12 @@ private function assertSameParameterAttributes(
}
//self::assertSame($original->allowsNull(), $stubbed->allowsNull()); @TODO WTF?
self::assertSame($original->canBePassedByValue(), $stubbed->canBePassedByValue(), $parameterName);
self::assertSame($original->isOptional(), $stubbed->isOptional(), $parameterName);

if (! ($parameterName === 'SoapClient#__setSoapHeaders.soapheaders' && PHP_VERSION_ID < 70112)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disgusting, but works 👍

@asgrim asgrim added this to the 2.1.0 milestone Jan 31, 2018
@asgrim asgrim merged commit 2ba5247 into Roave:master Jan 31, 2018
@kukulich kukulich deleted the php72 branch January 31, 2018 15:02
@Ocramius Ocramius modified the milestones: 2.1.0, 3.0.0 Feb 5, 2018
@Ocramius Ocramius changed the title No allowed failures on PHP 7.2 anymore Disallow failures on PHP 7.2 May 26, 2018
@Ocramius Ocramius changed the title Disallow failures on PHP 7.2 Disallow build failures on PHP 7.2 May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants