diff --git a/composer.json b/composer.json
index 77f993d..0feff49 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.2",
+ "jms/serializer": "^3.11",
+ "guzzlehttp/guzzle": "^7.2"
},
"require-dev": {
- "phpunit/phpunit": "^5.7"
+ "phpunit/phpunit": "^8.0"
},
"autoload": {
diff --git a/composer.lock b/composer.lock
index 8b2eb2b..dd853dd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,40 +1,39 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "hash": "36b7c793a96ac0c2fefd9be0fd61697e",
- "content-hash": "8890ff7472faa1a3d9a53fcbde7712af",
+ "content-hash": "7e15a82098bceb6bf70ae2daa038de23",
"packages": [
{
"name": "doctrine/annotations",
- "version": "v1.3.0",
+ "version": "1.13.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5"
+ "reference": "5b668aef16090008790395c02c893b1ba13f7e08"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5",
- "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08",
+ "reference": "5b668aef16090008790395c02c893b1ba13f7e08",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
- "php": "^5.6 || ^7.0"
+ "ext-tokenizer": "*",
+ "php": "^7.1 || ^8.0",
+ "psr/cache": "^1 || ^2 || ^3"
},
"require-dev": {
- "doctrine/cache": "1.*",
- "phpunit/phpunit": "^5.6.1"
+ "doctrine/cache": "^1.11 || ^2.0",
+ "doctrine/coding-standard": "^6.0 || ^8.1",
+ "phpstan/phpstan": "^0.12.20",
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
+ "symfony/cache": "^4.4 || ^5.2"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
@@ -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"
@@ -67,44 +66,45 @@
}
],
"description": "Docblock Annotations Parser",
- "homepage": "http://www.doctrine-project.org",
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
"keywords": [
"annotations",
"docblock",
"parser"
],
- "time": "2016-10-24 11:45:47"
+ "support": {
+ "issues": "https://github.com/doctrine/annotations/issues",
+ "source": "https://github.com/doctrine/annotations/tree/1.13.2"
+ },
+ "time": "2021-08-05T19:00:23+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.0.5",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
- "php": ">=5.3,<8.0-DEV"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
+ "doctrine/coding-standard": "^8.0",
"ext-pdo": "*",
"ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
+ "phpstan/phpstan": "^0.12",
+ "phpstan/phpstan-phpunit": "^0.12",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -118,43 +118,62 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "homepage": "https://ocramius.github.io/"
}
],
"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"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-11-10T18:47:58+00:00"
},
{
"name": "doctrine/lexer",
- "version": "v1.0.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
+ "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
+ "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": "^7.1 || ^8.0"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0",
+ "phpstan/phpstan": "1.3",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.11"
},
+ "type": "library",
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Lexer\\": "lib/"
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -162,55 +181,89 @@
"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"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/lexer/issues",
+ "source": "https://github.com/doctrine/lexer/tree/1.2.2"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+ "type": "tidelift"
+ }
],
- "time": "2014-09-09 13:34:57"
+ "time": "2022-01-12T08:27:12+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.2.2",
+ "version": "7.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
+ "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
+ "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
"shasum": ""
},
"require": {
- "guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.3.1",
- "php": ">=5.5"
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.5",
+ "guzzlehttp/psr7": "^1.8.3 || ^2.1",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0",
+ "symfony/deprecation-contracts": "^2.2 || ^3.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
},
"require-dev": {
+ "bamarni/composer-bin-plugin": "^1.4.1",
"ext-curl": "*",
- "phpunit/phpunit": "^4.0",
- "psr/log": "^1.0"
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+ "psr/log": "^1.1 || ^2.0 || ^3.0"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2-dev"
+ "dev-master": "7.4-dev"
}
},
"autoload": {
@@ -226,174 +279,322 @@
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "jeremeamia@gmail.com",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle is a PHP HTTP client library",
- "homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
+ "psr-18",
+ "psr-7",
"rest",
"web service"
],
- "time": "2016-10-08 15:01:37"
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.4.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-12-06T18:43:05+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "v1.3.1",
+ "version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+ "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
+ "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"shasum": ""
},
"require": {
- "php": ">=5.5.0"
+ "php": ">=5.5"
},
"require-dev": {
- "phpunit/phpunit": "^4.0"
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.5-dev"
}
},
"autoload": {
- "psr-4": {
- "GuzzleHttp\\Promise\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
- "time": "2016-12-20 10:07:11"
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/1.5.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-10-22T20:56:57+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "1.3.1",
+ "version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
+ "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
+ "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
"shasum": ""
},
"require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.0",
+ "ralouphie/getallheaders": "^3.0"
},
"provide": {
+ "psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "bamarni/composer-bin-plugin": "^1.4.1",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.8 || ^9.3.10"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.1-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://sagikazarmark.hu"
}
],
- "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"
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/2.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-10-06T17:43:30+00:00"
},
{
"name": "jms/metadata",
- "version": "1.6.0",
+ "version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/metadata.git",
- "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab"
+ "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab",
- "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab",
+ "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5",
+ "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": "^7.2|^8.0"
},
"require-dev": {
- "doctrine/cache": "~1.0",
- "symfony/cache": "~3.1"
+ "doctrine/cache": "^1.0",
+ "doctrine/coding-standard": "^8.0",
+ "mikey179/vfsstream": "^1.6.7",
+ "phpunit/phpunit": "^8.5|^9.0",
+ "psr/container": "^1.0",
+ "symfony/cache": "^3.1|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.1|^4.0|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.5.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Metadata\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache-2.0"
+ "MIT"
],
"authors": [
{
"name": "Johannes M. Schmitt",
"email": "schmittjoh@gmail.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
}
],
"description": "Class/method/property metadata management in PHP",
@@ -403,215 +604,310 @@
"xml",
"yaml"
],
- "time": "2016-12-05 10:18:33"
+ "support": {
+ "issues": "https://github.com/schmittjoh/metadata/issues",
+ "source": "https://github.com/schmittjoh/metadata/tree/2.6.1"
+ },
+ "time": "2021-11-22T12:27:42+00:00"
},
{
- "name": "jms/parser-lib",
- "version": "1.0.0",
+ "name": "jms/serializer",
+ "version": "3.17.1",
"source": {
"type": "git",
- "url": "https://github.com/schmittjoh/parser-lib.git",
- "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d"
+ "url": "https://github.com/schmittjoh/serializer.git",
+ "reference": "190f64b051795d447ec755acbfdb1bff330a6707"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d",
- "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d",
+ "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/190f64b051795d447ec755acbfdb1bff330a6707",
+ "reference": "190f64b051795d447ec755acbfdb1bff330a6707",
"shasum": ""
},
"require": {
- "phpoption/phpoption": ">=0.9,<2.0-dev"
+ "doctrine/annotations": "^1.13",
+ "doctrine/instantiator": "^1.0.3",
+ "doctrine/lexer": "^1.1",
+ "jms/metadata": "^2.6",
+ "php": "^7.2||^8.0",
+ "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^8.1",
+ "doctrine/orm": "~2.1",
+ "doctrine/persistence": "^1.3.3|^2.0|^3.0",
+ "doctrine/phpcr-odm": "^1.3|^2.0",
+ "ext-pdo_sqlite": "*",
+ "jackalope/jackalope-doctrine-dbal": "^1.1.5",
+ "ocramius/proxy-manager": "^1.0|^2.0",
+ "phpbench/phpbench": "^1.0",
+ "phpstan/phpstan": "^1.0.2",
+ "phpunit/phpunit": "^8.5.21||^9.0",
+ "psr/container": "^1.0",
+ "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0",
+ "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0",
+ "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0",
+ "symfony/form": "^3.0|^4.0|^5.0|^6.0",
+ "symfony/translation": "^3.0|^4.0|^5.0|^6.0",
+ "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0",
+ "symfony/yaml": "^3.3|^4.0|^5.0|^6.0",
+ "twig/twig": "~1.34|~2.4|^3.0"
+ },
+ "suggest": {
+ "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.",
+ "symfony/cache": "Required if you like to use cache functionality.",
+ "symfony/yaml": "Required if you'd like to use the YAML metadata format."
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "3.x-dev"
}
},
"autoload": {
- "psr-0": {
- "JMS\\": "src/"
+ "psr-4": {
+ "JMS\\Serializer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache2"
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ }
+ ],
+ "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
+ "homepage": "http://jmsyst.com/libs/serializer",
+ "keywords": [
+ "deserialization",
+ "jaxb",
+ "json",
+ "serialization",
+ "xml"
+ ],
+ "support": {
+ "issues": "https://github.com/schmittjoh/serializer/issues",
+ "source": "https://github.com/schmittjoh/serializer/tree/3.17.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/goetas",
+ "type": "github"
+ }
],
- "description": "A library for easily creating recursive-descent parsers.",
- "time": "2012-11-18 18:08:43"
+ "time": "2021-12-28T20:59:55+00:00"
},
{
- "name": "jms/serializer",
- "version": "1.4.2",
+ "name": "phpstan/phpdoc-parser",
+ "version": "1.2.0",
"source": {
"type": "git",
- "url": "https://github.com/schmittjoh/serializer.git",
- "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b"
+ "url": "https://github.com/phpstan/phpdoc-parser.git",
+ "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
- "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/dbc093d7af60eff5cd575d2ed761b15ed40bd08e",
+ "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e",
"shasum": ""
},
"require": {
- "doctrine/annotations": "^1.0",
- "doctrine/instantiator": "^1.0.3",
- "jms/metadata": "~1.1",
- "jms/parser-lib": "1.*",
- "php": ">=5.5.0",
- "phpcollection/phpcollection": "~0.1",
- "phpoption/phpoption": "^1.1"
- },
- "conflict": {
- "twig/twig": "<1.12"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/orm": "~2.1",
- "doctrine/phpcr-odm": "^1.3|^2.0",
- "ext-pdo_sqlite": "*",
- "jackalope/jackalope-doctrine-dbal": "^1.1.5",
- "phpunit/phpunit": "^4.8|^5.0",
- "propel/propel1": "~1.7",
- "symfony/filesystem": "^2.1",
- "symfony/form": "~2.1",
- "symfony/translation": "^2.1",
- "symfony/validator": "^2.2",
- "symfony/yaml": "^2.1",
- "twig/twig": "~1.12|~2.0"
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/extension-installer": "^1.0",
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.0",
+ "phpunit/phpunit": "^9.5",
+ "symfony/process": "^5.2"
},
- "suggest": {
- "symfony/yaml": "Required if you'd like to serialize data to YAML format."
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\PhpDocParser\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPDoc parser with support for nullable, intersection and generic types",
+ "support": {
+ "issues": "https://github.com/phpstan/phpdoc-parser/issues",
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.2.0"
+ },
+ "time": "2021-09-16T20:46:02+00:00"
+ },
+ {
+ "name": "psr/cache",
+ "version": "3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
+ "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-0": {
- "JMS\\Serializer": "src/"
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache2"
+ "MIT"
],
"authors": [
{
- "name": "Johannes M. Schmitt",
- "email": "schmittjoh@gmail.com"
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
}
],
- "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
- "homepage": "http://jmsyst.com/libs/serializer",
+ "description": "Common interface for caching libraries",
"keywords": [
- "deserialization",
- "jaxb",
- "json",
- "serialization",
- "xml"
+ "cache",
+ "psr",
+ "psr-6"
],
- "time": "2016-11-13 10:20:11"
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/3.0.0"
+ },
+ "time": "2021-02-03T23:26:27+00:00"
},
{
- "name": "phpcollection/phpcollection",
- "version": "0.5.0",
+ "name": "psr/http-client",
+ "version": "1.0.1",
"source": {
"type": "git",
- "url": "https://github.com/schmittjoh/php-collection.git",
- "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6"
+ "url": "https://github.com/php-fig/http-client.git",
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
- "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
"shasum": ""
},
"require": {
- "phpoption/phpoption": "1.*"
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.4-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-0": {
- "PhpCollection": "src/"
+ "psr-4": {
+ "Psr\\Http\\Client\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache2"
+ "MIT"
],
"authors": [
{
- "name": "Johannes M. Schmitt",
- "email": "schmittjoh@gmail.com"
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
}
],
- "description": "General-Purpose Collection Library for PHP",
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
"keywords": [
- "collection",
- "list",
- "map",
- "sequence",
- "set"
+ "http",
+ "http-client",
+ "psr",
+ "psr-18"
],
- "time": "2015-05-17 12:39:23"
+ "support": {
+ "source": "https://github.com/php-fig/http-client/tree/master"
+ },
+ "time": "2020-06-29T06:28:15+00:00"
},
{
- "name": "phpoption/phpoption",
- "version": "1.5.0",
+ "name": "psr/http-factory",
+ "version": "1.0.1",
"source": {
"type": "git",
- "url": "https://github.com/schmittjoh/php-option.git",
- "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed"
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed",
- "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+ "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "4.7.*"
+ "php": ">=7.0.0",
+ "psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-0": {
- "PhpOption\\": "src/"
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "Apache2"
+ "MIT"
],
"authors": [
{
- "name": "Johannes M. Schmitt",
- "email": "schmittjoh@gmail.com"
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
}
],
- "description": "Option Type for PHP",
+ "description": "Common interfaces for PSR-7 HTTP message factories",
"keywords": [
- "language",
- "option",
- "php",
- "type"
+ "factory",
+ "http",
+ "message",
+ "psr",
+ "psr-17",
+ "psr-7",
+ "request",
+ "response"
],
- "time": "2015-07-25 16:39:46"
+ "support": {
+ "source": "https://github.com/php-fig/http-factory/tree/master"
+ },
+ "time": "2019-04-30T12:38:16+00:00"
},
{
"name": "psr/http-message",
@@ -661,33 +957,151 @@
"request",
"response"
],
- "time": "2016-08-06 14:39:51"
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/master"
+ },
+ "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.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
+ "time": "2019-03-08T08:55:37+00:00"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
+ "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-11-01T23:48:49+00:00"
}
],
"packages-dev": [
{
"name": "myclabs/deep-copy",
- "version": "1.5.5",
+ "version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108"
+ "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108",
- "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
+ "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
+ "doctrine/collections": "^1.0",
+ "doctrine/common": "^2.6",
+ "phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
@@ -697,7 +1111,6 @@
"MIT"
],
"description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@@ -705,39 +1118,155 @@
"object",
"object graph"
],
- "time": "2016-10-31 17:19:45"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-11-13T09:40:50+00:00"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "2.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.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)",
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.3"
+ },
+ "time": "2021-07-20T11:28:43+00:00"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.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",
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
+ "time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0",
+ "version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.6"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src"
- ]
+ "phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -759,38 +1288,46 @@
"reflection",
"static analysis"
],
- "time": "2015-12-27 11:43:31"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+ },
+ "time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
- "webmozart/assert": "^1.0"
+ "ext-filter": "*",
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.2",
+ "phpdocumentor/type-resolver": "^1.3",
+ "webmozart/assert": "^1.9.1"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "mockery/mockery": "~1.3.2",
+ "psalm/phar": "^4.8"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -801,44 +1338,50 @@
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
+ },
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "account@ijaap.nl"
}
],
"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"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
+ },
+ "time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
+ "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0"
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^5.2||^4.8.24"
+ "ext-tokenizer": "*",
+ "psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -851,42 +1394,47 @@
"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",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
+ },
+ "time": "2022-01-04T19:58:01+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.6.2",
+ "version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"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"
+ "doctrine/instantiator": "^1.2",
+ "php": "^7.2 || ~8.0, <8.2",
+ "phpdocumentor/reflection-docblock": "^5.2",
+ "sebastian/comparator": "^3.0 || ^4.0",
+ "sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0",
- "phpunit/phpunit": "^4.8 || ^5.6.5"
+ "phpspec/phpspec": "^6.0 || ^7.0",
+ "phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -914,44 +1462,48 @@
"spy",
"stub"
],
- "time": "2016-11-21 14:58:47"
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
+ },
+ "time": "2021-12-08T12:19:24+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "4.0.4",
+ "version": "7.0.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a"
+ "reference": "819f92bba8b001d4363065928088de22f25a3a48"
},
"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/819f92bba8b001d4363065928088de22f25a3a48",
+ "reference": "819f92bba8b001d4363065928088de22f25a3a48",
"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.2",
+ "phpunit/php-file-iterator": "^2.0.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^3.1.3 || ^4.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^4.2.2",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1.3"
},
"require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "^5.4"
+ "phpunit/phpunit": "^8.2.2"
},
"suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.4.0",
- "ext-xmlwriter": "*"
+ "ext-xdebug": "^2.7.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "7.0-dev"
}
},
"autoload": {
@@ -966,7 +1518,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -977,29 +1529,42 @@
"testing",
"xunit"
],
- "time": "2016-12-20 15:22:42"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-07-26T12:20:09+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.2",
+ "version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+ "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5"
},
"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/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
+ "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -1014,7 +1579,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1024,7 +1589,17 @@
"filesystem",
"iterator"
],
- "time": "2016-10-03 07:40:28"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-12-02T12:42:26+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -1065,29 +1640,38 @@
"keywords": [
"template"
],
- "time": "2015-06-21 13:50:34"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ },
+ "time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.8",
+ "version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
+ "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662"
},
"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/2454ae1765516d20c4ffe103d85a58a9a3bd5662",
+ "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "~4|~5"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -1100,7 +1684,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1109,33 +1693,43 @@
"keywords": [
"timer"
],
- "time": "2016-05-12 18:03:57"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:20:02+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.9",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
},
"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/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.3 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1158,55 +1752,67 @@
"keywords": [
"tokenizer"
],
- "time": "2016-11-15 14:06:22"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "abandoned": true,
+ "time": "2020-08-04T08:28:15+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "5.7.4",
+ "version": "8.5.23",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09"
+ "reference": "efb20ff3623b9d09bf190a68fdfe574538a8d496"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/af91da3f2671006ff5d0628023de3b7ac4d1ef09",
- "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/efb20ff3623b9d09bf190a68fdfe574538a8d496",
+ "reference": "efb20ff3623b9d09bf190a68fdfe574538a8d496",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.3.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"
- },
- "conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2"
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.10.0",
+ "phar-io/manifest": "^2.0.3",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.2",
+ "phpspec/prophecy": "^1.10.3",
+ "phpunit/php-code-coverage": "^7.0.12",
+ "phpunit/php-file-iterator": "^2.0.4",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^2.1.2",
+ "sebastian/comparator": "^3.0.2",
+ "sebastian/diff": "^3.0.2",
+ "sebastian/environment": "^4.2.3",
+ "sebastian/exporter": "^3.1.2",
+ "sebastian/global-state": "^3.0.0",
+ "sebastian/object-enumerator": "^3.0.3",
+ "sebastian/resource-operations": "^2.0.1",
+ "sebastian/type": "^1.1.3",
+ "sebastian/version": "^2.0.1"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
+ "ext-soap": "*",
"ext-xdebug": "*",
- "phpunit/php-invoker": "~1.1"
+ "phpunit/php-invoker": "^2.0.0"
},
"bin": [
"phpunit"
@@ -1214,7 +1820,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.7.x-dev"
+ "dev-master": "8.5-dev"
}
},
"autoload": {
@@ -1240,86 +1846,41 @@
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.23"
},
- "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": [
+ "funding": [
{
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
}
],
- "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": "2022-01-21T05:50:34+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.0",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
},
"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/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -1344,34 +1905,44 @@
],
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:15:22+00:00"
},
{
"name": "sebastian/comparator",
- "version": "1.2.2",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
+ "reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
- "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
+ "reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
"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": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1384,6 +1955,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1395,45 +1970,52 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
}
],
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:04:30+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.4.1",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
+ "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
- "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
+ "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
"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": {
@@ -1446,46 +2028,62 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
- "diff"
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2015-12-08 07:14:41"
+ "time": "2020-11-30T07:59:04+00:00"
},
{
"name": "sebastian/environment",
- "version": "2.0.0",
+ "version": "4.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
+ "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
+ "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
"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 +2108,44 @@
"environment",
"hhvm"
],
- "time": "2016-11-26 07:53:53"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:53:42+00:00"
},
{
"name": "sebastian/exporter",
- "version": "2.0.0",
+ "version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
+ "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"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": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -1550,6 +2158,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1558,17 +2170,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 +2185,40 @@
"export",
"exporter"
],
- "time": "2016-11-19 08:54:04"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-11-11T13:51:24+00:00"
},
{
"name": "sebastian/global-state",
- "version": "1.1.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921"
},
"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/de036ec91d55d2a9e0db2ba975b512cdb1c23921",
+ "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "ext-dom": "*",
+ "phpunit/phpunit": "^8.0"
},
"suggest": {
"ext-uopz": "*"
@@ -1605,7 +2226,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1628,33 +2249,44 @@
"keywords": [
"global state"
],
- "time": "2015-10-12 03:26:01"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2022-02-10T06:55:38+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "2.0.0",
+ "version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35"
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
},
"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/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
"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 +2306,97 @@
],
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:40:27+00:00"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
+ "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/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:37:18+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "2.0.0",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
},
"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/367dcba38d6e1977be014dc4b22f47a484dac7fb",
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
"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": {
@@ -1712,14 +2409,14 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
@@ -1727,29 +2424,39 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2016-11-19 07:33:16"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:34:24+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "1.0.0",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3"
},
"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/31d35ca87926450c44eae7e2611d45a7a65ea8b3",
+ "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3",
"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 +2476,73 @@
],
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:30:19+00:00"
+ },
+ {
+ "name": "sebastian/type",
+ "version": "1.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4",
+ "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.2"
+ },
+ "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",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/1.1.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:25:11+00:00"
},
{
"name": "sebastian/version",
@@ -1812,43 +2585,51 @@
],
"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"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/master"
+ },
+ "time": "2016-10-03T07:35:21+00:00"
},
{
- "name": "symfony/yaml",
- "version": "v3.2.1",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.24.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "a7095af4b97a0955f85c8989106c249fa649011f"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab"
},
"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/30885182c981ab175d4d034db0f6f469898070ab",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": ">=7.1"
},
- "require-dev": {
- "symfony/console": "~2.8|~3.0"
+ "provide": {
+ "ext-ctype": "*"
},
"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-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Yaml\\": ""
+ "Symfony\\Polyfill\\Ctype\\": ""
},
- "exclude-from-classmap": [
- "/Tests/"
+ "files": [
+ "bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -1857,43 +2638,120 @@
],
"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"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-10-20T20:35:02+00:00"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.2 || ^8.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",
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.2.0",
+ "version": "1.10.0",
"source": {
"type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^7.2 || ^8.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.10-dev"
}
},
"autoload": {
@@ -1917,7 +2775,11 @@
"check",
"validate"
],
- "time": "2016-11-23 20:04:58"
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.10.0"
+ },
+ "time": "2021-03-09T10:59:23+00:00"
}
],
"aliases": [],
@@ -1926,7 +2788,8 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": "^5.6 || ^7.0"
+ "php": ">=7.2"
},
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.2.0"
}
diff --git a/library/Xi/Netvisor/Filter/SalesInvoicesFilter.php b/library/Xi/Netvisor/Filter/SalesInvoicesFilter.php
new file mode 100644
index 0000000..c34c735
--- /dev/null
+++ b/library/Xi/Netvisor/Filter/SalesInvoicesFilter.php
@@ -0,0 +1,31 @@
+lastmodifiedstart = $date->format('Y-m-d');
+ }
+
+ public function setGreaterThanId(int $id)
+ {
+ $this->invoicesabovenetvisorkey = $id;
+ }
+}
diff --git a/library/Xi/Netvisor/Netvisor.php b/library/Xi/Netvisor/Netvisor.php
index 1697383..f336ebc 100644
--- a/library/Xi/Netvisor/Netvisor.php
+++ b/library/Xi/Netvisor/Netvisor.php
@@ -10,8 +10,12 @@
use Xi\Netvisor\Component\Validate;
use Xi\Netvisor\Resource\Xml\Component\Root;
use JMS\Serializer\Serializer;
+use Xi\Netvisor\Filter\SalesInvoicesFilter;
use Xi\Netvisor\Resource\Xml\Customer;
use Xi\Netvisor\Resource\Xml\SalesInvoice;
+use Xi\Netvisor\Resource\Xml\PurchaseInvoice;
+use Xi\Netvisor\Resource\Xml\PurchaseInvoiceState;
+use Xi\Netvisor\Resource\Xml\Voucher;
use Xi\Netvisor\Serializer\Naming\LowercaseNamingStrategy;
/**
@@ -97,6 +101,67 @@ public function sendCustomer(Customer $customer)
return $this->requestWithBody($customer, 'customer', ['method' => 'add']);
}
+ /**
+ * @param Voucher $voucher
+ * @return null|string
+ */
+ public function sendVoucher(Voucher $voucher)
+ {
+ return $this->requestWithBody($voucher, 'accounting');
+ }
+
+ /**
+ * @param PurchaseInvoice $invoice
+ * @return null|string
+ */
+ public function sendPurchaseInvoice(PurchaseInvoice $invoice)
+ {
+ return $this->requestWithBody($invoice, 'purchaseinvoice');
+ }
+
+ /**
+ * @param PurchaseInvoiceState $state
+ * @return null|string
+ */
+ public function updatePurchaseInvoiceState(PurchaseInvoiceState $state)
+ {
+ return $this->requestWithBody($state, 'purchaseinvoicepostingdata');
+ }
+
+ /**
+ * @param Customer $customer
+ * @param int $id
+ * @return null|string
+ */
+ public function updateCustomer(Customer $customer, int $id)
+ {
+ return $this->requestWithBody(
+ $customer,
+ 'customer',
+ [
+ 'method' => 'edit',
+ 'id' => $id,
+ ]
+ );
+ }
+
+ /**
+ * @param SalesInvoice $invoice
+ * @param int $id
+ * @return null|string
+ */
+ public function updateInvoice(SalesInvoice $invoice, int $id)
+ {
+ return $this->requestWithBody(
+ $invoice,
+ 'salesinvoice',
+ [
+ 'method' => 'edit',
+ 'id' => $id,
+ ]
+ );
+ }
+
/**
* List customers, optionally filtered by a keyword.
*
@@ -150,12 +215,97 @@ public function getProduct($id)
);
}
+ /**
+ * Get details for a invoice identified by Netvisor id.
+ *
+ * @param int $id
+ * @return null|string
+ */
+ public function getSalesInvoice($id)
+ {
+ return $this->get(
+ 'getsalesinvoice',
+ [
+ 'netvisorkey' => $id,
+ ]
+ );
+ }
+
+ /**
+ * Get sales invoices by filters
+ *
+ * @param SalesInvoicesFilter $salesInvoicesFilter
+ * @return null|string
+ */
+ public function getSalesInvoices(SalesInvoicesFilter $salesInvoicesFilter)
+ {
+ return $this->get(
+ 'salesinvoicelist',
+ $salesInvoicesFilter->getFilterArray()
+ );
+ }
+
+ /**
+ * Get details for a invoices identified by Netvisor id.
+ *
+ * @param int $id
+ * @return null|string
+ */
+ public function getPurchaseInvoice($id)
+ {
+ return $this->get(
+ 'getpurchaseinvoice',
+ [
+ 'netvisorkey' => $id,
+ ]
+ );
+ }
+
+ /**
+ * Get vouchers by timeframe
+ *
+ * @param DateTime $startDate
+ * @param DateTime $endDate
+ * @return null|string
+ */
+ public function getVouchers(\DateTime $startDate, \DateTime $endDate)
+ {
+ return $this->get(
+ 'accountingledger',
+ [
+ 'startdate' => $startDate->format('Y-m-d'),
+ 'enddate' => $endDate->format('Y-m-d'),
+ ]
+ );
+ }
+
+ /**
+ * Get details for a certain voucher from timeframe identified by Netvisor id.
+ *
+ * @param int $id
+ * @param DateTime $startDate
+ * @param DateTime $endDate
+ * @return null|string
+ */
+ public function getVoucher($id, \DateTime $startDate, \DateTime $endDate)
+ {
+ $response = new \SimpleXMLElement($this->getVouchers($startDate, $endDate));
+
+ foreach ($response->Vouchers->children() as $voucher) {
+ if ((int) $voucher->NetvisorKey === (int) $id) {
+ return $voucher->asXml();
+ }
+ }
+
+ return null;
+ }
+
/**
* @param string $service
* @param array $params
* @return null|string
*/
- private function get($service, array $params = [])
+ protected function get($service, array $params = [])
{
if (!$this->config->isEnabled()) {
return null;
@@ -215,7 +365,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/accounting.dtd b/library/Xi/Netvisor/Resource/Dtd/accounting.dtd
new file mode 100644
index 0000000..d0c8429
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Dtd/accounting.dtd
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
diff --git a/library/Xi/Netvisor/Resource/Dtd/purchaseinvoice.dtd b/library/Xi/Netvisor/Resource/Dtd/purchaseinvoice.dtd
new file mode 100644
index 0000000..c5526e7
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Dtd/purchaseinvoice.dtd
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
diff --git a/library/Xi/Netvisor/Resource/Dtd/purchaseinvoicepostingdata.dtd b/library/Xi/Netvisor/Resource/Dtd/purchaseinvoicepostingdata.dtd
new file mode 100644
index 0000000..767550b
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Dtd/purchaseinvoicepostingdata.dtd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
diff --git a/library/Xi/Netvisor/Resource/Xml/Component/AttributeElement.php b/library/Xi/Netvisor/Resource/Xml/Component/AttributeElement.php
index 821513d..eb783f3 100644
--- a/library/Xi/Netvisor/Resource/Xml/Component/AttributeElement.php
+++ b/library/Xi/Netvisor/Resource/Xml/Component/AttributeElement.php
@@ -26,4 +26,31 @@ public function __construct($value, $attributes)
$this->value = $value;
$this->attributes = $attributes;
}
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * @return array
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * @param string $attribute
+ * @param array $value
+ * @return self
+ */
+ public function setAttribute($attribute, $value)
+ {
+ $this->attributes[$attribute] = $value;
+ return $this;
+ }
}
diff --git a/library/Xi/Netvisor/Resource/Xml/Component/Root.php b/library/Xi/Netvisor/Resource/Xml/Component/Root.php
index 389ffd8..c81b2ed 100644
--- a/library/Xi/Netvisor/Resource/Xml/Component/Root.php
+++ b/library/Xi/Netvisor/Resource/Xml/Component/Root.php
@@ -2,8 +2,16 @@
namespace Xi\Netvisor\Resource\Xml\Component;
+use Doctrine\Common\Annotations\AnnotationRegistry;
+
abstract class Root
{
+ public function __construct()
+ {
+ // This is important for Doctrine annotation reader to work
+ AnnotationRegistry::registerLoader('class_exists');
+ }
+
/**
* File path to a DTD file
* which should be used for XML validation.
diff --git a/library/Xi/Netvisor/Resource/Xml/Customer.php b/library/Xi/Netvisor/Resource/Xml/Customer.php
index 84ec107..13dea99 100644
--- a/library/Xi/Netvisor/Resource/Xml/Customer.php
+++ b/library/Xi/Netvisor/Resource/Xml/Customer.php
@@ -16,6 +16,8 @@ public function __construct(
CustomerBaseInformation $customerBaseInformation,
CustomerFinvoiceDetails $customerFinvoiceDetails = null
) {
+ parent::__construct();
+
$this->customerBaseInformation = $customerBaseInformation;
$this->customerFinvoiceDetails = $customerFinvoiceDetails;
}
diff --git a/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php b/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
index 0b1223e..aa69151 100644
--- a/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
+++ b/library/Xi/Netvisor/Resource/Xml/CustomerBaseInformation.php
@@ -10,9 +10,11 @@ class CustomerBaseInformation
private $city;
private $postNumber;
private $country;
+ private $phonenumber;
+ private $email;
+ private $isprivatecustomer = 1;
/**
- * @param string $externalIdentifier
* @param string $name
* @param string $streetAddress
* @param string $city
@@ -20,18 +22,53 @@ class CustomerBaseInformation
* @param string $country
*/
public function __construct(
- $externalIdentifier,
$name,
$streetAddress,
$city,
$postNumber,
$country
) {
- $this->externalIdentifier = $externalIdentifier;
$this->name = $name;
$this->streetAddress = $streetAddress;
$this->city = $city;
$this->postNumber = $postNumber;
$this->country = $country;
}
+
+ /**
+ * @param string $number
+ * @return self
+ */
+ public function setPhoneNumber($number)
+ {
+ $this->phonenumber = $number;
+ return $this;
+ }
+
+ /**
+ * @param string $email
+ * @return self
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ return $this;
+ }
+
+ /**
+ * @param string $od
+ * @return self
+ */
+ public function setBusinessId($id)
+ {
+ $this->externalIdentifier = null;
+ $this->isprivatecustomer = 1;
+
+ if ($id) {
+ $this->externalIdentifier = $id;
+ $this->isprivatecustomer = 0;
+ }
+
+ return $this;
+ }
}
diff --git a/library/Xi/Netvisor/Resource/Xml/Dimension.php b/library/Xi/Netvisor/Resource/Xml/Dimension.php
new file mode 100644
index 0000000..6b74fe0
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/Dimension.php
@@ -0,0 +1,21 @@
+dimensionname = $dimensionname;
+ $this->dimensionitem = $dimensionitem;
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/PurchaseInvoice.php b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoice.php
new file mode 100644
index 0000000..a4752cd
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoice.php
@@ -0,0 +1,182 @@
+invoicenumber = $invoiceNumber;
+ $this->amount = round($amount, 2);
+
+ $this->invoicedate = new AttributeElement(
+ $invoiceDate->format('Y-m-d'),
+ array('format' => 'ansi')
+ );
+
+ $this->valuedate = new AttributeElement(
+ $valueDate->format('Y-m-d'),
+ array('format' => 'ansi')
+ );
+
+ $this->duedate = new AttributeElement(
+ $dueDate->format('Y-m-d'),
+ array('format' => 'ansi')
+ );
+ }
+
+ /**
+ * @param PurchaseInvoiceLine $line
+ * @return self
+ */
+ public function addPurchaseInvoiceLine(PurchaseInvoiceLine $line)
+ {
+ $this->purchaseinvoicelines[] = $line;
+ return $this;
+ }
+
+ /**
+ * @param PurchaseInvoiceAttachment $attachment
+ * @return self
+ */
+ public function addAttachment(PurchaseInvoiceAttachment $attachment)
+ {
+ $this->purchaseinvoiceattachments[] = $attachment;
+ return $this;
+ }
+
+ /**
+ * @param string $bankAccount
+ * @param string $businessId
+ * @param string $name
+ * @param string $streetAddress
+ * @param string $postNumber
+ * @param string $city
+ * @param string $countryCode
+ * @param string $phone
+ * @param string $email
+ *
+ * @return self
+ */
+ public function setVendorDetails(
+ $bankAccount = null,
+ $businessId = null,
+ $name = null,
+ $streetAddress = null,
+ $postNumber = null,
+ $city = null,
+ $countryCode = null,
+ $phone = null,
+ $email = null
+ ) {
+ $this->accountnumber = $bankAccount ?: null;
+ $this->organizationidentifier = $businessId ?: null;
+ $this->vendorname = $name ? substr($name, 0, 250) : null;
+ $this->vendoraddressline = $streetAddress ? substr($streetAddress, 0, 80) : null;
+ $this->vendorpostnumber = $postNumber ? substr($postNumber, 0, 50) : null;
+ $this->vendorcity = $city ? substr($city, 0, 50) : null;
+ $this->vendorcountry = $countryCode ? substr($countryCode, 0, 2) : null;
+ $this->vendorphonenumber = $phone ? substr($phone, 0, 80) : null;
+ $this->vendoremail = $email ? substr($email, 0, 80) : null;
+
+ return $this;
+ }
+
+ /**
+ * @param string $reference
+ * @return self
+ */
+ public function setBankReferenceNumber($reference)
+ {
+ $this->bankreferencenumber = $reference;
+ return $this;
+ }
+
+ /**
+ * @param string $comment
+ * @return self
+ */
+ public function setComment($comment)
+ {
+ $this->comment = substr($comment, 0, 255);
+ return $this;
+ }
+
+ /**
+ * @param string $source
+ * @return self
+ */
+ public function setInvoiceSource($source)
+ {
+ $allowed = [
+ static::INVOICE_SOURCE_FINVOICE,
+ static::INVOICE_SOURCE_MANUAL,
+ ];
+
+ if (!in_array($source, $allowed)) {
+ throw new \Exception('Invalid invoice source: ' . $source);
+ }
+
+ $this->invoicesource = $source;
+ return $this;
+ }
+
+ public function getDtdPath()
+ {
+ return $this->getDtdFile('purchaseinvoice.dtd');
+ }
+
+ protected function getXmlName()
+ {
+ return 'purchaseinvoice';
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachment.php b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachment.php
new file mode 100644
index 0000000..e69f830
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachment.php
@@ -0,0 +1,18 @@
+attachmentdescription = $description;
+ $this->filename = $filename;
+ $this->documentdata = base64_encode($documentdata);
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLine.php b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLine.php
new file mode 100644
index 0000000..856391c
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLine.php
@@ -0,0 +1,66 @@
+productname = substr($productName, 0, 200);
+ $this->deliveredamount = $deliveredAmount;
+ $this->unitprice = $unitPrice;
+ $this->vatpercent = $vatPercent;
+
+ $this->linesum = new AttributeElement(
+ round($lineSum, 2), array('type' => 'brutto')
+ );
+ }
+
+ /**
+ * @param string $name
+ * @param string $item
+ * @return self
+ */
+ public function addDimension($name, $item)
+ {
+ $this->dimensions[] = new Dimension($name, $item);
+ return $this;
+ }
+
+ /**
+ * @param int $account
+ * @return self
+ */
+ public function setAccountingAccount($account)
+ {
+ $this->accountingsuggestion = $account;
+ return $this;
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceState.php b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceState.php
new file mode 100644
index 0000000..ab16678
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/PurchaseInvoiceState.php
@@ -0,0 +1,39 @@
+purchaseinvoicenetvisorkey = $netvisorId;
+ $this->status = $status;
+ $this->isreadyforaccounting = (int) $isReadyForAccounting;
+ }
+
+ public function getDtdPath()
+ {
+ return $this->getDtdFile('purchaseinvoicepostingdata.dtd');
+ }
+
+ protected function getXmlName()
+ {
+ return 'purchaseinvoicepostingdata';
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php b/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
index 96c4229..e814ab4 100644
--- a/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
+++ b/library/Xi/Netvisor/Resource/Xml/SalesInvoice.php
@@ -12,10 +12,20 @@
*/
class SalesInvoice extends Root
{
+ private $salesinvoicenumber;
private $salesInvoiceDate;
+ private $salesinvoicereferencenumber;
private $salesInvoiceAmount;
private $salesInvoiceStatus;
+ private $salesinvoicefreetextbeforelines;
+ private $salesinvoicefreetextafterlines;
+ private $salesinvoiceyourreference;
private $invoicingCustomerIdentifier;
+ private $deliveryaddressname;
+ private $deliveryaddressline;
+ private $deliveryaddresspostnumber;
+ private $deliveryaddresstown;
+ private $deliveryaddresscountrycode;
private $paymentTermNetDays;
/**
@@ -37,6 +47,8 @@ public function __construct(
$invoicingCustomerIdentifier,
$paymentTermNetDays
) {
+ parent::__construct();
+
$this->salesInvoiceDate = $salesInvoiceDate->format('Y-m-d');
$this->salesInvoiceAmount = $salesInvoiceAmount;
$this->salesInvoiceStatus = new AttributeElement($salesInvoiceStatus, array('type' => 'netvisor'));
@@ -46,10 +58,103 @@ public function __construct(
/**
* @param SalesInvoiceProductLine $line
+ * @return self
*/
public function addSalesInvoiceProductLine(SalesInvoiceProductLine $line)
{
$this->invoiceLines[] = new WrapperElement('salesinvoiceproductline', $line);
+ return $this;
+ }
+
+ /**
+ * @param string $receiverName
+ * @param string $streetAddress
+ * @param string $postNumber
+ * @param string $town
+ * @param string $countryCode
+ * @return self
+ */
+ public function setDeliveryReceiverDetails(
+ $receiverName,
+ $streetAddress,
+ $postNumber,
+ $town,
+ $countryCode
+ ) {
+ $map = [
+ 'deliveryaddressname' => $receiverName,
+ 'deliveryaddressline' => $streetAddress,
+ 'deliveryaddresspostnumber' => $postNumber,
+ 'deliveryaddresstown' => $town,
+ 'deliveryaddresscountrycode' => $countryCode,
+ ];
+
+ foreach ($map as $xmlField => $value) {
+ if (!$value) {
+ $this->$xmlField = null;
+ continue;
+ }
+
+ $attributes = array();
+
+ if ($xmlField === 'deliveryaddresscountrycode') {
+ $attributes = array('type' => 'ISO-3316');
+ }
+
+ $this->$xmlField = new AttributeElement($value, $attributes);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @param string $invoiceNumber
+ * @return self
+ */
+ public function setInvoiceNumber($invoiceNumber)
+ {
+ $this->salesinvoicenumber = $invoiceNumber;
+ return $this;
+ }
+
+ /**
+ * @param string $referenceNumber
+ * @return self
+ */
+ public function setReferenceNumber($referenceNumber)
+ {
+ $this->salesinvoicereferencenumber = $referenceNumber;
+ return $this;
+ }
+
+ /**
+ * @param string $text
+ * @return self
+ */
+ public function setAfterLinesText($text)
+ {
+ $this->salesinvoicefreetextafterlines = substr($text, 0, 500);
+ return $this;
+ }
+
+ /**
+ * @param string $text
+ * @return self
+ */
+ public function setBeforeLinesText($text)
+ {
+ $this->salesinvoicefreetextbeforelines = substr($text, 0, 500);
+ return $this;
+ }
+
+ /**
+ * @param string $text
+ * @return self
+ */
+ public function setYourReference($text)
+ {
+ $this->salesinvoiceyourreference = $text;
+ return $this;
}
public function getDtdPath()
diff --git a/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
index 4886418..2915c93 100644
--- a/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
+++ b/library/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLine.php
@@ -2,15 +2,31 @@
namespace Xi\Netvisor\Resource\Xml;
+use JMS\Serializer\Annotation\XmlList;
use Xi\Netvisor\Resource\Xml\Component\AttributeElement;
class SalesInvoiceProductLine
{
+ public const PRODUCT_IDENTIFIER_TYPE_CUSTOMER = 'customer';
+ public const PRODUCT_IDENTIFIER_TYPE_NETVISOR = 'netvisor';
+ public const UNIT_PRICE_TYPE_WITH_VAT = 'gross';
+ public const UNIT_PRICE_TYPE_WITHOUT_VAT = 'net';
+ public const VAT_CODE_KOMY = 'KOMY';
+ public const VAT_CODE_NONE = 'NONE';
+
private $productIdentifier;
private $productName;
private $productUnitPrice;
private $productVatPercentage;
private $salesInvoiceProductLineQuantity;
+ private $salesInvoiceProductLineDiscountPercentage;
+ private $salesinvoiceproductlinefreetext;
+ private $accountingaccountsuggestion;
+
+ /**
+ * @XmlList(inline = true, entry = "dimension")
+ */
+ private $dimensions = [];
/**
* @param string $productIdentifier
@@ -26,10 +42,92 @@ public function __construct(
$productVatPercentage,
$salesInvoiceProductLineQuantity
) {
- $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->productIdentifier = new AttributeElement(
+ $productIdentifier,
+ array('type' => self::PRODUCT_IDENTIFIER_TYPE_NETVISOR)
+ );
+
+ $this->productName = substr($productName, 0, 200);
+
+ $this->productUnitPrice = new AttributeElement(
+ $productUnitPrice, array('type' => self::UNIT_PRICE_TYPE_WITHOUT_VAT)
+ );
+
+ $this->productVatPercentage = new AttributeElement(
+ $productVatPercentage, array('vatcode' => static::VAT_CODE_KOMY)
+ );
+
$this->salesInvoiceProductLineQuantity = $salesInvoiceProductLineQuantity;
}
+
+ /**
+ * @param string $name
+ * @param string $item
+ * @return self
+ */
+ public function addDimension($name, $item)
+ {
+ $this->dimensions[] = new Dimension($name, $item);
+ return $this;
+ }
+
+ /**
+ * @param string $type
+ * @return self
+ */
+ public function setProductIdentiefierType($type)
+ {
+ $this->productIdentifier->setAttribute('type', $type);
+ return $this;
+ }
+
+ /**
+ * @param string $type
+ * @return self
+ */
+ public function setUnitPriceType($type)
+ {
+ $this->productUnitPrice->setAttribute('type', $type);
+ return $this;
+ }
+
+ /**
+ * @param string $text
+ * @return self
+ */
+ public function setFreeText($text)
+ {
+ $this->salesinvoiceproductlinefreetext = $text;
+ return $this;
+ }
+
+ /**
+ * @param int $account
+ * @return self
+ */
+ public function setAccountingAccount($account)
+ {
+ $this->accountingaccountsuggestion = $account;
+ return $this;
+ }
+
+ /**
+ * @param string $code
+ * @return self
+ */
+ public function setVatCode($code)
+ {
+ $this->productVatPercentage->setAttribute('vatcode', $code);
+ return $this;
+ }
+
+ /**
+ * @param float $discountPercentage
+ * @return self
+ */
+ public function setDiscountPercentage($discountPercentage)
+ {
+ $this->salesInvoiceProductLineDiscountPercentage = $discountPercentage;
+ return $this;
+ }
}
diff --git a/library/Xi/Netvisor/Resource/Xml/Voucher.php b/library/Xi/Netvisor/Resource/Xml/Voucher.php
new file mode 100644
index 0000000..de7f034
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/Voucher.php
@@ -0,0 +1,84 @@
+voucherClass = $voucherClass;
+ $this->calculationMode = $calculationMode;
+ $this->voucherDate = new AttributeElement($voucherDate->format('Y-m-d'), array('format' => 'ansi'));
+ }
+
+ /**
+ * @param VoucherLine $line
+ * @return self
+ */
+ public function addVoucherLine(VoucherLine $line)
+ {
+ $this->voucherLines[] = $line;
+ return $this;
+ }
+
+ /**
+ * @param string $number
+ * @return self
+ */
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ return $this;
+ }
+
+ /**
+ * @param string $description
+ * @return self
+ */
+ public function setDescription($description)
+ {
+ $this->description = $description;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDtdPath()
+ {
+ return $this->getDtdFile('accounting.dtd');
+ }
+
+ /**
+ * @return string
+ */
+ protected function getXmlName()
+ {
+ return 'voucher';
+ }
+}
diff --git a/library/Xi/Netvisor/Resource/Xml/VoucherLine.php b/library/Xi/Netvisor/Resource/Xml/VoucherLine.php
new file mode 100644
index 0000000..4e3aa73
--- /dev/null
+++ b/library/Xi/Netvisor/Resource/Xml/VoucherLine.php
@@ -0,0 +1,72 @@
+lineSum = new AttributeElement($lineSum, array('type' => self::UNIT_PRICE_TYPE_WITHOUT_VAT));
+ $this->accountNumber = $accountNumber;
+ $this->vatPercent = new AttributeElement($vatPercent, array('vatcode' => static::VAT_CODE_KOMY));
+ }
+
+ /**
+ * @param string $name
+ * @param string $item
+ * @return self
+ */
+ public function addDimension($name, $item)
+ {
+ $this->dimensions[] = new Dimension($name, $item);
+ return $this;
+ }
+
+ /**
+ * @param string $type
+ * @return self
+ */
+ public function setLineSumType($type)
+ {
+ $this->lineSum->setAttribute('type', $type);
+ return $this;
+ }
+
+ /**
+ * @param string $code
+ * @return self
+ */
+ public function setVatCode($code)
+ {
+ $this->vatPercent->setAttribute('vatcode', $code);
+ return $this;
+ }
+
+ /**
+ * @param string $description
+ * @return self
+ */
+ public function setDescription($description)
+ {
+ $this->description = substr($description, 0, 255);
+ return $this;
+ }
+}
diff --git a/library/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategy.php b/library/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategy.php
index 6f08c28..ccc02b2 100644
--- a/library/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategy.php
+++ b/library/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategy.php
@@ -7,7 +7,7 @@
class LowercaseNamingStrategy implements PropertyNamingStrategyInterface
{
- public function translateName(PropertyMetadata $property)
+ public function translateName(PropertyMetadata $property): string
{
return strtolower($property->name);
}
diff --git a/tests/Xi/Netvisor/Component/RequestTest.php b/tests/Xi/Netvisor/Component/RequestTest.php
index b9cca36..faeb1ff 100644
--- a/tests/Xi/Netvisor/Component/RequestTest.php
+++ b/tests/Xi/Netvisor/Component/RequestTest.php
@@ -6,8 +6,10 @@
use Xi\Netvisor\Component\Request;
use Xi\Netvisor\Config;
use GuzzleHttp\Client;
+use PHPUnit\Framework\TestCase;
+use Xi\Netvisor\Exception\NetvisorException;
-class RequestTest extends \PHPUnit_Framework_TestCase
+class RequestTest extends TestCase
{
/**
* @var Request
@@ -19,7 +21,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
*/
private $client;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -91,10 +93,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(NetvisorException::class);
+ $this->expectExceptionMessage('AUTHENTICATION_FAILED :: Integraatiokumppania ei löydy, katso dokumentaatio');
$this->request->post(
'',
diff --git a/tests/Xi/Netvisor/Component/ValidateTest.php b/tests/Xi/Netvisor/Component/ValidateTest.php
index 71a9b17..e6ab097 100644
--- a/tests/Xi/Netvisor/Component/ValidateTest.php
+++ b/tests/Xi/Netvisor/Component/ValidateTest.php
@@ -13,7 +13,7 @@ class ValidateTest extends XmlTestCase
*/
private $validate;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
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/Filter/SalesInvoicesFilterTest.php b/tests/Xi/Netvisor/Filter/SalesInvoicesFilterTest.php
new file mode 100644
index 0000000..abb0870
--- /dev/null
+++ b/tests/Xi/Netvisor/Filter/SalesInvoicesFilterTest.php
@@ -0,0 +1,60 @@
+setModifiedAfterDate($datetime);
+ }
+
+ if ($setInvoiceAboveId) {
+ $filter->setGreaterThanId($id);
+ }
+
+ $filters = $filter->getFilterArray();
+ $this->assertCount($count, $filters);
+ }
+
+ public function provider()
+ {
+ return [
+ [
+ 'setId' => true,
+ 'setInvoicesAboveId' => true,
+ 'count' => 2,
+ ],
+ [
+ 'setId' => false,
+ 'setInvoicesAboveId' => true,
+ 'count' => 1,
+ ],
+ [
+ 'setId' => true,
+ 'setInvoicesAboveId' => false,
+ 'count' => 1,
+ ],
+ [
+ 'setId' => false,
+ 'setInvoicesAboveId' => false,
+ 'count' => 0,
+ ],
+ ];
+ }
+
+
+
+}
diff --git a/tests/Xi/Netvisor/NetvisorTest.php b/tests/Xi/Netvisor/NetvisorTest.php
index 4c4fe09..ae3fa05 100644
--- a/tests/Xi/Netvisor/NetvisorTest.php
+++ b/tests/Xi/Netvisor/NetvisorTest.php
@@ -5,12 +5,19 @@
use Xi\Netvisor\Component\Validate;
use Xi\Netvisor\Netvisor;
use Xi\Netvisor\Config;
+use Xi\Netvisor\Resource\Xml\Customer;
use Xi\Netvisor\Resource\Xml\SalesInvoice;
+use Xi\Netvisor\Resource\Xml\Voucher;
use GuzzleHttp\Client;
use Xi\Netvisor\Resource\Xml\TestResource;
use GuzzleHttp\Psr7\Response;
+use PHPUnit\Framework\TestCase;
+use Xi\Netvisor\Exception\NetvisorException;
+use Xi\Netvisor\Filter\SalesInvoicesFilter;
+use Xi\Netvisor\Resource\Xml\PurchaseInvoice;
+use Xi\Netvisor\Resource\Xml\PurchaseInvoiceState;
-class NetvisorTest extends \PHPUnit_Framework_TestCase
+class NetvisorTest extends TestCase
{
/**
* @var Netvisor
@@ -30,7 +37,7 @@ class NetvisorTest extends \PHPUnit_Framework_TestCase
/**
* @test
*/
- public function setUp()
+ public function setUp(): void
{
$this->client = $this->getMockBuilder('GuzzleHttp\Client')
->disableOriginalConstructor()
@@ -88,8 +95,8 @@ public function returnsNullIfNotEnabled()
*/
public function throwsIfXmlIsNotValid()
{
- $this->setExpectedException('Xi\Netvisor\Exception\NetvisorException', 'XML is not valid according to DTD');
-
+ $this->expectExceptionMessage('XML is not valid according to DTD');
+ $this->expectException(NetvisorException::class);
$this->netvisor->requestWithBody(new TestResource(), 'service', array(), null);
}
@@ -142,6 +149,10 @@ public function sendInvoiceSendsRequest()
->method('getDtdPath')
->will($this->returnValue(__DIR__ . '/Resource/Dtd/test.dtd'));
+ $invoice->expects($this->once())
+ ->method('getSerializableObject')
+ ->will($this->returnValue([]));
+
$this->assertEquals('lus', $netvisor->sendInvoice($invoice));
}
@@ -150,8 +161,271 @@ public function sendInvoiceSendsRequest()
*/
public function processInvoiceToWorkWithNetvisor()
{
- $xml = "\n";
+ $xml = "\n";
+
+ $this->assertEquals('', $this->netvisor->processXml($xml));
+ }
+
+ public function testUpdateCustomer()
+ {
+ // Expected params
+ $id = 12345;
+
+ $attributes = [
+ 'method' => 'edit',
+ 'id' => $id,
+ ];
+
+ $customerMock = $this
+ ->getMockBuilder(Customer::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ // Mock requestWithBody
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['requestWithBody'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('requestWithBody')
+ ->with($customerMock, 'customer', $attributes);
+
+ $netvisorMock->updateCustomer($customerMock, $id);
+ }
+
+ public function testUpdateInvoice()
+ {
+ // Expected params
+ $id = 12345;
+
+ $attributes = [
+ 'method' => 'edit',
+ 'id' => $id,
+ ];
+
+ $invoiceMock = $this
+ ->getMockBuilder(SalesInvoice::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ // Mock requestWithBody
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['requestWithBody'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('requestWithBody')
+ ->with($invoiceMock, 'salesinvoice', $attributes);
+
+ $netvisorMock->updateInvoice($invoiceMock, $id);
+ }
+
+ public function testSendVoucher()
+ {
+ $voucherMock = $this
+ ->getMockBuilder(Voucher::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ // Mock requestWithBody
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['requestWithBody'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('requestWithBody')
+ ->with($voucherMock, 'accounting');
+
+ $netvisorMock->sendVoucher($voucherMock);
+ }
+
+ public function testGetSalesInvoice()
+ {
+ $id = 1234564;
+
+ // @var Netvisor $netvisorMock
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['get'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('get')
+ ->with('getsalesinvoice', ['netvisorkey' => $id]);
+
+ $netvisorMock->getSalesInvoice($id);
+ }
+
+ public function testGetPurchaseInvoice()
+ {
+ $id = 123125;
+ $requestParams = ['netvisorkey' => $id];
+
+ // @var Netvisor $netvisorMock
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['get'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('get')
+ ->with('getpurchaseinvoice', $requestParams);
+
+ $netvisorMock->getPurchaseInvoice($id);
+ }
+
+ public function testGetVouchers()
+ {
+ $start = new \DateTime('2000-01-01');
+ $end = new \DateTime('2001-01-01');
+
+ // @var Netvisor $netvisorMock
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['get'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('get')
+ ->with(
+ 'accountingledger',
+ [
+ 'startdate' => $start->format('Y-m-d'),
+ 'enddate' => $end->format('Y-m-d'),
+ ]
+ );
+
+ $netvisorMock->getVouchers($start, $end);
+ }
+
+ public function testGetVoucher()
+ {
+ $id = 12345;
+ $start = new \DateTime('2000-01-01');
+ $end = new \DateTime('2001-01-01');
+
+ // @var Netvisor $netvisorMock
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['getVouchers'])
+ ->getMock();
+
+ $netvisorMock
+ ->method('getVouchers')
+ ->willReturn('
+
+
+
+
+ 54321
+
+
+
+
+ ' . $id . '
+
+
+
+ ');
+
+ // Not found
+ $result = $netvisorMock->getVoucher(999, $start, $end);
+ $this->assertNull($result);
+
+ // Found
+ $result = $netvisorMock->getVoucher($id, $start, $end);
+ $voucher = new \SimpleXMLElement($result);
+
+ $this->assertSame((int) $voucher->NetvisorKey, $id);
+ }
+
+ public function testSendPurchaseInvoice()
+ {
+ $purchaseInvoiceMock = $this
+ ->getMockBuilder(PurchaseInvoice::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ // Mock requestWithBody
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['requestWithBody'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('requestWithBody')
+ ->with($purchaseInvoiceMock, 'purchaseinvoice');
+
+ $netvisorMock->sendPurchaseInvoice($purchaseInvoiceMock);
+ }
+
+ public function testUpdatePurchaseInvoiceState()
+ {
+ $purchaseInvoiceStateMock = $this
+ ->getMockBuilder(PurchaseInvoiceState::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ // Mock requestWithBody
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['requestWithBody'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('requestWithBody')
+ ->with($purchaseInvoiceStateMock, 'purchaseinvoicepostingdata');
+
+ $netvisorMock->updatePurchaseInvoiceState($purchaseInvoiceStateMock);
+ }
+
+ public function testGetSalesInvoices()
+ {
+ $date = new \DateTime('2000-01-01');
+ $lastInvoiceId = 200;
+
+ $filter = new SalesInvoicesFilter();
+ $filter->setGreaterThanId($lastInvoiceId);
+ $filter->setModifiedAfterDate($date);
+
+ // @var Netvisor $netvisorMock
+ $netvisorMock = $this
+ ->getMockBuilder(Netvisor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['get'])
+ ->getMock();
+
+ $netvisorMock
+ ->expects($this->once())
+ ->method('get')
+ ->with(
+ 'salesinvoicelist',
+ [
+ 'lastmodifiedstart' => $date->format('Y-m-d'),
+ 'invoicesabovenetvisorkey' => $lastInvoiceId,
+ ]
+ );
- $this->assertEquals('2014-02-17', $this->netvisor->processXml($xml));
+ $netvisorMock->getSalesInvoices($filter);
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/Component/AttributeElementTest.php b/tests/Xi/Netvisor/Resource/Xml/Component/AttributeElementTest.php
new file mode 100644
index 0000000..fe3187d
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/Component/AttributeElementTest.php
@@ -0,0 +1,38 @@
+ 'Attribute'
+ ];
+
+ $attributeElement = new AttributeElement(
+ $value,
+ $attributes
+ );
+
+ $this->assertSame($value, $attributeElement->getValue());
+ $this->assertSame($attributes, $attributeElement->getAttributes());
+ }
+
+ public function testSetAttribute()
+ {
+ $key = 'test';
+ $attribute = 'First Attribute';
+
+ $attributeElement = new AttributeElement('', [$key => $attribute]);
+ $this->assertSame($attribute, $attributeElement->getAttributes()[$key]);
+
+ $attribute = 'Second Attribute';
+ $attributeElement->setAttribute($key, $attribute);
+ $this->assertSame($attribute, $attributeElement->getAttributes()[$key]);
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php b/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
index e19a078..bbc3580 100644
--- a/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/CustomerTest.php
@@ -2,10 +2,8 @@
namespace Xi\Netvisor\Resource\Xml;
-use Xi\Netvisor\Component\Validate;
-use Xi\Netvisor\Resource\Xml\Component\AttributeElement;
-use Xi\Netvisor\Resource\Xml\Component\WrapperElement;
use Xi\Netvisor\Resource\Xml\Customer;
+use Xi\Netvisor\Resource\Xml\CustomerBaseInformation;
use Xi\Netvisor\XmlTestCase;
class CustomerTest extends XmlTestCase
@@ -15,21 +13,24 @@ class CustomerTest extends XmlTestCase
*/
private $customer;
- public function setUp()
+ /**
+ * @var CustomerBaseInformation
+ */
+ private $baseInformation;
+
+ public function setUp(): void
{
parent::setUp();
- $this->customer = new Customer(
- new CustomerBaseInformation(
- '1234567-1',
- 'Testi Oy',
- 'Testikatu 1',
- 'Helsinki',
- '00240',
- 'FI'
- ),
- null
+ $this->baseInformation = new CustomerBaseInformation(
+ 'Testi Oy',
+ 'Testikatu 1',
+ 'Helsinki',
+ '00240',
+ 'FI'
);
+
+ $this->customer = new Customer($this->baseInformation, null);
}
/**
@@ -47,7 +48,53 @@ public function xmlHasRequiredValues()
{
$xml = $this->toXml($this->customer->getSerializableObject());
- $this->assertXmlContainsTagWithValue('externalidentifier', '1234567-1', $xml);
$this->assertXmlContainsTagWithValue('name', 'Testi Oy', $xml);
+ $this->assertXmlIsValid($xml, $this->customer->getDtdPath());
+ }
+
+ public function testSetPhoneNumber()
+ {
+ $number = '0501234567';
+ $this->baseInformation->setPhoneNumber($number);
+ $xml = $this->toXml($this->customer->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('phonenumber', $number, $xml);
+ }
+
+ public function testSetEmail()
+ {
+ $email = 'asdf@asdf.fi';
+ $this->baseInformation->setEmail($email);
+ $xml = $this->toXml($this->customer->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('email', $email, $xml);
+ }
+
+ /**
+ * @dataProvider businessIdProvider
+ */
+ public function testSetBusinessId($id)
+ {
+ if (!is_null($id)) {
+ $this->baseInformation->setBusinessId($id);
+ }
+
+ $xml = $this->toXml($this->customer->getSerializableObject());
+
+ if (!$id) {
+ $this->assertXmlDoesNotContainTag('externalidentifier', $xml);
+ $this->assertXmlContainsTagWithValue('isprivatecustomer', 1, $xml);
+ return;
+ }
+
+ $this->assertXmlContainsTagWithValue('externalidentifier', $id, $xml);
+ $this->assertXmlContainsTagWithValue('isprivatecustomer', 0, $xml);
+ }
+
+ public function businessIdProvider()
+ {
+ return [
+ ['9-876543'],
+ [''],
+ [null],
+ ];
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachmentTest.php b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachmentTest.php
new file mode 100644
index 0000000..857971f
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceAttachmentTest.php
@@ -0,0 +1,48 @@
+attachment = new PurchaseInvoiceAttachment(
+ 'application/pdf',
+ 'PDF',
+ 'filename.pdf',
+ 'data'
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasRequiredSalesInvoiceValues()
+ {
+ $description = 'description';
+ $filename = 'filename.pdf';
+ $data = 'data';
+
+ $attachment = new PurchaseInvoiceAttachment(
+ $description,
+ $filename,
+ $data
+ );
+
+ $xml = $this->toXml($attachment);
+
+ $this->assertXmlContainsTagWithValue('mimetype', 'application/pdf', $xml);
+ $this->assertXmlContainsTagWithValue('attachmentdescription', $description, $xml);
+ $this->assertXmlContainsTagWithValue('filename', $filename, $xml);
+ $this->assertXmlContainsTagWithValue('documentdata', base64_encode($data), $xml);
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLineTest.php b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLineTest.php
new file mode 100644
index 0000000..24549b2
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceLineTest.php
@@ -0,0 +1,92 @@
+invoiceLine = new PurchaseInvoiceLine(
+ '100',
+ 'Name',
+ '1,23',
+ '24',
+ '5'
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasRequiredLineValues()
+ {
+ $name = 'Product name, which is longer than the limit of 200 characters Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum.';
+ $amount = 2;
+ $unitPrice = 10;
+ $vatPercent = 24;
+ $lineSum = 100.456;
+
+ $xml = $this->toXml(
+ new PurchaseInvoiceLine(
+ $name,
+ $amount,
+ $unitPrice,
+ $vatPercent,
+ $lineSum
+ )
+ );
+
+ $this->assertXmlContainsTagWithValue('productname', substr($name, 0, 200), $xml);
+ $this->assertNotContains($name, $xml);
+
+ $this->assertXmlContainsTagWithValue('deliveredamount', $amount, $xml);
+ $this->assertXmlContainsTagWithValue('unitprice', $unitPrice, $xml);
+ $this->assertXmlContainsTagWithValue('vatpercent', $vatPercent, $xml);
+
+ $this->assertXmlContainsTagWithValue('linesum', round($lineSum, 2), $xml);
+ $this->assertNotContains((string) $lineSum, $xml);
+ $this->assertXmlContainsTagWithAttributes('linesum', array('type' => 'brutto'), $xml);
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasAddedDimensionLines()
+ {
+ $name = 'Test dimension name';
+ $item = 'Test dimension item';
+ $name2 = 'Another test dimension name';
+ $item2 = 'Another test dimension item';
+
+ $this->invoiceLine->addDimension($name, $item);
+ $this->invoiceLine->addDimension($name2, $item2);
+
+ $xml = $this->toXml($this->invoiceLine);
+
+ $this->assertSame(2, substr_count($xml, ''));
+ $this->assertContains($name, $xml);
+ $this->assertContains($item, $xml);
+ $this->assertContains($name2, $xml);
+ $this->assertContains($item, $xml);
+ }
+
+ public function testSetAccountingAccount()
+ {
+ $account = 3000;
+ $this->invoiceLine->setAccountingAccount($account);
+
+ $xml = $this->toXml($this->invoiceLine);
+
+ $this->assertXmlContainsTagWithValue('accountingsuggestion', $account, $xml);
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceStateTest.php b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceStateTest.php
new file mode 100644
index 0000000..16b2d79
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceStateTest.php
@@ -0,0 +1,48 @@
+invoiceState = new PurchaseInvoiceState(123, 'approved', false);
+ }
+
+ /**
+ * @test
+ */
+ public function hasDtd()
+ {
+ $this->assertNotNull($this->invoiceState->getDtdPath());
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasRequiredSalesInvoiceValues()
+ {
+ $netvisorId = 123;
+ $status = 'approved';
+ $readyForAccounting = false;
+
+ $invoiceState = new PurchaseInvoiceState($netvisorId, $status, $readyForAccounting);
+
+ $xml = $this->toXml($invoiceState->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('purchaseinvoicenetvisorkey', $netvisorId, $xml);
+ $this->assertXmlContainsTagWithValue('status', $status, $xml);
+ $this->assertXmlContainsTagWithValue('isreadyforaccounting', (int) $readyForAccounting, $xml);
+
+ $this->assertXmlIsValid($xml, $invoiceState->getDtdPath());
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceTest.php b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceTest.php
new file mode 100644
index 0000000..e79f17f
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/PurchaseInvoiceTest.php
@@ -0,0 +1,300 @@
+invoice = new PurchaseInvoice(
+ 123,
+ new \DateTime(),
+ new \DateTime(),
+ new \DateTime(),
+ 321
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function hasDtd()
+ {
+ $this->assertNotNull($this->invoice->getDtdPath());
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasRequiredSalesInvoiceValues()
+ {
+ $invoiceNumber = 123;
+ $invoiceDate = new \DateTime('2000-01-01');
+ $valueDate = new \DateTime('2001-01-01');
+ $dueDate = new \DateTime('2001-01-01');
+ $amount = 321.278;
+
+ $invoice = new PurchaseInvoice(
+ $invoiceNumber,
+ $invoiceDate,
+ $valueDate,
+ $dueDate,
+ $amount
+ );
+
+ $xml = $this->toXml($invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('invoicenumber', $invoiceNumber, $xml);
+
+ $this->assertXmlContainsTagWithValue('invoicedate', $invoiceDate->format('Y-m-d'), $xml);
+ $this->assertXmlContainsTagWithAttributes('invoicedate', array('format' => 'ansi'), $xml);
+
+ $this->assertXmlContainsTagWithValue('valuedate', $valueDate->format('Y-m-d'), $xml);
+ $this->assertXmlContainsTagWithAttributes('valuedate', array('format' => 'ansi'), $xml);
+
+ $this->assertXmlContainsTagWithValue('duedate', $dueDate->format('Y-m-d'), $xml);
+ $this->assertXmlContainsTagWithAttributes('duedate', array('format' => 'ansi'), $xml);
+
+ $this->assertXmlContainsTagWithValue('amount', round($amount, 2), $xml);
+ $this->assertNotContains((string) $amount, $xml);
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasAddedPurchaseInvoiceLines()
+ {
+ $this->invoice->addPurchaseInvoiceLine(
+ new PurchaseInvoiceLine('Name 1', 1, 1, 24, 1.24)
+ );
+
+ $this->invoice->addPurchaseInvoiceLine(
+ new PurchaseInvoiceLine('Name 2', 2, 2, 24, 4.96)
+ );
+
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertContains('purchaseinvoicelines', $xml);
+ $this->assertContains('purchaseinvoiceline', $xml);
+
+ $this->assertXmlContainsTagWithValue('productname', 'Name 1', $xml);
+ $this->assertXmlContainsTagWithValue('productname', 'Name 2', $xml);
+
+ $this->assertXmlIsValid($xml, $this->invoice->getDtdPath());
+ }
+
+ public function testAddAttachment()
+ {
+ $this->invoice->addAttachment(
+ new PurchaseInvoiceAttachment('Desc 1', 'File 1', 'Data 1')
+ );
+
+ $this->invoice->addAttachment(
+ new PurchaseInvoiceAttachment('Desc 2', 'File 2', 'Data 2')
+ );
+
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertContains('purchaseinvoiceattachments', $xml);
+ $this->assertContains('purchaseinvoiceattachment', $xml);
+
+ $this->assertXmlContainsTagWithValue('attachmentdescription', 'Desc 1', $xml);
+ $this->assertXmlContainsTagWithValue('attachmentdescription', 'Desc 2', $xml);
+
+ $this->assertXmlIsValid($xml, $this->invoice->getDtdPath());
+ }
+
+ public function testSetComment()
+ {
+ $comment = 'Some additional data';
+
+ $this->invoice->setComment($comment);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('comment', $comment, $xml);
+
+ // Too long
+ while (strlen($comment) <= 255) {
+ $comment .= $comment;
+ }
+
+ $this->invoice->setComment($comment);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('comment', substr($comment, 0, 255), $xml);
+ $this->assertNotContains($comment, $xml);
+ }
+
+ /**
+ * @dataProvider setVendorDetailsProvider
+ */
+ public function testSetVendorDetails(
+ $bankAccount,
+ $businessId,
+ $name,
+ $streetAddress,
+ $postNumber,
+ $city,
+ $countryCode,
+ $phone,
+ $email
+ ) {
+ $this->invoice->setVendorDetails(
+ $bankAccount,
+ $businessId,
+ $name,
+ $streetAddress,
+ $postNumber,
+ $city,
+ $countryCode,
+ $phone,
+ $email
+ );
+
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $map = [
+ 'accountnumber' => [
+ 'value' => $bankAccount,
+ 'maxlength' => null,
+ ],
+ 'organizationidentifier' => [
+ 'value' => $businessId,
+ 'maxlength' => null,
+ ],
+ 'vendorname' => [
+ 'value' => $name,
+ 'maxlength' => 250,
+ ],
+ 'vendoraddressline' => [
+ 'value' => $streetAddress,
+ 'maxlength' => 80,
+ ],
+ 'vendorpostnumber' => [
+ 'value' => $postNumber,
+ 'maxlength' => 50,
+ ],
+ 'vendorcity' => [
+ 'value' => $city,
+ 'maxlength' => 50,
+ ],
+ 'vendorcountry' => [
+ 'value' => $countryCode,
+ 'maxlength' => 2,
+ ],
+ 'vendorphonenumber' => [
+ 'value' => $phone,
+ 'maxlength' => 80,
+ ],
+ 'vendoremail' => [
+ 'value' => $email,
+ 'maxlength' => 80,
+ ],
+ ];
+
+ foreach ($map as $key => $data) {
+ if (!$data['value']) {
+ $this->assertXmlDoesNotContainTag($key, $xml);
+ continue;
+ }
+
+ $value = !is_null($data['maxlength']) ?
+ substr($data['value'], 0, $data['maxlength']) :
+ $data['value'];
+
+ $this->assertXmlContainsTagWithValue($key, $value, $xml);
+ }
+ }
+
+ public function setVendorDetailsProvider()
+ {
+ return [
+ [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ ],
+ [
+ '',
+ '',
+ '',
+ '',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ],
+ [
+ '12315456',
+ '448414-4',
+ 'Vendor name',
+ 'Address 13',
+ '012345',
+ 'Vendor city',
+ 'FI',
+ '0501234567',
+ 'vendor@email.com',
+ ],
+ [
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ str_repeat('1', 300),
+ ],
+ ];
+ }
+
+ public function testSetBankReferenceNumber()
+ {
+ $reference = '0123154891315';
+
+ $this->invoice->setBankReferenceNumber($reference);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('bankreferencenumber', $reference, $xml);
+ }
+
+ /**
+ * @dataProvider setInvoiceSourceProvider
+ */
+ public function testSetInvoiceSource($source, $expectException)
+ {
+ if ($expectException) {
+ $this->expectException(\Exception::class);
+ }
+
+ $this->invoice->setInvoiceSource($source);
+
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('invoicesource', $source, $xml);
+ }
+
+ public function setInvoiceSourceProvider()
+ {
+ return [
+ [PurchaseInvoice::INVOICE_SOURCE_FINVOICE, false],
+ [PurchaseInvoice::INVOICE_SOURCE_MANUAL, false],
+ ['Something else', true],
+ ];
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
index 0599857..86dc2db 100644
--- a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceProductLineTest.php
@@ -7,18 +7,19 @@
class SalesInvoiceProductLineTest extends XmlTestCase
{
+ private const LONG_PRODUCT_NAmE = 'Product name, which is longer than the limit of 200 characters Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum. Will add some lirum larum.';
/**
* @var SalesInvoiceProductLine
*/
private $invoiceProductLine;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
$this->invoiceProductLine = new SalesInvoiceProductLine(
'100',
- 'Product name, which is longer than the limit of 50 characters',
+ static::LONG_PRODUCT_NAmE,
'1,23',
'24',
'5'
@@ -35,8 +36,8 @@ public function xmlHasRequiredProductLineValues()
$this->assertXmlContainsTagWithValue('productidentifier', '100', $xml);
$this->assertXmlContainsTagWithAttributes('productidentifier', array('type' => 'netvisor'), $xml);
- $this->assertXmlContainsTagWithValue('productname', 'Product name, which is longer than the limit of 50', $xml);
- $this->assertNotContains('Product name, which is longer than the limit of 50 characters', $xml);
+ $this->assertXmlContainsTagWithValue('productname', substr(static::LONG_PRODUCT_NAmE, 0, 200), $xml);
+ $this->assertNotContains(static::LONG_PRODUCT_NAmE, $xml);
$this->assertXmlContainsTagWithValue('productunitprice', '1,23', $xml);
$this->assertXmlContainsTagWithAttributes('productunitprice', array('type' => 'net'), $xml);
@@ -44,6 +45,144 @@ public function xmlHasRequiredProductLineValues()
$this->assertXmlContainsTagWithValue('productvatpercentage', '24', $xml);
$this->assertXmlContainsTagWithAttributes('productvatpercentage', array('vatcode' => 'KOMY'), $xml);
- $this->assertXmlContainsTagWithValue('salesinvoiceproductlinequantity', 5, $xml);
+ $this->assertXmlContainsTagWithValue('salesinvoiceproductlinequantity', '5', $xml);
+ }
+
+ /**
+ * @test
+ */
+ public function xmlHasAddedDimensionLines()
+ {
+ $name = 'Test dimension name';
+ $item = 'Test dimension item';
+ $name2 = 'Another test dimension name';
+ $item2 = 'Another test dimension item';
+
+ $this->invoiceProductLine->addDimension($name, $item);
+ $this->invoiceProductLine->addDimension($name2, $item2);
+
+ $xml = $this->toXml($this->invoiceProductLine);
+
+ $this->assertSame(2, substr_count($xml, ''));
+ $this->assertContains($name, $xml);
+ $this->assertContains($item, $xml);
+ $this->assertContains($name2, $xml);
+ $this->assertContains($item, $xml);
+ }
+
+ /**
+ * @dataProvider productIdentifierTypeProvider
+ */
+ public function testSetProductIdentifierType($type)
+ {
+ // Default
+ $xml = $this->toXml($this->invoiceProductLine);
+ $this->assertXmlContainsTagWithAttributes(
+ 'productidentifier',
+ array('type' => SalesInvoiceProductLine::PRODUCT_IDENTIFIER_TYPE_NETVISOR),
+ $xml
+ );
+
+ // Setted value
+ $this->invoiceProductLine->setProductIdentiefierType($type);
+ $xml = $this->toXml($this->invoiceProductLine);
+ $this->assertXmlContainsTagWithAttributes('productidentifier', array('type' => $type), $xml);
+ }
+
+ public function productIdentifierTypeProvider()
+ {
+ return [
+ [SalesInvoiceProductLine::PRODUCT_IDENTIFIER_TYPE_CUSTOMER],
+ [SalesInvoiceProductLine::PRODUCT_IDENTIFIER_TYPE_NETVISOR],
+ ];
+ }
+
+ /**
+ * @dataProvider unitPriceTypeProvider
+ */
+ public function testSetUnitPriceType($type)
+ {
+ // Default
+ $xml = $this->toXml($this->invoiceProductLine);
+ $this->assertXmlContainsTagWithAttributes(
+ 'productunitprice',
+ array('type' => SalesInvoiceProductLine::UNIT_PRICE_TYPE_WITHOUT_VAT),
+ $xml
+ );
+
+ // Setted value
+ $this->invoiceProductLine->setUnitPriceType($type);
+ $xml = $this->toXml($this->invoiceProductLine);
+ $this->assertXmlContainsTagWithAttributes('productunitprice', array('type' => $type), $xml);
+ }
+
+ public function unitPriceTypeProvider()
+ {
+ return [
+ [SalesInvoiceProductLine::UNIT_PRICE_TYPE_WITH_VAT],
+ [SalesInvoiceProductLine::UNIT_PRICE_TYPE_WITHOUT_VAT],
+ ];
+ }
+
+ public function testSetFreeText()
+ {
+ $text = 'Additional information';
+ $this->invoiceProductLine->setFreeText($text);
+
+ $xml = $this->toXml($this->invoiceProductLine);
+
+ $this->assertXmlContainsTagWithValue('salesinvoiceproductlinefreetext', $text, $xml);
+ }
+
+ public function testSetAccountingAccount()
+ {
+ $account = 2000;
+ $this->invoiceProductLine->setAccountingAccount($account);
+
+ $xml = $this->toXml($this->invoiceProductLine);
+
+ $this->assertXmlContainsTagWithValue('accountingaccountsuggestion', $account, $xml);
+ }
+
+ /**
+ * @dataProvider setVatCodeProvider
+ */
+ public function testSetVatCode($code)
+ {
+ // Default
+ $xml = $this->toXml($this->invoiceProductLine);
+ $this->assertXmlContainsTagWithAttributes(
+ 'productvatpercentage',
+ array('vatcode' => SalesInvoiceProductLine::VAT_CODE_KOMY),
+ $xml
+ );
+
+ // Setted value
+ $this->invoiceProductLine->setVatCode($code);
+ $xml = $this->toXml($this->invoiceProductLine);
+
+ $this->assertXmlContainsTagWithAttributes(
+ 'productvatpercentage',
+ array('vatcode' => $code),
+ $xml
+ );
+ }
+
+ public function setVatCodeProvider()
+ {
+ return [
+ [SalesInvoiceProductLine::VAT_CODE_KOMY],
+ [SalesInvoiceProductLine::VAT_CODE_NONE],
+ ];
+ }
+
+ public function testSetDiscountPercentage()
+ {
+ $discountPercentage = 20;
+ $this->invoiceProductLine->setDiscountPercentage($discountPercentage);
+
+ $xml = $this->toXml($this->invoiceProductLine);
+
+ $this->assertXmlContainsTagWithValue('salesinvoiceproductlinediscountpercentage', $discountPercentage, $xml);
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
index cd8a379..8c3a27e 100644
--- a/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
+++ b/tests/Xi/Netvisor/Resource/Xml/SalesInvoiceTest.php
@@ -2,9 +2,6 @@
namespace Xi\Netvisor\Resource\Xml;
-use Xi\Netvisor\Component\Validate;
-use Xi\Netvisor\Resource\Xml\Component\AttributeElement;
-use Xi\Netvisor\Resource\Xml\Component\WrapperElement;
use Xi\Netvisor\Resource\Xml\SalesInvoice;
use Xi\Netvisor\XmlTestCase;
@@ -15,7 +12,7 @@ class SalesInvoiceTest extends XmlTestCase
*/
private $invoice;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -69,5 +66,121 @@ public function xmlHasAddedSalesInvoiceProductLines()
$this->assertXmlContainsTagWithValue('productidentifier', '1', $xml);
$this->assertXmlContainsTagWithValue('productidentifier', '2', $xml);
+
+ $this->assertXmlIsValid($xml, $this->invoice->getDtdPath());
+ }
+
+ public function testSetDeliveryReceiverDetails()
+ {
+ $receiverName = 'Receiver';
+ $streetAddress = 'Street address';
+ $postNumber = '12345';
+ $town = 'Town';
+ $countryCode = 'FI';
+
+ // With all values
+ $this->invoice->setDeliveryReceiverDetails(
+ $receiverName,
+ $streetAddress,
+ $postNumber,
+ $town,
+ $countryCode
+ );
+
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('deliveryaddressname', $receiverName, $xml);
+ $this->assertXmlContainsTagWithValue('deliveryaddressline', $streetAddress, $xml);
+ $this->assertXmlContainsTagWithValue('deliveryaddresspostnumber', $postNumber, $xml);
+ $this->assertXmlContainsTagWithValue('deliveryaddresstown', $town, $xml);
+ $this->assertXmlContainsTagWithValue('deliveryaddresscountrycode', $countryCode, $xml);
+
+ $this->assertXmlContainsTagWithAttributes(
+ 'deliveryaddresscountrycode',
+ array('type' => 'ISO-3316'),
+ $xml
+ );
+
+ // Test with string, null or empty values
+ $this->invoice->setDeliveryReceiverDetails($receiverName, null, '', null, '');
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('deliveryaddressname', $receiverName, $xml);
+ $this->assertNotContains('deliveryaddressline', $xml);
+ $this->assertNotContains('deliveryaddresspostnumber', $xml);
+ $this->assertNotContains('deliveryaddresstown', $xml);
+ $this->assertNotContains('deliveryaddresscountrycode', $xml);
+ }
+
+ public function testSetInvoiceNumber()
+ {
+ $invoiceNumber = '0123456';
+
+ $this->invoice->setInvoiceNumber($invoiceNumber);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('salesinvoicenumber', $invoiceNumber, $xml);
+ }
+
+ public function testSetReferenceNumber()
+ {
+ $referenceNumber = '0987654';
+
+ $this->invoice->setReferenceNumber($referenceNumber);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue(
+ 'salesinvoicereferencenumber',
+ $referenceNumber,
+ $xml
+ );
+ }
+
+ public function testSetBeforeLinesText()
+ {
+ $text = 'Some additional data';
+
+ $this->invoice->setBeforeLinesText($text);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('salesinvoicefreetextbeforelines', $text, $xml);
+
+ // Too long
+ while (strlen($text) <= 500) {
+ $text .= $text;
+ }
+
+ $this->invoice->setBeforeLinesText($text);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('salesinvoicefreetextbeforelines', substr($text, 0, 500), $xml);
+ $this->assertNotContains($text, $xml);
+ }
+
+ public function testSetAfterLinesText()
+ {
+ $text = 'Some additional data';
+
+ $this->invoice->setAfterLinesText($text);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('salesinvoicefreetextafterlines', $text, $xml);
+
+ // Too long
+ while (strlen($text) <= 500) {
+ $text .= $text;
+ }
+
+ $this->invoice->setAfterLinesText($text);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('salesinvoicefreetextafterlines', substr($text, 0, 500), $xml);
+ $this->assertNotContains($text, $xml);
+ }
+
+ public function testSetYourReference()
+ {
+ $text = 'Some reference data';
+
+ $this->invoice->setYourReference($text);
+ $xml = $this->toXml($this->invoice->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('salesinvoiceyourreference', $text, $xml);
}
}
diff --git a/tests/Xi/Netvisor/Resource/Xml/VoucherLineTest.php b/tests/Xi/Netvisor/Resource/Xml/VoucherLineTest.php
new file mode 100644
index 0000000..65d3605
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/VoucherLineTest.php
@@ -0,0 +1,145 @@
+voucherLine = new VoucherLine(0, 0, 0);
+ }
+
+ public function testXmlHasRequiredValues()
+ {
+ $lineSum = 123;
+ $account = 321;
+ $vatPercent = 24;
+
+ $voucherLine = new VoucherLine($lineSum, $account, $vatPercent);
+
+ $xml = $this->toXml($voucherLine);
+
+ $this->assertXmlContainsTagWithValue('linesum', $lineSum, $xml);
+ $this->assertXmlContainsTagWithAttributes(
+ 'linesum',
+ array('type' => VoucherLine::UNIT_PRICE_TYPE_WITHOUT_VAT),
+ $xml
+ );
+
+ $this->assertXmlContainsTagWithValue('accountnumber', $account, $xml);
+
+ $this->assertXmlContainsTagWithValue('vatpercent', $vatPercent, $xml);
+ $this->assertXmlContainsTagWithAttributes(
+ 'vatpercent',
+ array('vatcode' => VoucherLine::VAT_CODE_KOMY),
+ $xml
+ );
+ }
+
+ public function testXmlHasAddedDimensionLines()
+ {
+ $name = 'Test dimension name';
+ $item = 'Test dimension item';
+ $name2 = 'Another test dimension name';
+ $item2 = 'Another test dimension item';
+
+ $this->voucherLine->addDimension($name, $item);
+ $this->voucherLine->addDimension($name2, $item2);
+
+ $xml = $this->toXml($this->voucherLine);
+
+ $this->assertSame(2, substr_count($xml, ''));
+ $this->assertContains($name, $xml);
+ $this->assertContains($item, $xml);
+ $this->assertContains($name2, $xml);
+ $this->assertContains($item, $xml);
+ }
+
+ /**
+ * @dataProvider lineSumTypeProvider
+ */
+ public function testSetLineSumType($type)
+ {
+ // Default
+ $xml = $this->toXml($this->voucherLine);
+ $this->assertXmlContainsTagWithAttributes(
+ 'linesum',
+ array('type' => VoucherLine::UNIT_PRICE_TYPE_WITHOUT_VAT),
+ $xml
+ );
+
+ // Setted value
+ $this->voucherLine->setLineSumType($type);
+ $xml = $this->toXml($this->voucherLine);
+ $this->assertXmlContainsTagWithAttributes('linesum', array('type' => $type), $xml);
+ }
+
+ public function lineSumTypeProvider()
+ {
+ return [
+ [VoucherLine::UNIT_PRICE_TYPE_WITH_VAT],
+ [VoucherLine::UNIT_PRICE_TYPE_WITHOUT_VAT],
+ ];
+ }
+
+ /**
+ * @dataProvider setVatCodeProvider
+ */
+ public function testSetVatCode($code)
+ {
+ // Default
+ $xml = $this->toXml($this->voucherLine);
+ $this->assertXmlContainsTagWithAttributes(
+ 'vatpercent',
+ array('vatcode' => VoucherLine::VAT_CODE_KOMY),
+ $xml
+ );
+
+ // Setted value
+ $this->voucherLine->setVatCode($code);
+ $xml = $this->toXml($this->voucherLine);
+
+ $this->assertXmlContainsTagWithAttributes(
+ 'vatpercent',
+ array('vatcode' => $code),
+ $xml
+ );
+ }
+
+ public function setVatCodeProvider()
+ {
+ return [
+ [VoucherLine::VAT_CODE_KOMY],
+ [VoucherLine::VAT_CODE_NONE],
+ ];
+ }
+
+ public function testSetDescription()
+ {
+ $description = md5(time());
+ $this->voucherLine->setDescription($description);
+ $xml = $this->toXml($this->voucherLine);
+ $this->assertXmlContainsTagWithValue('description', $description, $xml);
+
+ // Test max length
+ while (strlen($description) <= 255) {
+ $description .= $description;
+ }
+
+ $this->voucherLine->setDescription($description);
+ $xml = $this->toXml($this->voucherLine);
+
+ $this->assertXmlContainsTagWithValue('description', substr($description, 0, 255), $xml);
+ $this->assertNotContains($description, $xml);
+ }
+}
diff --git a/tests/Xi/Netvisor/Resource/Xml/VoucherTest.php b/tests/Xi/Netvisor/Resource/Xml/VoucherTest.php
new file mode 100644
index 0000000..f31ebe7
--- /dev/null
+++ b/tests/Xi/Netvisor/Resource/Xml/VoucherTest.php
@@ -0,0 +1,73 @@
+voucher = new Voucher('Myyntilasku', Voucher::CALCULATION_MODE_WITH_VAT, new \DateTime());
+ }
+
+ public function testHasDtd()
+ {
+ $this->assertNotNull($this->voucher->getDtdPath());
+ }
+
+ public function testXmlHasRequiredValues()
+ {
+ $type = 'Myyntilasku';
+ $mode = Voucher::CALCULATION_MODE_WITH_VAT;
+ $date = new \DateTime();
+
+ $voucher = new Voucher($type, $mode, $date);
+
+ $xml = $this->toXml($voucher->getSerializableObject());
+
+ $this->assertXmlContainsTagWithValue('voucherclass', $type, $xml);
+ $this->assertXmlContainsTagWithValue('calculationmode', $mode, $xml);
+ $this->assertXmlContainsTagWithAttributes('voucherdate', array('format' => 'ansi'), $xml);
+ }
+
+ public function testXmlHasAddedVoucherLines()
+ {
+ $this->voucher->addVoucherLine(new VoucherLine(0, 0, 0));
+ $this->voucher->addVoucherLine(new VoucherLine(100, 1, 24));
+
+ $xml = $this->toXml($this->voucher->getSerializableObject());
+
+ $this->assertContains('voucherline', $xml);
+ $this->assertXmlContainsTagWithValue('linesum', 0, $xml);
+ $this->assertSame(2, substr_count($xml, ''));
+
+ $this->assertXmlIsValid($xml, $this->voucher->getDtdPath());
+ }
+
+ public function testSetNumber()
+ {
+ $number = '0123456';
+
+ $this->voucher->setNumber($number);
+ $xml = $this->toXml($this->voucher->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('number', $number, $xml);
+ }
+
+ public function testSetDescription()
+ {
+ $description = 'Some description';
+
+ $this->voucher->setDescription($description);
+ $xml = $this->toXml($this->voucher->getSerializableObject());
+ $this->assertXmlContainsTagWithValue('description', $description, $xml);
+ }
+}
diff --git a/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php b/tests/Xi/Netvisor/Serializer/Naming/LowercaseNamingStrategyTest.php
index 4792f0f..f25f276 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
@@ -19,7 +20,7 @@ public function lowercases($name)
$toBeObject[$name] = '';
$object = (object)$toBeObject;
- $metadata = new PropertyMetadata($object, $name);
+ $metadata = new PropertyMetadata($object::class, $name);
$this->assertEquals(strtolower($name), $strategy->translateName($metadata));
}
diff --git a/tests/Xi/Netvisor/XmlTestCase.php b/tests/Xi/Netvisor/XmlTestCase.php
index 57aa3b7..974cd92 100644
--- a/tests/Xi/Netvisor/XmlTestCase.php
+++ b/tests/Xi/Netvisor/XmlTestCase.php
@@ -4,21 +4,29 @@
use JMS\Serializer\Serializer;
use JMS\Serializer\SerializerBuilder;
+use Xi\Netvisor\Component\Validate;
use Xi\Netvisor\Serializer\Naming\LowercaseNamingStrategy;
+use PHPUnit\Framework\TestCase;
-class XmlTestCase extends \PHPUnit_Framework_TestCase
+class XmlTestCase extends TestCase
{
/**
* @var Serializer
*/
private $serializer;
- public function setUp()
+ /**
+ * @var Validate
+ */
+ private $validate;
+
+ public function setUp(): void
{
$builder = SerializerBuilder::create();
$builder->setPropertyNamingStrategy(new LowercaseNamingStrategy());
$this->serializer = $builder->build();
+ $this->validate = new Validate();
}
/**
@@ -38,7 +46,22 @@ public function toXml($object)
public function assertXmlContainsTagWithValue($tag, $value, $xml)
{
$this->assertContains(sprintf('<%s', $tag), $xml);
- $this->assertContains(sprintf('>%s>', $value, $tag), $xml); // TODO: Integers are not enclosed with CDATA.
+
+ if (is_int($value) || is_float($value)) {
+ $this->assertContains(sprintf('>%s%s>', $value, $tag), $xml);
+ return;
+ }
+
+ $this->assertContains(sprintf('>%s>', $value, $tag), $xml);
+ }
+
+ /**
+ * @param string $tag
+ * @param string $xml
+ */
+ public function assertXmlDoesNotContainTag($tag, $xml)
+ {
+ $this->assertNotContains(sprintf('<%s', $tag), $xml);
}
/**
@@ -56,4 +79,9 @@ public function assertXmlContainsTagWithAttributes($tag, $attributes, $xml)
$this->assertContains(sprintf('<%s%s>', $tag, $attributeLine), $xml);
}
+
+ public function assertXmlIsValid($xml, $dtdPath)
+ {
+ $this->assertTrue($this->validate->isValid($xml, $dtdPath));
+ }
}