-
Notifications
You must be signed in to change notification settings - Fork 7
MINT-5942: Upgrade BeSimpleSoap bundle to use PHP 8.1 #24
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
base: master
Are you sure you want to change the base?
Changes from 50 commits
6c7a80b
588dc8c
8399d90
8ed1570
df67419
e032fa0
14c5358
6f14399
602033e
17ab0fe
fd41e9f
8457977
acffbdb
8af33e8
5c294a1
3a1743a
78340d3
f586f83
d23e1e4
4928b34
89c6303
2001a3a
a7a1e31
fd48ddf
e0c83bd
e3bf920
adbc3d5
2c5d507
1babb03
0828249
e338be0
144f734
4095f3b
c057b41
91fd835
e5eafe1
1838301
902f74b
965457a
61fe11a
1f890f4
49ed514
6958936
8329d2e
62bd19a
f846615
567ba61
80a39c1
fe48a09
096c7bb
d53d24b
5f6f6fb
6a570ef
afd2802
903b692
66a4dcb
085b414
f49a336
538a748
f507dbf
422e170
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Workflow | ||
| on: [push] | ||
| jobs: | ||
| php_8_job: | ||
| runs-on: '${{ matrix.os }}' | ||
| strategy: | ||
| matrix: | ||
| operating-system: [ubuntu-latest] | ||
| php-versions: ['8.0','8.1'] | ||
| include: | ||
| - os: ubuntu-18.04 | ||
| SYMFONY_VERSION: 6.0.* | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| extensions: intl #optional | ||
| ini-values: "post_max_size=256M" #optional | ||
| - name: Check PHP Version | ||
| run: php -v | ||
| - run: sudo composer self-update | ||
| - run: >- | ||
| composer require symfony/framework-bundle:${SYMFONY_VERSION} | ||
| --no-update | ||
| env: | ||
| SYMFONY_VERSION: '${{ matrix.SYMFONY_VERSION }}' | ||
| - run: composer install --prefer-dist --no-interaction | ||
| - run: ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh | ||
| - run: ./src/BeSimple/SoapClient/Tests/bin/axis.sh | ||
| - run: bin/simple-phpunit --debug | ||
|
|
||
| php_7_2_and_7_3_and_7_4_job: | ||
| runs-on: '${{ matrix.os }}' | ||
| strategy: | ||
| matrix: | ||
| operating-system: [ubuntu-latest] | ||
| php-versions: ['7.2','7.3','7.4'] | ||
| include: | ||
| - os: ubuntu-18.04 | ||
| SYMFONY_VERSION: 3.4.* | ||
| - os: ubuntu-18.04 | ||
| SYMFONY_VERSION: 5.4.* | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| extensions: intl #optional | ||
| ini-values: "post_max_size=256M" #optional | ||
| - name: Check PHP Version | ||
| run: php -v | ||
| - run: sudo composer self-update | ||
| - run: >- | ||
| composer require symfony/framework-bundle:${SYMFONY_VERSION} | ||
| --no-update | ||
| env: | ||
| SYMFONY_VERSION: '${{ matrix.SYMFONY_VERSION }}' | ||
| - run: composer install --prefer-dist --no-interaction | ||
| - run: ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh | ||
| - run: ./src/BeSimple/SoapClient/Tests/bin/axis.sh | ||
| - run: bin/simple-phpunit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,26 @@ | ||
| FROM composer:1 AS composer | ||
| FROM composer:2 AS composer | ||
|
|
||
| FROM php:7.0-fpm | ||
| FROM php:8.1.0-fpm | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should use the PHP 8.0 here. |
||
|
|
||
| COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
|
||
| #Installing and enabling features and PHP extension needed | ||
| RUN apt-get update -y \ | ||
| && apt-get install -y libxml2-dev git unzip \ | ||
| && apt-get clean -y \ | ||
| && docker-php-ext-install soap | ||
| && docker-php-ext-install soap | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y openjdk-11-jdk && \ | ||
| apt-get install -y ant && \ | ||
| apt-get clean; | ||
|
|
||
| # Fix certificate issues | ||
| RUN apt-get update && \ | ||
| apt-get install ca-certificates-java && \ | ||
| apt-get clean && \ | ||
| update-ca-certificates -f; | ||
|
|
||
| # Setup JAVA_HOME -- useful for docker commandline | ||
| ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ | ||
| RUN export JAVA_HOME | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,15 +20,15 @@ | |
| } | ||
| ], | ||
| "require": { | ||
| "php": ">=5.4.0", | ||
| "php": ">=7.0 || >=8.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you defined it as 7.0, then we cannot use nullable return types. I saw some commits using it. |
||
| "ext-soap": "*", | ||
| "ext-curl": "*", | ||
| "ass/xmlsecurity": "~1.0", | ||
| "symfony/framework-bundle": "~2.6 || ~3.4", | ||
| "symfony/twig-bundle": "~2.6 || ~3.4", | ||
| "zendframework/zend-mime": "2.*", | ||
| "zendframework/zend-serializer": "^2.9", | ||
| "zendframework/zend-servicemanager": "^3.3" | ||
| "symfony/framework-bundle": "^3.4 || ~5.4 || ~6.0", | ||
| "symfony/twig-bundle": "^3.4 || ~5.4 || ~6.0", | ||
| "laminas/laminas-servicemanager": "^3.4", | ||
| "jms/serializer": "^2.0 || ^3.0", | ||
| "laminas/laminas-mime": "^2.7" | ||
| }, | ||
| "replace": { | ||
| "besimple/soap-bundle": "self.version", | ||
|
|
@@ -39,8 +39,8 @@ | |
| }, | ||
| "require-dev": { | ||
| "mikey179/vfsstream": "~1.0", | ||
| "symfony/filesystem": "~2.3", | ||
| "symfony/process": "~2.3", | ||
| "symfony/filesystem": "^3.4 || ~5.4 || ~6.0", | ||
| "symfony/process": "^3.4 || ~5.4 || ~6.0", | ||
| "symfony/phpunit-bridge": "*" | ||
| }, | ||
| "autoload": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -238,7 +238,7 @@ protected function __doHttpRequest(SoapRequest $soapRequest) | |
| * | ||
| * @return string | ||
| */ | ||
| public function __doRequest($request, $location, $action, $version, $oneWay = 0) | ||
| public function __doRequest($request, $location, $action, $version, $oneWay = 0): ?string | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nullable return types will not working on PHP 7.0. |
||
| { | ||
| // wrap request data in SoapRequest object | ||
| $soapRequest = SoapRequest::create($request, $location, $action, $version); | ||
|
|
@@ -307,7 +307,7 @@ protected function filterRequestOptions(SoapRequest $soapRequest) | |
| * | ||
| * @return string | ||
| */ | ||
| public function __getLastRequestHeaders() | ||
| public function __getLastRequestHeaders(): ?string | ||
| { | ||
| return $this->lastRequestHeaders; | ||
| } | ||
|
|
@@ -327,7 +327,7 @@ public function __getRequestHeaders() | |
| * | ||
| * @return string | ||
| */ | ||
| public function __getLastRequest() | ||
| public function __getLastRequest(): ?string | ||
| { | ||
| return $this->lastRequest; | ||
| } | ||
|
|
@@ -347,7 +347,7 @@ public function __getLastRequestUri() | |
| * | ||
| * @return string | ||
| */ | ||
| public function __getLastResponseHeaders() | ||
| public function __getLastResponseHeaders(): ?string | ||
| { | ||
| return $this->lastResponseHeaders; | ||
| } | ||
|
|
@@ -357,7 +357,7 @@ public function __getLastResponseHeaders() | |
| * | ||
| * @return string | ||
| */ | ||
| public function __getLastResponse() | ||
| public function __getLastResponse(): ?string | ||
| { | ||
| return $this->lastResponse; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,11 +4,8 @@ | |
|
|
||
| class TestCase extends \PHPUnit\Framework\TestCase | ||
| { | ||
| // when using the SetUpTearDownTrait, methods like doSetup() can | ||
| // be defined with and without the 'void' return type, as you wish | ||
| use \Symfony\Bridge\PhpUnit\SetUpTearDownTrait; | ||
|
|
||
| protected function doSetUp() | ||
| protected function setUp(): void | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. void is not an acceptable return type on PHP 7.0. |
||
| { | ||
| $ch = curl_init('http://localhost:8080/'); | ||
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,18 +4,9 @@ | |
|
|
||
| class TestCase extends \PHPUnit\Framework\TestCase | ||
| { | ||
| // when using the SetUpTearDownTrait, methods like doSetup() can | ||
| // be defined with and without the 'void' return type, as you wish | ||
| use \Symfony\Bridge\PhpUnit\SetUpTearDownTrait; | ||
|
|
||
| protected function doSetUp() | ||
| protected function setUp(): void | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. void is not an acceptable return type on PHP 7.0 |
||
| { | ||
| if (version_compare(PHP_VERSION, '5.3.0', '=')) { | ||
| $this->markTestSkipped( | ||
| 'The PHP cli webserver is not available with PHP 5.3.' | ||
| ); | ||
| } | ||
|
|
||
| $ch = curl_init('http://localhost:8081/'); | ||
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); | ||
| curl_setopt($ch, CURLOPT_HEADER, true); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are defining the minimum version to PHP 8.0. I'd change it to 8.0-fpm.