Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6c7a80b
MINT-5942 - Update to PHP 8.1
Apr 6, 2022
588dc8c
MINT-5942 - Trigger Pipeline
Apr 6, 2022
8399d90
MINT-5942 - Fix filename & add java to image
Apr 11, 2022
8ed1570
Github-Actions - Add basic actions file
Apr 11, 2022
df67419
Github-Actions: Update on push
Apr 11, 2022
e032fa0
Github-Actions: Update on push
Apr 11, 2022
14c5358
Github-Actions: Add php version
Apr 11, 2022
6f14399
Github-Actions: Remove phpenv command
Apr 11, 2022
602033e
Github-Actions: RUn composer update with sudo
Apr 11, 2022
17ab0fe
Github-Actions: Run composer update with sudo
Apr 11, 2022
fd41e9f
Github-Actions: Change php versions
Apr 11, 2022
8457977
Github-Actions: Change php versions
Apr 11, 2022
acffbdb
Github-Actions: Check php version
Apr 11, 2022
8af33e8
Github-Actions: Check php version
Apr 11, 2022
5c294a1
Github-Actions: Remove SetUpTearDownTrait
Apr 12, 2022
3a1743a
Github-Actions: Remove SetUpTearDownTrait
Apr 12, 2022
78340d3
Merge branch 'Github-Actions' into MINT-5942
Apr 12, 2022
f586f83
MINT-5942: add github action. Update axis version
Apr 12, 2022
d23e1e4
MINT-5942: Test on php 8.1
Apr 12, 2022
4928b34
MINT-5942: Test on php 8.1
Apr 12, 2022
89c6303
MINT-5942: Test on php 8.1
Apr 12, 2022
2001a3a
MINT-5942: Test on php 8.1
Apr 12, 2022
a7a1e31
MINT-5942: Revert debugging code
Apr 13, 2022
fd48ddf
MINT-5942: Test on php 8.1, php 5.6, 7.0
May 4, 2022
e0c83bd
MINT-5942: Test on php 8.1, php 5.6, 7.0
May 4, 2022
e3bf920
MINT-5942: Test on php 8.1, php 5.6, 7.0
May 4, 2022
adbc3d5
MINT-5942: Test on php 8.1
May 4, 2022
2c5d507
MINT-5942: MOve down to SF5.4
May 4, 2022
1babb03
MINT-5942: Test SF5.4
May 4, 2022
0828249
MINT-5942: Test SF5.4 - 6
May 4, 2022
e338be0
MINT-5942: Test SF5.4
May 4, 2022
144f734
MINT-5942: Test php 5.6
May 4, 2022
4095f3b
MINT-5942: Test php 7.4/8
May 4, 2022
c057b41
MINT-5942: Split php7/8 jobs
May 4, 2022
91fd835
MINT-5942: Adding PHP 8 support in composer.json
May 4, 2022
e5eafe1
MINT-5942: Fix deprecations
May 5, 2022
1838301
MINT-5942: Small refactor
May 5, 2022
902f74b
MINT-5942: Revert for tests
May 5, 2022
965457a
MINT-5942: Test
May 5, 2022
61fe11a
MINT-5942: Fix phpunit deprecations
May 6, 2022
1f890f4
MINT-5942: Remove debugger code
May 6, 2022
49ed514
MINT-5942: Allow PHP >7
May 13, 2022
6958936
MINT-5942: Fix laminas dependency
May 13, 2022
8329d2e
MINT-5942: Fix laminas dependency
May 13, 2022
62bd19a
MINT-5942: Split SF 7 into separate jobs
May 13, 2022
f846615
MINT-5942: Update laminas/laminas-serializer
May 13, 2022
567ba61
MINT-5942: Switch to jms serializer
May 13, 2022
80a39c1
MINT-5942: Remove 7.0/7.1
May 13, 2022
fe48a09
MINT-5942: fix serializer
May 13, 2022
096c7bb
MINT-5942: fix serializer versioning
May 13, 2022
d53d24b
MINT-5942: fix pipeline tag
May 13, 2022
5f6f6fb
MINT-5942: fix serializer version
May 13, 2022
6a570ef
MINT-5942: fix serializer version
May 13, 2022
afd2802
MINT-5942: limit serializer version
May 13, 2022
903b692
MINT-5942: fix composer
May 13, 2022
66a4dcb
MINT-5942: allow jms serializer 1.10
May 13, 2022
085b414
MINT-5942: Change to php 8.0
May 16, 2022
f49a336
MINT-5942: Ensure php >=7.2
May 16, 2022
538a748
MINT-5942: Remove annotations package
May 16, 2022
f507dbf
MINT-5942: Tests symf 2.3
Jul 5, 2022
422e170
MINT-5942: Tests symf 2.3
Jul 5, 2022
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
93 changes: 93 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Workflow
on: [push]
jobs:
php_8_job:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.0']
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-syf_5_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: 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


php_7-syf_3_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.*
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
21 changes: 18 additions & 3 deletions Dockerfile
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.0.0-fpm

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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ QA = docker run -it --rm -v `pwd`:/project mykiwi/phaudit:7.2
## -------
##


kill:
$(DOCKER_COMPOSE) kill
$(DOCKER_COMPOSE) down --volumes --remove-orphans
Expand All @@ -25,6 +26,8 @@ composer-install: ## Execute composer instalation
$(COMPOSER) install --prefer-dist

test: composer-install ## Execute composer instalation
$(RUN) ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh
$(RUN) ./src/BeSimple/SoapClient/Tests/bin/axislocal.sh
$(RUN) bin/simple-phpunit

composer-update: ## Execute package update
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
}
],
"require": {
"php": ">=5.4.0",
"php": ">=7.2 || >=8.0",
"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": "^1.10 || ^2.0 || ^3.0",
"laminas/laminas-mime": "^2.7"
},
"replace": {
"besimple/soap-bundle": "self.version",
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: smartbox/besimplesoap
container_name: sbx_besimplesoap
environment:
SYMFONY_PHPUNIT_VERSION: '6.5'
SYMFONY_PHPUNIT_VERSION: '9.5'
COMPOSER_ALLOW_SUPERUSER: 1
working_dir: /var/www/html
volumes:
Expand Down
10 changes: 5 additions & 5 deletions src/BeSimple/SoapClient/SoapClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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);
Expand Down Expand Up @@ -307,7 +307,7 @@ protected function filterRequestOptions(SoapRequest $soapRequest)
*
* @return string
*/
public function __getLastRequestHeaders()
public function __getLastRequestHeaders(): ?string
{
return $this->lastRequestHeaders;
}
Expand All @@ -327,7 +327,7 @@ public function __getRequestHeaders()
*
* @return string
*/
public function __getLastRequest()
public function __getLastRequest(): ?string
{
return $this->lastRequest;
}
Expand All @@ -347,7 +347,7 @@ public function __getLastRequestUri()
*
* @return string
*/
public function __getLastResponseHeaders()
public function __getLastResponseHeaders(): ?string
{
return $this->lastResponseHeaders;
}
Expand All @@ -357,7 +357,7 @@ public function __getLastResponseHeaders()
*
* @return string
*/
public function __getLastResponse()
public function __getLastResponse(): ?string
{
return $this->lastResponse;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
abstract class AbstractWebServerTest 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;

/**
* @var ProcessBuilder
Expand All @@ -32,10 +29,6 @@ abstract class AbstractWebServerTest extends \PHPUnit\Framework\TestCase

public static function doSetUpBeforeClass()
{
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
self::markTestSkipped('PHP Webserver is available from PHP 5.4');
}

$phpFinder = new PhpExecutableFinder();
self::$webserver = ProcessBuilder::create(array(
'exec', // used exec binary (https://github.com/symfony/symfony/issues/5759)
Expand Down
5 changes: 1 addition & 4 deletions src/BeSimple/SoapClient/Tests/AxisInterop/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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);
Expand Down
11 changes: 6 additions & 5 deletions src/BeSimple/SoapClient/Tests/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Andreas Schamberger <mail@andreass.net>
*/
class CurlTest extends AbstractWebserverTest
class CurlTest extends AbstractWebServerTest
{
public function testExec()
{
Expand All @@ -37,13 +37,13 @@ public function testGetErrorMessage()
));

$curl->exec('http://unknown/curl.txt');
$this->assertRegExp('/^Could not connect to host.*$/', $curl->getErrorMessage());
$this->assertMatchesRegularExpression('/^Could not connect to host.*$/', $curl->getErrorMessage());

$curl->exec(sprintf('xyz://localhost:%d/@404.txt', WEBSERVER_PORT));
$this->assertRegExp('/^Unknown protocol. Only http and https are allowed.*$/', $curl->getErrorMessage());
$this->assertMatchesRegularExpression('/^Unknown protocol. Only http and https are allowed.*$/', $curl->getErrorMessage());

$curl->exec('');
$this->assertRegExp('/^Unable to parse URL.*$/', $curl->getErrorMessage());
$this->assertMatchesRegularExpression('/^Unable to parse URL.*$/', $curl->getErrorMessage());
}

public function testGetRequestHeaders()
Expand All @@ -65,7 +65,8 @@ public function testGetResponse()
'proxy_host' => false,
));

$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
$responseSuccess = $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
$this->assertTrue($responseSuccess);
$this->assertSame('OK', $curl->getResponseStatusMessage());
// Adjust for PHP >= 7.2 sending a Date header
$response = $curl->getResponse();
Expand Down
11 changes: 1 addition & 10 deletions src/BeSimple/SoapClient/Tests/ServerInterop/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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);
Expand Down
2 changes: 1 addition & 1 deletion src/BeSimple/SoapClient/Tests/SoapClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testSoapFaultWhenPassingInvalidWSDLs($wsdl)
}

$this->assertInstanceOf('SoapFault', $soapFault, 'Invalid type of exception');
$this->assertRegExp('/SOAP-ERROR: Parsing WSDL: .*/', $soapFault->getMessage(), 'Invalid or incorrect exception message');
$this->assertMatchesRegularExpression('/SOAP-ERROR: Parsing WSDL: .*/', $soapFault->getMessage(), 'Invalid or incorrect exception message');
$this->assertStringContainsString('WSDL', $soapFault->faultcode, 'Invalid type of faultcode');
}

Expand Down
13 changes: 5 additions & 8 deletions src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
* @author Andreas Schamberger <mail@andreass.net>
* @author Francis Besset <francis.bessset@gmail.com>
*/
class WsdlDownloaderTest extends AbstractWebserverTest
class WsdlDownloaderTest extends AbstractWebServerTest
{
// 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 static $filesystem;

Expand Down Expand Up @@ -57,7 +54,7 @@ public function testDownloadDownloadsToVfs($source, $regexp, $nbDownloads)

//Test that the Cache filename is valid
$regexp = '#'.sprintf($regexp, $cacheDirForRegExp).'#';
$this->assertRegExp($regexp, $cacheFileName);
$this->assertMatchesRegularExpression($regexp, $cacheFileName);

}

Expand Down Expand Up @@ -137,7 +134,7 @@ public function testResolveWsdlIncludes($source, $cacheFile, $remoteParentUrl, $
$m->invoke($wsdlDownloader, file_get_contents($source), $cacheFile, $remoteParentUrl);
$this->assertCount($nbDownloads, $wsdlCacheDir->getChildren());

$this->assertRegExp('#'.sprintf($regexp, $cacheDirForRegExp).'#', file_get_contents($cacheFile));
$this->assertMatchesRegularExpression('#'.sprintf($regexp, $cacheDirForRegExp).'#', file_get_contents($cacheFile));
}

public function provideResolveWsdlIncludes()
Expand Down Expand Up @@ -204,7 +201,7 @@ public function testResolveXsdIncludes($source, $cacheFile, $remoteParentUrl, $r
$m->invoke($wsdlDownloader, file_get_contents($source), $cacheFile, $remoteParentUrl);
$this->assertCount($nbDownloads, $wsdlCacheDir->getChildren());

$this->assertRegExp('#'.sprintf($regexp, $cacheDirForRegExp).'#', file_get_contents($cacheFile));
$this->assertMatchesRegularExpression('#'.sprintf($regexp, $cacheDirForRegExp).'#', file_get_contents($cacheFile));
}

public function provideResolveXsdIncludes()
Expand Down Expand Up @@ -330,7 +327,7 @@ public function testValidResponseCode()

$result = $wsdlDownloader->download('http://somefake.url/wsdl');

$this->assertRegExp('/.*wsdl_[a-f0-9]{32}\.cache/', $result);
$this->assertMatchesRegularExpression('/.*wsdl_[a-f0-9]{32}\.cache/', $result);
}

public static function doSetUpBeforeClass()
Expand Down
Loading