diff --git a/README.md b/README.md
index 40fe139..b9d058e 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,9 @@
# Xi Netvisor
-Netvisor API interface for PHP 5.3+.
+Netvisor API interface for PHP 7.1+.
[](https://travis-ci.org/xi-project/xi-netvisor)
-## Interfaces
-
-- None yet
-
## Before you start hacking away
You must do the following things to get everything up and running:
@@ -44,15 +40,48 @@ $config = new Xi\Netvisor\Config(...); // Use the parameters described a
$netvisor = new Xi\Netvisor\Netvisor($config);
```
-### Constructing XML
+### Actions
-You can instantiate a certain type of a _Resource_ (e.g. `Xi\Netvisor\Resource\Xml\SalesInvoice`).
-All _Resources_ should extend `Xi\Netvisor\Resource\Xml\Root` and implement `getDtdPath()` to return a file path
-which points to a correct DTD file (used for validation).
+#### Search customers
+```php
+$customers = $netvisor->getCustomers(
+ '1234567-1' // Optional keyword
+);
+```
+
+#### Get customers changed since datetime
+```php
+$customers = $netvisor->getCustomersChangedSince(
+ new DateTime(...) // Required
+);
+```
+
+#### Get product
+```php
+$product = $netvisor->getProduct(
+ 123 // Required Netvisor identifier
+);
+```
+
+#### Send customer
+```php
+$customer = new Xi\Netvisor\Resource\Xml\Customer(
+ new Xi\Netvisor\Resource\Xml\CustomerBaseInformation(
+ '1234567-1',
+ 'Test Oy',
+ 'Test street 1',
+ 'Helsinki',
+ '00240',
+ 'FI'
+ )
+);
+
+$response = new \SimpleXMLElement($this->netvisor->sendCustomer($customer));
+$netvisorIdentifier = (string)$response->Replies->InsertedDataIdentifier;
+```
-Resource's mandatory parameters are given in the constructor. Optional values can be set via setters.
-#### SalesInvoice
+#### Send invoice
```php
$invoice = new Xi\Netvisor\Resource\Xml\SalesInvoice(...);
@@ -61,5 +90,5 @@ $invoiceProductLine = new Xi\Netvisor\Resource\Xml\SalesInvoiceProductLine(...);
$invoice->addSalesInvoiceProductLine($invoiceProductLine);
-$netvisor->addSalesInvoice($invoice);
+$netvisor->sendInvoice($invoice);
```
diff --git a/composer.json b/composer.json
index 77f993d..4715645 100644
--- a/composer.json
+++ b/composer.json
@@ -19,13 +19,13 @@
],
"require": {
- "php": "^5.6 || ^7.0",
- "jms/serializer": "^1.4",
- "guzzlehttp/guzzle": "^6.2"
+ "php": "^7.1",
+ "jms/serializer": "^1.14",
+ "guzzlehttp/guzzle": "^6.4"
},
"require-dev": {
- "phpunit/phpunit": "^5.7"
+ "phpunit/phpunit": "^7.5"
},
"autoload": {
diff --git a/composer.lock b/composer.lock
index 8b2eb2b..026a1c3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,35 +4,34 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "36b7c793a96ac0c2fefd9be0fd61697e",
- "content-hash": "8890ff7472faa1a3d9a53fcbde7712af",
+ "content-hash": "ec845aea943c280563e52a4e0bdbc626",
"packages": [
{
"name": "doctrine/annotations",
- "version": "v1.3.0",
+ "version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5"
+ "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5",
- "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc",
+ "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
- "php": "^5.6 || ^7.0"
+ "php": "^7.1"
},
"require-dev": {
"doctrine/cache": "1.*",
- "phpunit/phpunit": "^5.6.1"
+ "phpunit/phpunit": "^7.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -45,6 +44,10 @@
"MIT"
],
"authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
@@ -53,10 +56,6 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
@@ -73,36 +72,38 @@
"docblock",
"parser"
],
- "time": "2016-10-24 11:45:47"
+ "time": "2019-10-01T18:55:10+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.0.5",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a",
"shasum": ""
},
"require": {
- "php": ">=5.3,<8.0-DEV"
+ "php": "^7.1"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
+ "doctrine/coding-standard": "^6.0",
"ext-pdo": "*",
"ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "phpbench/phpbench": "^0.13",
+ "phpstan/phpstan-phpunit": "^0.11",
+ "phpstan/phpstan-shim": "^0.11",
+ "phpunit/phpunit": "^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -122,39 +123,44 @@
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
- "time": "2015-06-14 21:17:01"
+ "time": "2019-03-17T17:37:11+00:00"
},
{
"name": "doctrine/lexer",
- "version": "v1.0.1",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
+ "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea",
+ "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": "^7.2"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^6.0",
+ "phpstan/phpstan": "^0.11.8",
+ "phpunit/phpunit": "^8.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Lexer\\": "lib/"
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -162,64 +168,71 @@
"MIT"
],
"authors": [
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
- "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
- "homepage": "http://www.doctrine-project.org",
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
"keywords": [
+ "annotations",
+ "docblock",
"lexer",
- "parser"
+ "parser",
+ "php"
],
- "time": "2014-09-09 13:34:57"
+ "time": "2019-07-30T19:33:28+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.2.2",
+ "version": "6.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
"shasum": ""
},
"require": {
+ "ext-json": "*",
"guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.3.1",
+ "guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
- "phpunit/phpunit": "^4.0",
- "psr/log": "^1.0"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2-dev"
+ "dev-master": "6.3-dev"
}
},
"autoload": {
- "files": [
- "src/functions_include.php"
- ],
"psr-4": {
"GuzzleHttp\\": "src/"
- }
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -243,7 +256,7 @@
"rest",
"web service"
],
- "time": "2016-10-08 15:01:37"
+ "time": "2019-10-23T15:58:00+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -294,36 +307,41 @@
"keywords": [
"promise"
],
- "time": "2016-12-20 10:07:11"
+ "time": "2016-12-20T10:07:11+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "1.3.1",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
- "psr/http-message": "~1.0"
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "ext-zlib": "*",
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+ },
+ "suggest": {
+ "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -343,29 +361,37 @@
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
}
],
- "description": "PSR-7 message implementation",
+ "description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
+ "psr-7",
+ "request",
+ "response",
"stream",
- "uri"
+ "uri",
+ "url"
],
- "time": "2016-06-24 23:00:38"
+ "time": "2019-07-01T23:21:34+00:00"
},
{
"name": "jms/metadata",
- "version": "1.6.0",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/metadata.git",
- "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab"
+ "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab",
- "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab",
+ "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/e5854ab1aa643623dc64adde718a8eec32b957a8",
+ "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8",
"shasum": ""
},
"require": {
@@ -388,9 +414,13 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache-2.0"
+ "MIT"
],
"authors": [
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ },
{
"name": "Johannes M. Schmitt",
"email": "schmittjoh@gmail.com"
@@ -403,7 +433,7 @@
"xml",
"yaml"
],
- "time": "2016-12-05 10:18:33"
+ "time": "2018-10-26T12:40:10+00:00"
},
{
"name": "jms/parser-lib",
@@ -438,28 +468,28 @@
"Apache2"
],
"description": "A library for easily creating recursive-descent parsers.",
- "time": "2012-11-18 18:08:43"
+ "time": "2012-11-18T18:08:43+00:00"
},
{
"name": "jms/serializer",
- "version": "1.4.2",
+ "version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/serializer.git",
- "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b"
+ "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
- "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
+ "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ee96d57024af9a7716d56fcbe3aa94b3d030f3ca",
+ "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca",
"shasum": ""
},
"require": {
"doctrine/annotations": "^1.0",
"doctrine/instantiator": "^1.0.3",
- "jms/metadata": "~1.1",
+ "jms/metadata": "^1.3",
"jms/parser-lib": "1.*",
- "php": ">=5.5.0",
+ "php": "^5.5|^7.0",
"phpcollection/phpcollection": "~0.1",
"phpoption/phpoption": "^1.1"
},
@@ -473,20 +503,25 @@
"jackalope/jackalope-doctrine-dbal": "^1.1.5",
"phpunit/phpunit": "^4.8|^5.0",
"propel/propel1": "~1.7",
+ "psr/container": "^1.0",
+ "symfony/dependency-injection": "^2.7|^3.3|^4.0",
+ "symfony/expression-language": "^2.6|^3.0",
"symfony/filesystem": "^2.1",
- "symfony/form": "~2.1",
- "symfony/translation": "^2.1",
- "symfony/validator": "^2.2",
- "symfony/yaml": "^2.1",
+ "symfony/form": "~2.1|^3.0",
+ "symfony/translation": "^2.1|^3.0",
+ "symfony/validator": "^2.2|^3.0",
+ "symfony/yaml": "^2.1|^3.0",
"twig/twig": "~1.12|~2.0"
},
"suggest": {
+ "doctrine/cache": "Required if you like to use cache functionality.",
+ "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.",
"symfony/yaml": "Required if you'd like to serialize data to YAML format."
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-1.x": "1.14-dev"
}
},
"autoload": {
@@ -496,9 +531,13 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache2"
+ "MIT"
],
"authors": [
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ },
{
"name": "Johannes M. Schmitt",
"email": "schmittjoh@gmail.com"
@@ -513,7 +552,7 @@
"serialization",
"xml"
],
- "time": "2016-11-13 10:20:11"
+ "time": "2019-04-17T08:12:16+00:00"
},
{
"name": "phpcollection/phpcollection",
@@ -561,7 +600,7 @@
"sequence",
"set"
],
- "time": "2015-05-17 12:39:23"
+ "time": "2015-05-17T12:39:23+00:00"
},
{
"name": "phpoption/phpoption",
@@ -611,7 +650,7 @@
"php",
"type"
],
- "time": "2015-07-25 16:39:46"
+ "time": "2015-07-25T16:39:46+00:00"
},
{
"name": "psr/http-message",
@@ -661,43 +700,89 @@
"request",
"response"
],
- "time": "2016-08-06 14:39:51"
+ "time": "2016-08-06T14:39:51+00:00"
+ },
+ {
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ralouphie/getallheaders.git",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5 || ^6.5"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/getallheaders.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
+ ],
+ "description": "A polyfill for getallheaders.",
+ "time": "2019-03-08T08:55:37+00:00"
}
],
"packages-dev": [
{
"name": "myclabs/deep-copy",
- "version": "1.5.5",
+ "version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108"
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108",
- "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": "^7.1"
+ },
+ "replace": {
+ "myclabs/deep-copy": "self.version"
},
"require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
+ "doctrine/collections": "^1.0",
+ "doctrine/common": "^2.6",
+ "phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
- }
+ },
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@@ -705,39 +790,139 @@
"object",
"object graph"
],
- "time": "2016-10-31 17:19:45"
+ "time": "2019-08-09T12:45:53+00:00"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "1.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+ "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "phar-io/version": "^2.0",
+ "php": "^5.6 || ^7.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "time": "2018-07-08T19:23:20+00:00"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+ "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints",
+ "time": "2018-07-08T19:19:57+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+ "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
+ "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
"shasum": ""
},
"require": {
- "php": ">=5.5"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^4.6"
+ "phpunit/phpunit": "~6"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src"
- ]
+ "phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -759,33 +944,39 @@
"reflection",
"static analysis"
],
- "time": "2015-12-27 11:43:31"
+ "time": "2018-08-07T13:53:10+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "4.3.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
+ "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
+ "php": "^7.0",
+ "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
+ "phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "doctrine/instantiator": "^1.0.5",
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
@@ -804,41 +995,40 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2016-09-30 07:12:33"
+ "time": "2019-09-12T14:27:41+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
+ "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0"
+ "php": "^7.1",
+ "phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^5.2||^4.8.24"
+ "ext-tokenizer": "^7.1",
+ "mockery/mockery": "~1",
+ "phpunit/phpunit": "^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -851,42 +1041,43 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-11-25 06:54:22"
+ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+ "time": "2019-08-22T18:11:29+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.6.2",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
- "sebastian/comparator": "^1.1",
- "sebastian/recursion-context": "^1.0|^2.0"
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0",
- "phpunit/phpunit": "^4.8 || ^5.6.5"
+ "phpspec/phpspec": "^2.5|^3.2",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.8.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -914,44 +1105,44 @@
"spy",
"stub"
],
- "time": "2016-11-21 14:58:47"
+ "time": "2019-10-03T11:07:50+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "4.0.4",
+ "version": "6.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a"
+ "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c14196e64a78570034afd0b7a9f3757ba71c2a0a",
- "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
+ "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0",
- "phpunit/php-file-iterator": "~1.3",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-token-stream": "^1.4.2",
- "sebastian/code-unit-reverse-lookup": "~1.0",
- "sebastian/environment": "^1.3.2 || ^2.0",
- "sebastian/version": "~1.0|~2.0"
+ "ext-dom": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.1",
+ "phpunit/php-file-iterator": "^2.0",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^3.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^3.1 || ^4.0",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1"
},
"require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "^5.4"
+ "phpunit/phpunit": "^7.0"
},
"suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.4.0",
- "ext-xmlwriter": "*"
+ "ext-xdebug": "^2.6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "6.1-dev"
}
},
"autoload": {
@@ -966,7 +1157,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -977,29 +1168,32 @@
"testing",
"xunit"
],
- "time": "2016-12-20 15:22:42"
+ "time": "2018-10-31T16:06:48+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.2",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+ "reference": "050bedf145a257b1ff02746c31894800e5122946"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
+ "reference": "050bedf145a257b1ff02746c31894800e5122946",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -1014,7 +1208,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1024,7 +1218,7 @@
"filesystem",
"iterator"
],
- "time": "2016-10-03 07:40:28"
+ "time": "2018-09-13T20:33:42+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -1065,29 +1259,34 @@
"keywords": [
"template"
],
- "time": "2015-06-21 13:50:34"
+ "time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.8",
+ "version": "2.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
+ "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
+ "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "~4|~5"
+ "phpunit/phpunit": "^7.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -1100,7 +1299,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1109,33 +1308,33 @@
"keywords": [
"timer"
],
- "time": "2016-05-12 18:03:57"
+ "time": "2019-06-07T04:22:29+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.9",
+ "version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
+ "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
- "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
+ "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "3.1-dev"
}
},
"autoload": {
@@ -1158,55 +1357,57 @@
"keywords": [
"tokenizer"
],
- "time": "2016-11-15 14:06:22"
+ "time": "2019-09-17T06:23:10+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "5.7.4",
+ "version": "7.5.16",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09"
+ "reference": "316afa6888d2562e04aeb67ea7f2017a0eb41661"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/af91da3f2671006ff5d0628023de3b7ac4d1ef09",
- "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/316afa6888d2562e04aeb67ea7f2017a0eb41661",
+ "reference": "316afa6888d2562e04aeb67ea7f2017a0eb41661",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "~1.3",
- "php": "^5.6 || ^7.0",
- "phpspec/prophecy": "^1.6.2",
- "phpunit/php-code-coverage": "^4.0.3",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^3.2",
- "sebastian/comparator": "~1.2.2",
- "sebastian/diff": "~1.2",
- "sebastian/environment": "^1.3.4 || ^2.0",
- "sebastian/exporter": "~2.0",
- "sebastian/global-state": "^1.0 || ^2.0",
- "sebastian/object-enumerator": "~2.0",
- "sebastian/resource-operations": "~1.0",
- "sebastian/version": "~1.0|~2.0",
- "symfony/yaml": "~2.1|~3.0"
+ "myclabs/deep-copy": "^1.7",
+ "phar-io/manifest": "^1.0.2",
+ "phar-io/version": "^2.0",
+ "php": "^7.1",
+ "phpspec/prophecy": "^1.7",
+ "phpunit/php-code-coverage": "^6.0.7",
+ "phpunit/php-file-iterator": "^2.0.1",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^2.1",
+ "sebastian/comparator": "^3.0",
+ "sebastian/diff": "^3.0",
+ "sebastian/environment": "^4.0",
+ "sebastian/exporter": "^3.1",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
+ "sebastian/resource-operations": "^2.0",
+ "sebastian/version": "^2.0.1"
},
"conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2"
+ "phpunit/phpunit-mock-objects": "*"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
+ "ext-soap": "*",
"ext-xdebug": "*",
- "phpunit/php-invoker": "~1.1"
+ "phpunit/php-invoker": "^2.0"
},
"bin": [
"phpunit"
@@ -1214,7 +1415,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.7.x-dev"
+ "dev-master": "7.5-dev"
}
},
"autoload": {
@@ -1240,86 +1441,27 @@
"testing",
"xunit"
],
- "time": "2016-12-13 16:19:44"
- },
- {
- "name": "phpunit/phpunit-mock-objects",
- "version": "3.4.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.6 || ^7.0",
- "phpunit/php-text-template": "^1.2",
- "sebastian/exporter": "^1.2 || ^2.0"
- },
- "conflict": {
- "phpunit/phpunit": "<5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.4"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "time": "2016-12-08 20:27:08"
+ "time": "2019-09-14T09:08:39+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.0",
+ "version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
- "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": "^5.6 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^5.7 || ^6.0"
},
"type": "library",
"extra": {
@@ -1344,34 +1486,34 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2016-02-13 06:45:14"
+ "time": "2017-03-04T06:30:41+00:00"
},
{
"name": "sebastian/comparator",
- "version": "1.2.2",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
+ "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
- "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+ "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
+ "php": "^7.1",
+ "sebastian/diff": "^3.0",
+ "sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1402,38 +1544,39 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
- "time": "2016-11-19 09:18:40"
+ "time": "2018-07-12T15:12:46+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.4.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
+ "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
- "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+ "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "~4.8"
+ "phpunit/phpunit": "^7.5 || ^8.0",
+ "symfony/process": "^2 || ^3.3 || ^4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1458,34 +1601,40 @@
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
- "diff"
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
],
- "time": "2015-12-08 07:14:41"
+ "time": "2019-02-04T06:01:07+00:00"
},
{
"name": "sebastian/environment",
- "version": "2.0.0",
+ "version": "4.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
+ "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
+ "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "^5.0"
+ "phpunit/phpunit": "^7.5"
+ },
+ "suggest": {
+ "ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "4.2-dev"
}
},
"autoload": {
@@ -1510,34 +1659,34 @@
"environment",
"hhvm"
],
- "time": "2016-11-26 07:53:53"
+ "time": "2019-05-05T09:05:15+00:00"
},
{
"name": "sebastian/exporter",
- "version": "2.0.0",
+ "version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
+ "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -1550,6 +1699,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1558,17 +1711,13 @@
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@@ -1577,27 +1726,27 @@
"export",
"exporter"
],
- "time": "2016-11-19 08:54:04"
+ "time": "2019-09-14T09:02:43+00:00"
},
{
"name": "sebastian/global-state",
- "version": "1.1.1",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-uopz": "*"
@@ -1605,7 +1754,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1628,33 +1777,34 @@
"keywords": [
"global state"
],
- "time": "2015-10-12 03:26:01"
+ "time": "2017-04-27T15:39:26+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "2.0.0",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35"
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
- "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -1674,32 +1824,77 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2016-11-19 07:35:10"
+ "time": "2017-08-03T12:35:26+00:00"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "time": "2017-03-29T09:07:27+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "2.0.0",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -1727,29 +1922,29 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2016-11-19 07:33:16"
+ "time": "2017-03-03T06:23:57+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "1.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+ "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
"shasum": ""
},
"require": {
- "php": ">=5.6.0"
+ "php": "^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1769,7 +1964,7 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2015-07-28 20:34:47"
+ "time": "2018-10-04T04:07:39+00:00"
},
{
"name": "sebastian/version",
@@ -1812,43 +2007,40 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2016-10-03 07:35:21"
+ "time": "2016-10-03T07:35:21+00:00"
},
{
- "name": "symfony/yaml",
- "version": "v3.2.1",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.12.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "a7095af4b97a0955f85c8989106c249fa649011f"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/a7095af4b97a0955f85c8989106c249fa649011f",
- "reference": "a7095af4b97a0955f85c8989106c249fa649011f",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
- },
- "require-dev": {
- "symfony/console": "~2.8|~3.0"
+ "php": ">=5.3.3"
},
"suggest": {
- "symfony/console": "For validating YAML files using the lint command"
+ "ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "1.12-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Yaml\\": ""
+ "Symfony\\Polyfill\\Ctype\\": ""
},
- "exclude-from-classmap": [
- "/Tests/"
+ "files": [
+ "bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -1857,38 +2049,84 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Yaml Component",
+ "description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
- "time": "2016-12-10 10:07:06"
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "time": "2019-08-06T08:03:45+00:00"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+ "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "time": "2019-06-13T22:48:21+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.2.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^5.3.3 || ^7.0",
+ "symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"extra": {
@@ -1917,7 +2155,7 @@
"check",
"validate"
],
- "time": "2016-11-23 20:04:58"
+ "time": "2019-08-24T08:43:50+00:00"
}
],
"aliases": [],
@@ -1926,7 +2164,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.1"
},
"platform-dev": []
}
diff --git a/library/Xi/Netvisor/Component/Request.php b/library/Xi/Netvisor/Component/Request.php
index 4749454..53fcc49 100644
--- a/library/Xi/Netvisor/Component/Request.php
+++ b/library/Xi/Netvisor/Component/Request.php
@@ -171,7 +171,7 @@ private function getAuthenticationTransactionId()
*/
private function getAuthenticationTimestamp()
{
- $timestamp = \DateTime::createFromFormat('U.u', microtime(true));
+ $timestamp = \DateTime::createFromFormat('U.u', time() . '.' . rand(0, 9999));
$timestamp->setTimezone(new \DateTimeZone('GMT'));
return substr($timestamp->format('Y-m-d H:i:s.u'), 0, -3);
diff --git a/library/Xi/Netvisor/Netvisor.php b/library/Xi/Netvisor/Netvisor.php
index 1697383..7feb9ed 100644
--- a/library/Xi/Netvisor/Netvisor.php
+++ b/library/Xi/Netvisor/Netvisor.php
@@ -97,6 +97,16 @@ public function sendCustomer(Customer $customer)
return $this->requestWithBody($customer, 'customer', ['method' => 'add']);
}
+ /**
+ * @param int $customerId
+ * @param Customer $customer
+ * @return null|string
+ */
+ public function editCustomer(int $customerId, Customer $customer)
+ {
+ return $this->requestWithBody($customer, 'customer', ['method' => 'edit', 'id' => $customerId]);
+ }
+
/**
* List customers, optionally filtered by a keyword.
*
@@ -134,6 +144,22 @@ public function getCustomersChangedSince(DateTime $changedSince)
);
}
+ /**
+ * Get details for a customer identified by Netvisor id.
+ *
+ * @param int $id
+ * @return null|string
+ */
+ public function getCustomer($id)
+ {
+ return $this->get(
+ 'getcustomer',
+ [
+ 'id' => $id,
+ ]
+ );
+ }
+
/**
* Get details for a product identified by Netvisor id.
*
@@ -215,7 +241,6 @@ private function createSerializer()
public function processXml($xml)
{
$xml = str_replace("\n", "", $xml);
- $xml = str_replace(array(''), '', $xml);
return $xml;
}
diff --git a/library/Xi/Netvisor/Resource/Dtd/salesinvoice.dtd b/library/Xi/Netvisor/Resource/Dtd/salesinvoice.dtd
index ecb196f..f04b767 100644
--- a/library/Xi/Netvisor/Resource/Dtd/salesinvoice.dtd
+++ b/library/Xi/Netvisor/Resource/Dtd/salesinvoice.dtd
@@ -1,78 +1,82 @@
-
+
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
@@ -84,19 +88,20 @@
-
-
+
+
-
+
-
+
+
@@ -108,8 +113,11 @@
+
+
-
+
+
]>
diff --git a/library/Xi/Netvisor/Resource/Xml/Customer.php b/library/Xi/Netvisor/Resource/Xml/Customer.php
index 84ec107..6cdc84a 100644
--- a/library/Xi/Netvisor/Resource/Xml/Customer.php
+++ b/library/Xi/Netvisor/Resource/Xml/Customer.php
@@ -11,13 +11,16 @@ class Customer extends Root
{
private $customerBaseInformation;
private $customerFinvoiceDetails;
+ private $customerAdditionalInformation;
public function __construct(
CustomerBaseInformation $customerBaseInformation,
- CustomerFinvoiceDetails $customerFinvoiceDetails = null
+ CustomerFinvoiceDetails $customerFinvoiceDetails = null,
+ CustomerAdditionalInformation $customerAdditionalInformation = null
) {
$this->customerBaseInformation = $customerBaseInformation;
$this->customerFinvoiceDetails = $customerFinvoiceDetails;
+ $this->customerAdditionalInformation = $customerAdditionalInformation;
}
public function getDtdPath()
diff --git a/library/Xi/Netvisor/Resource/Xml/CustomerAdditionalInformation.php b/library/Xi/Netvisor/Resource/Xml/CustomerAdditionalInformation.php
new file mode 100644
index 0000000..3db391d
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/CustomerAdditionalInformation.php
@@ -0,0 +1,17 @@
+invoicingLanguage = $invoicingLanguage;
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php b/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
index 0b1223e..8f07ec7 100644
--- a/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
+++ b/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
@@ -4,12 +4,15 @@
class CustomerBaseInformation
{
+ private $internalIdentifier;
private $externalIdentifier;
private $name;
private $streetAddress;
private $city;
private $postNumber;
private $country;
+ private $customerGroupName;
+ private $emailInvoicingAddress;
/**
* @param string $externalIdentifier
@@ -18,6 +21,9 @@ class CustomerBaseInformation
* @param string $city
* @param string $postNumber
* @param string $country
+ * @param string|null $customerGroupName
+ * @param string|null $emailInvoicingAddress
+ * @param string|null $internalIdentifier
*/
public function __construct(
$externalIdentifier,
@@ -25,7 +31,10 @@ public function __construct(
$streetAddress,
$city,
$postNumber,
- $country
+ $country,
+ $customerGroupName = null,
+ $emailInvoicingAddress = null,
+ $internalIdentifier = null
) {
$this->externalIdentifier = $externalIdentifier;
$this->name = $name;
@@ -33,5 +42,8 @@ public function __construct(
$this->city = $city;
$this->postNumber = $postNumber;
$this->country = $country;
+ $this->customerGroupName = $customerGroupName;
+ $this->emailInvoicingAddress = $emailInvoicingAddress;
+ $this->internalIdentifier = $internalIdentifier;
}
}
diff --git a/library/Xi/Netvisor/Resource/Xml/Dimension.php b/library/Xi/Netvisor/Resource/Xml/Dimension.php
new file mode 100644
index 0000000..b9b2129
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/Dimension.php
@@ -0,0 +1,19 @@
+dimensionName = $dimensionName;
+ $this->dimensionItem = $dimensionItem;
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php b/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
index 96c4229..34daed3 100644
--- a/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
+++ b/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
@@ -12,36 +12,89 @@
*/
class SalesInvoice extends Root
{
+ private $salesInvoiceNumber;
private $salesInvoiceDate;
+ private $salesInvoiceDeliveryDate;
+ private $salesInvoiceReferenceNumber;
private $salesInvoiceAmount;
+ private $sellerName;
+ private $invoiceType;
private $salesInvoiceStatus;
+ private $salesInvoiceFreeTextBeforeLines;
+ private $salesInvoiceFreeTextAfterLines;
+ private $salesInvoiceOurReference;
+ private $salesInvoiceYourReference;
+ private $salesInvoicePrivateComment;
private $invoicingCustomerIdentifier;
+ private $invoicingCustomerName;
+ private $invoicingCustomerNameExtension;
+ private $invoicingCustomerAddressLine;
+ private $invoicingCustomerAdditionalAddressLine;
+ private $invoicingCustomerPostNumber;
+ private $invoicingCustomerTown;
+ private $invoicingCustomerCountryCode;
+ private $deliveryAddressName;
+ private $deliveryAddressLine;
+ private $deliveryAddressPostNumber;
+ private $deliveryAddressTown;
+ private $deliveryAddressCountryCode;
+ private $deliveryMethod;
+ private $deliveryTerm;
+ private $salesInvoiceTaxHandlingType;
private $paymentTermNetDays;
+ private $paymentTermCashDiscountDays;
+ private $paymentTermCashDiscount;
+ private $expectPartialPayments;
+ private $overrideVoucherSalesReceivablesAccountNumber;
+ private $salesInvoiceAgreementIdentifier;
+ private $printChannelFormat;
+ private $secondName;
/**
* @XmlList(entry = "invoiceline")
*/
- private $invoiceLines = array();
+ private $invoiceLines = [];
+
+ private $invoiceVoucherLines;
+ private $salesInvoiceAccrual;
+
+ /**
+ * @XmlList(entry = "salesinvoiceattachment")
+ */
+ private $salesInvoiceAttachments;
+
+ private $customTags;
/**
* @param \DateTime $salesInvoiceDate
- * @param string $salesInvoiceAmount
- * @param string $salesInvoiceStatus
- * @param string $invoicingCustomerIdentifier
- * @param int $paymentTermNetDays
+ * @param string $salesInvoiceAmount
+ * @param string $salesInvoiceStatus
+ * @param string $invoicingCustomerIdentifier
+ * @param int $paymentTermNetDays
+ * @param array $additionalFields
*/
public function __construct(
\DateTime $salesInvoiceDate,
$salesInvoiceAmount,
$salesInvoiceStatus,
$invoicingCustomerIdentifier,
- $paymentTermNetDays
+ $paymentTermNetDays,
+ array $additionalFields = []
) {
$this->salesInvoiceDate = $salesInvoiceDate->format('Y-m-d');
$this->salesInvoiceAmount = $salesInvoiceAmount;
$this->salesInvoiceStatus = new AttributeElement($salesInvoiceStatus, array('type' => 'netvisor'));
$this->invoicingCustomerIdentifier = new AttributeElement($invoicingCustomerIdentifier, array('type' => 'netvisor')); // TODO: Type can be netvisor/customer.
$this->paymentTermNetDays = $paymentTermNetDays;
+ $this->secondName = array_key_exists('secondName', $additionalFields) ? new AttributeElement($additionalFields['secondName'], ['type' => 'netvisor']) : null;
+
+ foreach ($additionalFields as $key => $value) {
+ if (in_array($key, ['secondName'])) {
+ continue;
+ }
+
+ $this->$key = $value;
+ }
}
/**
diff --git a/library/Xi/Netvisor/Resource/Xml/SalesInvoiceAttachment.php b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceAttachment.php
new file mode 100644
index 0000000..dee96e1
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceAttachment.php
@@ -0,0 +1,37 @@
+mimeType = $mimeType;
+ $this->attachmentDescription = $attachmentDescription;
+ $this->fileName = $fileName;
+ $this->documentData = new AttributeElement(base64_encode($documentData), array('type' => $documentDataType));
+ $this->printByDefault = $printByDefault;
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
index 4886418..6b5a6e3 100644
--- a/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
+++ b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
@@ -2,6 +2,7 @@
namespace Xi\Netvisor\Resource\Xml;
+use JMS\Serializer\Annotation\XmlList;
use Xi\Netvisor\Resource\Xml\Component\AttributeElement;
class SalesInvoiceProductLine
@@ -9,27 +10,45 @@ class SalesInvoiceProductLine
private $productIdentifier;
private $productName;
private $productUnitPrice;
+ private $productUnitPurchasePrice;
private $productVatPercentage;
private $salesInvoiceProductLineQuantity;
+ private $salesInvoiceProductLineDiscountPercentage;
+ private $salesInvoiceProductLineFreeText;
+ private $salesInvoiceProductLineVatSum;
+ private $salesInvoiceProductLineSum;
+ private $accountingAccountSuggestion;
+ private $skipAccrual;
+
+ /**
+ * @XmlList(inline = true, entry = "dimension")
+ */
+ private $dimensions;
/**
* @param string $productIdentifier
* @param string $productName
* @param string $productUnitPrice
* @param string $productVatPercentage
- * @param int $salesInvoiceProductLineQuantity
+ * @param int $salesInvoiceProductLineQuantity
+ * @param array $additionalFields
*/
public function __construct(
$productIdentifier,
$productName,
$productUnitPrice,
$productVatPercentage,
- $salesInvoiceProductLineQuantity
+ $salesInvoiceProductLineQuantity,
+ array $additionalFields = []
) {
$this->productIdentifier = new AttributeElement($productIdentifier, array('type' => 'netvisor')); // TODO: netvisor/customer.
$this->productName = substr($productName, 0, 50);
$this->productUnitPrice = new AttributeElement($productUnitPrice, array('type' => 'net')); // TODO: net/gross.
$this->productVatPercentage = new AttributeElement($productVatPercentage, array('vatcode' => 'KOMY')); // TODO: different values.
$this->salesInvoiceProductLineQuantity = $salesInvoiceProductLineQuantity;
+
+ foreach ($additionalFields as $key => $value) {
+ $this->$key = $value;
+ }
}
}
diff --git a/tests/Xi/Netvisor/Component/RequestTest.php b/tests/Xi/Netvisor/Component/RequestTest.php
index b9cca36..d6c28e3 100644
--- a/tests/Xi/Netvisor/Component/RequestTest.php
+++ b/tests/Xi/Netvisor/Component/RequestTest.php
@@ -3,11 +3,12 @@
namespace Xi\Netvisor\Component;
use GuzzleHttp\Psr7\Response;
+use PHPUnit\Framework\TestCase;
use Xi\Netvisor\Component\Request;
use Xi\Netvisor\Config;
use GuzzleHttp\Client;
-class RequestTest extends \PHPUnit_Framework_TestCase
+class RequestTest extends TestCase
{
/**
* @var Request
@@ -91,10 +92,8 @@ public function throwsExceptionIfResponseStatusIsFailed()
new Response('200', array(), $xmlResponse)
));
- $this->setExpectedException(
- 'Xi\Netvisor\Exception\NetvisorException',
- 'AUTHENTICATION_FAILED :: Integraatiokumppania ei löydy, katso dokumentaatio'
- );
+ $this->expectException('Xi\Netvisor\Exception\NetvisorException');
+ $this->expectExceptionMessage('AUTHENTICATION_FAILED :: Integraatiokumppania ei löydy, katso dokumentaatio');
$this->request->post(
'',
diff --git a/tests/Xi/Netvisor/ConfigTest.php b/tests/Xi/Netvisor/ConfigTest.php
index 8a47067..f76e789 100644
--- a/tests/Xi/Netvisor/ConfigTest.php
+++ b/tests/Xi/Netvisor/ConfigTest.php
@@ -2,9 +2,10 @@
namespace Xi\Netvisor\Component;
+use PHPUnit\Framework\TestCase;
use Xi\Netvisor\Config;
-class ConfigTest extends \PHPUnit_Framework_TestCase
+class ConfigTest extends TestCase
{
/**
* @test
diff --git a/tests/Xi/Netvisor/NetvisorTest.php b/tests/Xi/Netvisor/NetvisorTest.php
index 4c4fe09..cc5249b 100644
--- a/tests/Xi/Netvisor/NetvisorTest.php
+++ b/tests/Xi/Netvisor/NetvisorTest.php
@@ -2,6 +2,7 @@
namespace Xi\Netvisor;
+use PHPUnit\Framework\TestCase;
use Xi\Netvisor\Component\Validate;
use Xi\Netvisor\Netvisor;
use Xi\Netvisor\Config;
@@ -10,7 +11,7 @@
use Xi\Netvisor\Resource\Xml\TestResource;
use GuzzleHttp\Psr7\Response;
-class NetvisorTest extends \PHPUnit_Framework_TestCase
+class NetvisorTest extends TestCase
{
/**
* @var Netvisor
@@ -27,9 +28,6 @@ class NetvisorTest extends \PHPUnit_Framework_TestCase
*/
private $config;
- /**
- * @test
- */
public function setUp()
{
$this->client = $this->getMockBuilder('GuzzleHttp\Client')
@@ -88,7 +86,8 @@ public function returnsNullIfNotEnabled()
*/
public function throwsIfXmlIsNotValid()
{
- $this->setExpectedException('Xi\Netvisor\Exception\NetvisorException', 'XML is not valid according to DTD');
+ $this->expectException('Xi\Netvisor\Exception\NetvisorException');
+ $this->expectExceptionMessage('XML is not valid according to DTD');
$this->netvisor->requestWithBody(new TestResource(), 'service', array(), null);
}
@@ -152,6 +151,6 @@ public function processInvoiceToWorkWithNetvisor()
{
$xml = "\n";
- $this->assertEquals('2014-02-17', $this->netvisor->processXml($xml));
+ $this->assertEquals('', $this->netvisor->processXml($xml));
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php b/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
index e19a078..8f3b767 100644
--- a/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
@@ -26,9 +26,13 @@ public function setUp()
'Testikatu 1',
'Helsinki',
'00240',
- 'FI'
+ 'FI',
+ null
),
- null
+ null,
+ new CustomerAdditionalInformation(
+ 'SV'
+ )
);
}
@@ -49,5 +53,6 @@ public function xmlHasRequiredValues()
$this->assertXmlContainsTagWithValue('externalidentifier', '1234567-1', $xml);
$this->assertXmlContainsTagWithValue('name', 'Testi Oy', $xml);
+ $this->assertXmlContainsTagWithValue('invoicinglanguage', 'SV', $xml);
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
index 0599857..2534615 100644
--- a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
@@ -21,7 +21,13 @@ public function setUp()
'Product name, which is longer than the limit of 50 characters',
'1,23',
'24',
- '5'
+ '5',
+ [
+ 'dimensions' => [
+ new Dimension('test name', 'test item 1'),
+ new Dimension('test name', 'test item 2'),
+ ],
+ ]
);
}
@@ -45,5 +51,7 @@ public function xmlHasRequiredProductLineValues()
$this->assertXmlContainsTagWithAttributes('productvatpercentage', array('vatcode' => 'KOMY'), $xml);
$this->assertXmlContainsTagWithValue('salesinvoiceproductlinequantity', 5, $xml);
+
+ $this->assertXmlContainsTagWithValue('dimensionitem', 'test item 1', $xml);
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
index cd8a379..60e35c7 100644
--- a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
@@ -24,7 +24,10 @@ public function setUp()
'5,00',
'Open',
'616',
- 14
+ 14,
+ [
+ 'secondName' => 'test',
+ ]
);
}
@@ -63,11 +66,21 @@ public function xmlHasAddedSalesInvoiceProductLines()
$xml = $this->toXml($this->invoice->getSerializableObject());
- $this->assertContains('invoicelines', $xml);
- $this->assertContains('invoiceline', $xml);
- $this->assertContains('salesinvoiceproductline', $xml);
+ $this->assertContains('', $xml);
+ $this->assertContains('', $xml);
+ $this->assertContains('', $xml);
$this->assertXmlContainsTagWithValue('productidentifier', '1', $xml);
$this->assertXmlContainsTagWithValue('productidentifier', '2', $xml);
}
+
+ /**
+ * @test
+ */
+ public function xmlHasAdditionalField()
+ {
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('secondname', 'test', $xml);
+ }
}
diff --git a/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php b/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php
index 4792f0f..064a95d 100644
--- a/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php
+++ b/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php
@@ -3,9 +3,10 @@
namespace Xi\Netvisor\Component;
use JMS\Serializer\Metadata\PropertyMetadata;
+use PHPUnit\Framework\TestCase;
use Xi\Netvisor\Serializer\Naming\LowercaseNamingStrategy;
-class LowercaseNamingStrategyTest extends \PHPUnit_Framework_TestCase
+class LowercaseNamingStrategyTest extends TestCase
{
/**
* @test
diff --git a/tests/Xi/Netvisor/XmlTestCase.php b/tests/Xi/Netvisor/XmlTestCase.php
index 57aa3b7..f6e7323 100644
--- a/tests/Xi/Netvisor/XmlTestCase.php
+++ b/tests/Xi/Netvisor/XmlTestCase.php
@@ -4,9 +4,10 @@
use JMS\Serializer\Serializer;
use JMS\Serializer\SerializerBuilder;
+use PHPUnit\Framework\TestCase;
use Xi\Netvisor\Serializer\Naming\LowercaseNamingStrategy;
-class XmlTestCase extends \PHPUnit_Framework_TestCase
+class XmlTestCase extends TestCase
{
/**
* @var Serializer