summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-05-31 17:09:50 +0200
committermsquare <msquare@notrademark.de>2019-06-03 21:36:58 +0200
commit236197faf82073e3b8afca49161898eb60cee76b (patch)
tree43746f677ef76ec638866077ceaaa5155f473c60
parent25bf0d8f873f80401f27cf0723548f5b1396de85 (diff)
Upgraded external components
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--composer.json25
-rw-r--r--src/Http/MessageTrait.php2
-rw-r--r--src/Http/Request.php1
-rw-r--r--tests/Unit/HelpersTest.php18
-rw-r--r--tests/Unit/Http/RequestTest.php3
6 files changed, 19 insertions, 32 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4a76f44..db26ce4c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -62,7 +62,7 @@ test:
- cp -R tests/ phpunit.xml "${DOCROOT}"
- HOMEDIR=$(pwd)
- cd "${DOCROOT}"
- - composer --no-ansi install --dev
+ - composer --no-ansi install
- ./bin/migrate
script:
- vendor/bin/phpunit -v --colors=never --coverage-text --coverage-html "${HOMEDIR}/coverage/" --log-junit "${HOMEDIR}/unittests.xml"
diff --git a/composer.json b/composer.json
index dcfa3e82..3e50226a 100644
--- a/composer.json
+++ b/composer.json
@@ -22,27 +22,28 @@
"ext-PDO": "*",
"ext-SimpleXML": "*",
"ext-xml": "*",
- "doctrine/dbal": "^2.8",
- "erusev/parsedown": "^1.6",
- "illuminate/container": "5.5.*",
- "illuminate/database": "5.5.*",
- "illuminate/support": "5.5.*",
+ "doctrine/dbal": "^2.9",
+ "erusev/parsedown": "^1.7",
+ "illuminate/container": "5.8.*",
+ "illuminate/database": "5.8.*",
+ "illuminate/support": "5.8.*",
"nikic/fast-route": "^1.3",
"nyholm/psr7": "^1.1",
"psr/container": "^1.0",
"psr/http-server-middleware": "^1.0",
- "psr/log": "^1.0",
- "swiftmailer/swiftmailer": "^6.1",
- "symfony/http-foundation": "^3.3",
- "symfony/psr-http-message-bridge": "^1.0",
+ "psr/log": "^1.1",
+ "swiftmailer/swiftmailer": "^6.2",
+ "symfony/http-foundation": "^4.3",
+ "symfony/psr-http-message-bridge": "^1.2",
"twig/extensions": "^1.5",
- "twig/twig": "~2.6.0"
+ "twig/twig": "~2.6.0",
+ "vlucas/phpdotenv": "^3.3"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.1.0",
- "filp/whoops": "^2.1",
+ "filp/whoops": "^2.3",
"phpunit/phpunit": "^8.1",
- "symfony/var-dumper": "^3.3"
+ "symfony/var-dumper": "^4.3"
},
"autoload": {
"psr-4": {
diff --git a/src/Http/MessageTrait.php b/src/Http/MessageTrait.php
index 0b12ce61..93c7cd50 100644
--- a/src/Http/MessageTrait.php
+++ b/src/Http/MessageTrait.php
@@ -18,7 +18,7 @@ trait MessageTrait
*
* @return string HTTP protocol version.
*/
- public function getProtocolVersion()
+ public function getProtocolVersion(): string
{
return parent::getProtocolVersion();
}
diff --git a/src/Http/Request.php b/src/Http/Request.php
index 0e1acf76..0621d488 100644
--- a/src/Http/Request.php
+++ b/src/Http/Request.php
@@ -370,7 +370,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
$filename,
$file->getClientFilename(),
$file->getClientMediaType(),
- $file->getSize(),
$file->getError()
);
}
diff --git a/tests/Unit/HelpersTest.php b/tests/Unit/HelpersTest.php
index 6d182907..ad677cb3 100644
--- a/tests/Unit/HelpersTest.php
+++ b/tests/Unit/HelpersTest.php
@@ -55,7 +55,7 @@ class HelpersTest extends TestCase
}
/**
- * @covers \base_path()
+ * @covers \base_path
*/
public function testBasePath()
{
@@ -99,7 +99,7 @@ class HelpersTest extends TestCase
}
/**
- * @covers \config_path()
+ * @covers \config_path
*/
public function testConfigPath()
{
@@ -118,20 +118,6 @@ class HelpersTest extends TestCase
}
/**
- * @covers \env
- */
- public function testEnv()
- {
- putenv('envTestVar=someContent');
-
- $env = env('envTestVar');
- $this->assertEquals('someContent', $env);
-
- $env = env('someRandomEnvVarThatShouldNeverExist', 'someDefaultValue');
- $this->assertEquals('someDefaultValue', $env);
- }
-
- /**
* @covers \request
*/
public function testRequest()
diff --git a/tests/Unit/Http/RequestTest.php b/tests/Unit/Http/RequestTest.php
index 4d942311..3f52709d 100644
--- a/tests/Unit/Http/RequestTest.php
+++ b/tests/Unit/Http/RequestTest.php
@@ -286,7 +286,7 @@ class RequestTest extends TestCase
{
$filename = tempnam(sys_get_temp_dir(), 'test');
file_put_contents($filename, 'LoremIpsum!');
- $files = [new SymfonyFile($filename, 'foo.txt', 'text/plain', 11)];
+ $files = [new SymfonyFile($filename, 'foo.txt', 'text/plain', UPLOAD_ERR_PARTIAL)];
$request = new Request([], [], [], [], $files);
$uploadedFiles = $request->getUploadedFiles();
@@ -298,6 +298,7 @@ class RequestTest extends TestCase
$this->assertEquals('foo.txt', $file->getClientFilename());
$this->assertEquals('text/plain', $file->getClientMediaType());
$this->assertEquals(11, $file->getSize());
+ $this->assertEquals(UPLOAD_ERR_PARTIAL, $file->getError());
}
/**