summaryrefslogtreecommitdiff
path: root/server/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'server/vendor')
-rw-r--r--server/vendor/composer/autoload_psr4.php2
-rw-r--r--server/vendor/composer/installed.json268
-rw-r--r--server/vendor/guzzlehttp/psr7/CHANGELOG.md7
-rw-r--r--server/vendor/guzzlehttp/psr7/Makefile16
-rw-r--r--server/vendor/guzzlehttp/psr7/README.md5
-rw-r--r--server/vendor/guzzlehttp/psr7/src/MultipartStream.php4
-rw-r--r--server/vendor/guzzlehttp/psr7/src/Response.php1
-rw-r--r--server/vendor/guzzlehttp/psr7/src/Uri.php17
-rw-r--r--server/vendor/guzzlehttp/psr7/src/functions.php8
-rw-r--r--server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php10
-rw-r--r--server/vendor/guzzlehttp/psr7/tests/UriTest.php34
-rw-r--r--server/vendor/justinrainbow/json-schema/composer.json4
-rw-r--r--server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php63
-rw-r--r--server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php8
m---------server/vendor/php-opencloud/openstack0
15 files changed, 276 insertions, 171 deletions
diff --git a/server/vendor/composer/autoload_psr4.php b/server/vendor/composer/autoload_psr4.php
index 0ba35e5..6c2e482 100644
--- a/server/vendor/composer/autoload_psr4.php
+++ b/server/vendor/composer/autoload_psr4.php
@@ -7,6 +7,8 @@ $baseDir = dirname($vendorDir);
return array(
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
+ 'OpenStack\\Test\\' => array($vendorDir . '/php-opencloud/openstack/tests/unit'),
+ 'OpenStack\\Integration\\' => array($vendorDir . '/php-opencloud/openstack/tests/integration'),
'OpenStack\\' => array($vendorDir . '/php-opencloud/openstack/src'),
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
diff --git a/server/vendor/composer/installed.json b/server/vendor/composer/installed.json
index 8e3f2ec..1dfb8d2 100644
--- a/server/vendor/composer/installed.json
+++ b/server/vendor/composer/installed.json
@@ -1,73 +1,5 @@
[
{
- "name": "justinrainbow/json-schema",
- "version": "v1.6.0",
- "version_normalized": "1.6.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.2"
- },
- "require-dev": {
- "json-schema/json-schema-test-suite": "1.1.0",
- "phpdocumentor/phpdocumentor": "~2",
- "phpunit/phpunit": "~3.7"
- },
- "time": "2016-01-06 14:37:04",
- "bin": [
- "bin/validate-json"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "JsonSchema\\": "src/JsonSchema/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Bruno Prieto Reis",
- "email": "bruno.p.reis@gmail.com"
- },
- {
- "name": "Justin Rainbow",
- "email": "justin.rainbow@gmail.com"
- },
- {
- "name": "Igor Wiedler",
- "email": "igor@wiedler.ch"
- },
- {
- "name": "Robert Schönthal",
- "email": "seroscho@googlemail.com"
- }
- ],
- "description": "A library to validate a json schema.",
- "homepage": "https://github.com/justinrainbow/json-schema",
- "keywords": [
- "json",
- "schema"
- ]
- },
- {
"name": "guzzlehttp/promises",
"version": "1.0.3",
"version_normalized": "1.0.3.0",
@@ -172,66 +104,6 @@
]
},
{
- "name": "guzzlehttp/psr7",
- "version": "1.2.1",
- "version_normalized": "1.2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/4d0bdbe1206df7440219ce14c972aa57cc5e4982",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
- },
- "provide": {
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "time": "2015-11-03 01:34:55",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- }
- ],
- "description": "PSR-7 message implementation",
- "keywords": [
- "http",
- "message",
- "stream",
- "uri"
- ]
- },
- {
"name": "guzzlehttp/guzzle",
"version": "6.1.1",
"version_normalized": "6.1.1.0",
@@ -302,12 +174,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-opencloud/openstack.git",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd"
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/8a6ec703597f0440e558d8f1f21b2ff303117dbd",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd",
+ "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/15aca73f423166c7ef8337ba08615c103c66e931",
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931",
"shasum": ""
},
"require": {
@@ -324,12 +196,14 @@
"sami/sami": "dev-master",
"satooshi/php-coveralls": "~1.0"
},
- "time": "2016-01-20 12:27:59",
+ "time": "2016-01-25 10:35:10",
"type": "library",
"installation-source": "source",
"autoload": {
"psr-4": {
- "OpenStack\\": "src/"
+ "OpenStack\\": "src/",
+ "OpenStack\\Test\\": "tests/unit/",
+ "OpenStack\\Integration\\": "tests/integration/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -340,5 +214,133 @@
"homepage": "https://github.com/jamiehannaford"
}
]
+ },
+ {
+ "name": "justinrainbow/json-schema",
+ "version": "1.6.1",
+ "version_normalized": "1.6.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/justinrainbow/json-schema.git",
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341",
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.29"
+ },
+ "require-dev": {
+ "json-schema/json-schema-test-suite": "1.1.0",
+ "phpdocumentor/phpdocumentor": "~2",
+ "phpunit/phpunit": "~3.7"
+ },
+ "time": "2016-01-25 15:43:01",
+ "bin": [
+ "bin/validate-json"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "JsonSchema\\": "src/JsonSchema/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Bruno Prieto Reis",
+ "email": "bruno.p.reis@gmail.com"
+ },
+ {
+ "name": "Justin Rainbow",
+ "email": "justin.rainbow@gmail.com"
+ },
+ {
+ "name": "Igor Wiedler",
+ "email": "igor@wiedler.ch"
+ },
+ {
+ "name": "Robert Schönthal",
+ "email": "seroscho@googlemail.com"
+ }
+ ],
+ "description": "A library to validate a json schema.",
+ "homepage": "https://github.com/justinrainbow/json-schema",
+ "keywords": [
+ "json",
+ "schema"
+ ]
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.2.2",
+ "version_normalized": "1.2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "time": "2016-01-23 01:23:02",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "PSR-7 message implementation",
+ "keywords": [
+ "http",
+ "message",
+ "stream",
+ "uri"
+ ]
}
]
diff --git a/server/vendor/guzzlehttp/psr7/CHANGELOG.md b/server/vendor/guzzlehttp/psr7/CHANGELOG.md
index 6cdfb39..d875aa3 100644
--- a/server/vendor/guzzlehttp/psr7/CHANGELOG.md
+++ b/server/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -1,5 +1,12 @@
# CHANGELOG
+## 1.2.2 - 2016-01-22
+
+* Added support for URIs without any authority.
+* Added support for HTTP 451 'Unavailable For Legal Reasons.'
+* Added support for using '0' as a filename.
+* Added support for including non-standard ports in Host headers.
+
## 1.2.1 - 2015-11-02
* Now supporting negative offsets when seeking to SEEK_END.
diff --git a/server/vendor/guzzlehttp/psr7/Makefile b/server/vendor/guzzlehttp/psr7/Makefile
index 9c21096..8b00b43 100644
--- a/server/vendor/guzzlehttp/psr7/Makefile
+++ b/server/vendor/guzzlehttp/psr7/Makefile
@@ -9,5 +9,21 @@ coverage:
view-coverage:
open artifacts/coverage/index.html
+check-tag:
+ $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
+
+tag: check-tag
+ @echo Tagging $(TAG)
+ chag update $(TAG)
+ git commit -a -m '$(TAG) release'
+ chag tag
+ @echo "Release has been created. Push using 'make release'"
+ @echo "Changes made in the release commit"
+ git diff HEAD~1 HEAD
+
+release: check-tag
+ git push origin master
+ git push origin $(TAG)
+
clean:
rm -rf artifacts/*
diff --git a/server/vendor/guzzlehttp/psr7/README.md b/server/vendor/guzzlehttp/psr7/README.md
index 0b30d5a..0a4c341 100644
--- a/server/vendor/guzzlehttp/psr7/README.md
+++ b/server/vendor/guzzlehttp/psr7/README.md
@@ -6,6 +6,9 @@ functionality like query string parsing. Currently missing
ServerRequestInterface and UploadedFileInterface; a pull request for these features is welcome.
+[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
+
+
# Stream implementation
This package comes with a number of stream implementations and stream
@@ -25,7 +28,7 @@ $a = Psr7\stream_for('abc, ');
$b = Psr7\stream_for('123.');
$composed = new Psr7\AppendStream([$a, $b]);
-$composed->addStream(Psr7\stream_for(' Above all listen to me').
+$composed->addStream(Psr7\stream_for(' Above all listen to me'));
echo $composed(); // abc, 123. Above all listen to me.
```
diff --git a/server/vendor/guzzlehttp/psr7/src/MultipartStream.php b/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
index fd006ec..2988fcb 100644
--- a/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
+++ b/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -113,7 +113,7 @@ class MultipartStream implements StreamInterface
// Set a default content-disposition header if one was no provided
$disposition = $this->getHeader($headers, 'content-disposition');
if (!$disposition) {
- $headers['Content-Disposition'] = $filename
+ $headers['Content-Disposition'] = ($filename === '0' || $filename)
? sprintf('form-data; name="%s"; filename="%s"',
$name,
basename($filename))
@@ -130,7 +130,7 @@ class MultipartStream implements StreamInterface
// Set a default Content-Type if one was not supplied
$type = $this->getHeader($headers, 'content-type');
- if (!$type && $filename) {
+ if (!$type && ($filename === '0' || $filename)) {
if ($type = mimetype_from_filename($filename)) {
$headers['Content-Type'] = $type;
}
diff --git a/server/vendor/guzzlehttp/psr7/src/Response.php b/server/vendor/guzzlehttp/psr7/src/Response.php
index c94bf8f..58c4c6a 100644
--- a/server/vendor/guzzlehttp/psr7/src/Response.php
+++ b/server/vendor/guzzlehttp/psr7/src/Response.php
@@ -59,6 +59,7 @@ class Response implements ResponseInterface
428 => 'Precondition Required',
429 => 'Too Many Requests',
431 => 'Request Header Fields Too Large',
+ 451 => 'Unavailable For Legal Reasons',
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
diff --git a/server/vendor/guzzlehttp/psr7/src/Uri.php b/server/vendor/guzzlehttp/psr7/src/Uri.php
index d428f2e..23fa2a4 100644
--- a/server/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/server/vendor/guzzlehttp/psr7/src/Uri.php
@@ -477,21 +477,28 @@ class Uri implements UriInterface
$uri = '';
if (!empty($scheme)) {
- $uri .= $scheme . '://';
+ $uri .= $scheme . ':';
}
+ $hierPart = '';
+
if (!empty($authority)) {
- $uri .= $authority;
+ if (!empty($scheme)) {
+ $hierPart .= '//';
+ }
+ $hierPart .= $authority;
}
if ($path != null) {
// Add a leading slash if necessary.
- if ($uri && substr($path, 0, 1) !== '/') {
- $uri .= '/';
+ if ($hierPart && substr($path, 0, 1) !== '/') {
+ $hierPart .= '/';
}
- $uri .= $path;
+ $hierPart .= $path;
}
+ $uri .= $hierPart;
+
if ($query != null) {
$uri .= '?' . $query;
}
diff --git a/server/vendor/guzzlehttp/psr7/src/functions.php b/server/vendor/guzzlehttp/psr7/src/functions.php
index fd3e7f5..921a5a8 100644
--- a/server/vendor/guzzlehttp/psr7/src/functions.php
+++ b/server/vendor/guzzlehttp/psr7/src/functions.php
@@ -209,6 +209,14 @@ function modify_request(RequestInterface $request, array $changes)
// Remove the host header if one is on the URI
if ($host = $changes['uri']->getHost()) {
$changes['set_headers']['Host'] = $host;
+
+ if ($port = $changes['uri']->getPort()) {
+ $standardPorts = ['http' => 80, 'https' => 443];
+ $scheme = $changes['uri']->getScheme();
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
+ $changes['set_headers']['Host'] .= ':'.$port;
+ }
+ }
}
$uri = $changes['uri'];
}
diff --git a/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php b/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
index de5b5cb..65cb954 100644
--- a/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
+++ b/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
@@ -546,6 +546,16 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('www.foo.com', (string) $r2->getHeaderLine('host'));
}
+ public function testCanModifyRequestWithUriAndPort()
+ {
+ $r1 = new Psr7\Request('GET', 'http://foo.com:8000');
+ $r2 = Psr7\modify_request($r1, [
+ 'uri' => new Psr7\Uri('http://www.foo.com:8000')
+ ]);
+ $this->assertEquals('http://www.foo.com:8000', (string) $r2->getUri());
+ $this->assertEquals('www.foo.com:8000', (string) $r2->getHeaderLine('host'));
+ }
+
public function testCanModifyRequestWithCaseInsensitiveHeader()
{
$r1 = new Psr7\Request('GET', 'http://foo.com', ['User-Agent' => 'foo']);
diff --git a/server/vendor/guzzlehttp/psr7/tests/UriTest.php b/server/vendor/guzzlehttp/psr7/tests/UriTest.php
index 2776920..a63293c 100644
--- a/server/vendor/guzzlehttp/psr7/tests/UriTest.php
+++ b/server/vendor/guzzlehttp/psr7/tests/UriTest.php
@@ -244,4 +244,38 @@ class UriTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('foo', $uri->getPath());
$this->assertEquals('bar.com/foo', (string) $uri);
}
+
+ /**
+ * @dataProvider pathTestNoAuthority
+ */
+ public function testNoAuthority($input)
+ {
+ $uri = new Uri($input);
+
+ $this->assertEquals($input, (string) $uri);
+ }
+
+ public function pathTestNoAuthority()
+ {
+ return [
+ // path-rootless
+ ['urn:example:animal:ferret:nose'],
+ // path-absolute
+ ['urn:/example:animal:ferret:nose'],
+ ['urn:/'],
+ // path-empty
+ ['urn:'],
+ ['urn'],
+ ];
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage Unable to parse URI
+ */
+ public function testNoAuthorityWithInvalidPath()
+ {
+ $input = 'urn://example:animal:ferret:nose';
+ $uri = new Uri($input);
+ }
}
diff --git a/server/vendor/justinrainbow/json-schema/composer.json b/server/vendor/justinrainbow/json-schema/composer.json
index c45891a..68b3933 100644
--- a/server/vendor/justinrainbow/json-schema/composer.json
+++ b/server/vendor/justinrainbow/json-schema/composer.json
@@ -36,7 +36,7 @@
}
}],
"require": {
- "php": ">=5.3.2"
+ "php": ">=5.3.29"
},
"require-dev": {
"json-schema/JSON-Schema-Test-Suite": "1.1.0",
@@ -52,7 +52,7 @@
"bin": ["bin/validate-json"],
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.6.x-dev"
}
}
}
diff --git a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
index a4570f6..8cd25c1 100644
--- a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
+++ b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
@@ -19,11 +19,28 @@ use JsonSchema\Validator;
class Factory
{
/**
- * @var UriRetriever
+ * @var UriRetriever $uriRetriever
*/
protected $uriRetriever;
/**
+ * @var array $constraintMap
+ */
+ protected $constraintMap = array(
+ 'array' => 'JsonSchema\Constraints\CollectionConstraint',
+ 'collection' => 'JsonSchema\Constraints\CollectionConstraint',
+ 'object' => 'JsonSchema\Constraints\ObjectConstraint',
+ 'type' => 'JsonSchema\Constraints\TypeConstraint',
+ 'undefined' => 'JsonSchema\Constraints\UndefinedConstraint',
+ 'string' => 'JsonSchema\Constraints\StringConstraint',
+ 'number' => 'JsonSchema\Constraints\NumberConstraint',
+ 'enum' => 'JsonSchema\Constraints\EnumConstraint',
+ 'format' => 'JsonSchema\Constraints\FormatConstraint',
+ 'schema' => 'JsonSchema\Constraints\SchemaConstraint',
+ 'validator' => 'JsonSchema\Validator',
+ );
+
+ /**
* @param UriRetriever $uriRetriever
*/
public function __construct(UriRetriever $uriRetriever = null)
@@ -44,6 +61,25 @@ class Factory
}
/**
+ * @param string $name
+ * @param string $class
+ * @return Factory
+ */
+ public function setConstraintClass($name, $class)
+ {
+ // Ensure class exists
+ if (!class_exists($class)) {
+ throw new InvalidArgumentException('Unknown constraint ' . $name);
+ }
+ // Ensure class is appropriate
+ if (!in_array('JsonSchema\Constraints\ConstraintInterface', class_implements($class))) {
+ throw new InvalidArgumentException('Invalid class ' . $name);
+ }
+ $this->constraintMap[$name] = $class;
+ return $this;
+ }
+
+ /**
* Create a constraint instance for the given constraint name.
*
* @param string $constraintName
@@ -52,30 +88,9 @@ class Factory
*/
public function createInstanceFor($constraintName)
{
- switch ($constraintName) {
- case 'array':
- case 'collection':
- return new CollectionConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'object':
- return new ObjectConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'type':
- return new TypeConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'undefined':
- return new UndefinedConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'string':
- return new StringConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'number':
- return new NumberConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'enum':
- return new EnumConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'format':
- return new FormatConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'schema':
- return new SchemaConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'validator':
- return new Validator(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
+ if (array_key_exists($constraintName, $this->constraintMap)) {
+ return new $this->constraintMap[$constraintName](Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
}
-
throw new InvalidArgumentException('Unknown constraint ' . $constraintName);
}
}
diff --git a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
index 0a34bdc..c5aaf6a 100644
--- a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
+++ b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
@@ -25,8 +25,8 @@ class NumberConstraint extends Constraint
// Verify minimum
if (isset($schema->exclusiveMinimum)) {
if (isset($schema->minimum)) {
- if ($schema->exclusiveMinimum && $element === $schema->minimum) {
- $this->addError($path, "Must have a minimum value greater than boundary value of " . $schema->minimum, 'exclusiveMinimum', array('minimum' => $schema->minimum,));
+ if ($schema->exclusiveMinimum && $element <= $schema->minimum) {
+ $this->addError($path, "Must have a minimum value of " . $schema->minimum, 'exclusiveMinimum', array('minimum' => $schema->minimum,));
} else if ($element < $schema->minimum) {
$this->addError($path, "Must have a minimum value of " . $schema->minimum, 'minimum', array('minimum' => $schema->minimum,));
}
@@ -40,8 +40,8 @@ class NumberConstraint extends Constraint
// Verify maximum
if (isset($schema->exclusiveMaximum)) {
if (isset($schema->maximum)) {
- if ($schema->exclusiveMaximum && $element === $schema->maximum) {
- $this->addError($path, "Must have a maximum value less than boundary value of " . $schema->maximum, 'exclusiveMaximum', array('maximum' => $schema->maximum,));
+ if ($schema->exclusiveMaximum && $element >= $schema->maximum) {
+ $this->addError($path, "Must have a maximum value of " . $schema->maximum, 'exclusiveMaximum', array('maximum' => $schema->maximum,));
} else if ($element > $schema->maximum) {
$this->addError($path, "Must have a maximum value of " . $schema->maximum, 'maximum', array('maximum' => $schema->maximum,));
}
diff --git a/server/vendor/php-opencloud/openstack b/server/vendor/php-opencloud/openstack
-Subproject 8a6ec703597f0440e558d8f1f21b2ff303117db
+Subproject 15aca73f423166c7ef8337ba08615c103c66e93