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

PHP 8 #481

Merged
merged 6 commits into from
Oct 26, 2024
Merged

PHP 8 #481

merged 6 commits into from
Oct 26, 2024

Conversation

therealartz
Copy link
Collaborator

As per #480 I'm creating this PR to lock the library to PHP 8.
Updated PHPUnit dependency to ^9.6

Not sure what is situation with CI right now (probably not working).

Min version in composer.json is 8.1, but I tested on 8.3.
Fixed all unit tests to be compatible with PHP 8.1+ and newer version of PHPUnit:

amadeus-ws-client % git branch
  master
* master-php8
amadeus-ws-client % ./vendor/bin/phpunit
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.

...............................................................  63 / 842 (  7%)
............................................................... 126 / 842 ( 14%)
..................................................WW.WW........ 189 / 842 ( 22%)
............................................................... 252 / 842 ( 29%)
............................................................... 315 / 842 ( 37%)
............................................................... 378 / 842 ( 44%)
............................................................... 441 / 842 ( 52%)
............................................................... 504 / 842 ( 59%)
............................................................... 567 / 842 ( 67%)
............................................................... 630 / 842 ( 74%)
............................................................... 693 / 842 ( 82%)
............................................................... 756 / 842 ( 89%)
............................................................... 819 / 842 ( 97%)
.......................                                         842 / 842 (100%)

Time: 00:00.262, Memory: 28.00 MB

There were 4 warnings:

1) Test\Amadeus\Client\Session\Handler\SoapHeader4Test::testCanCreateSoapHeadersForStatelessCall
assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.

2) Test\Amadeus\Client\Session\Handler\SoapHeader4Test::testCanCreateSoapHeadersForStatefullCallAuth
assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.

3) Test\Amadeus\Client\Session\Handler\SoapHeader4Test::testCanMakeSoapHeadersWithTransactionFlowLink
assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.

4) Test\Amadeus\Client\Session\Handler\SoapHeader4Test::testCanMakeSoapHeadersWithTransactionFlowLinkGeneratedGuid
assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.

WARNINGS!
Tests: 842, Assertions: 7319, Warnings: 4.

There is no new alternative of assertEqualXMLStructure (seems they decided to just remove this method without replacement, it just stayed a draft), but it should be ok for now.


My live application was using this library under PHP 8.3 long enough, didn't know any issues.
Checked under this branch air booking flow and ticketing.

@DerMika
Copy link
Collaborator

DerMika commented Oct 22, 2024

Can you look at the Scrutinizer build and why that fails? Seems like the right moment to fix that too.

@therealartz therealartz force-pushed the master-php8 branch 2 times, most recently from 0d72cc7 to b63d578 Compare October 22, 2024 14:48
@therealartz
Copy link
Collaborator Author

Can you look at the Scrutinizer build and why that fails? Seems like the right moment to fix that too.

Yeah, I understand.
Could you give add me access to this page? https://scrutinizer-ci.com/g/amabnl/amadeus-ws-client/settings/build-config
I guess something could be in a config at that page, as changing .scrutinizer.yml does not giving any effect

@therealartz therealartz force-pushed the master-php8 branch 4 times, most recently from ae6a5b1 to 328c0fc Compare October 22, 2024 18:06
@therealartz
Copy link
Collaborator Author

@DerMika fixed the Scrutinizer

@DerMika
Copy link
Collaborator

DerMika commented Oct 24, 2024

I guess you can go ahead and release?

I'm not sure if you'll need permissions on packagist.org to publish the new release 🤔
EDIT: made you maintainer there too

@therealartz
Copy link
Collaborator Author

@DerMika thanks. I will do it a bit later (when have free time)

@therealartz therealartz merged commit 5b95abf into amabnl:master Oct 26, 2024
2 checks passed
@therealartz therealartz deleted the master-php8 branch October 26, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants