Drop PHP 5.5 compatibility and upgrade PHPUnit to v5.x

PHPUnit 4.x contains deprecated PHP functions in PHP 7.2.
This commit is contained in:
ArthurHoaro 2017-10-22 13:43:19 +02:00
parent 402f58e0ba
commit 5617dcf9d2
4 changed files with 377 additions and 166 deletions

View file

@ -9,7 +9,6 @@ php:
- 7.1 - 7.1
- 7.0 - 7.0
- 5.6 - 5.6
- 5.5
install: install:
- composer self-update - composer self-update
- composer install --prefer-dist - composer install --prefer-dist

View file

@ -11,11 +11,11 @@
"keywords": ["bookmark", "link", "share", "web"], "keywords": ["bookmark", "link", "share", "web"],
"config": { "config": {
"platform": { "platform": {
"php": "5.5.38" "php": "5.6.31"
} }
}, },
"require": { "require": {
"php": ">=5.5", "php": ">=5.6",
"shaarli/netscape-bookmark-parser": "^2.0", "shaarli/netscape-bookmark-parser": "^2.0",
"erusev/parsedown": "1.6", "erusev/parsedown": "1.6",
"slim/slim": "^3.0", "slim/slim": "^3.0",
@ -24,7 +24,7 @@
}, },
"require-dev": { "require-dev": {
"phpmd/phpmd" : "@stable", "phpmd/phpmd" : "@stable",
"phpunit/phpunit": "4.8.*", "phpunit/phpunit": "^5.0",
"sebastian/phpcpd": "*", "sebastian/phpcpd": "*",
"squizlabs/php_codesniffer": "2.*", "squizlabs/php_codesniffer": "2.*",
"phpunit/phpcov": "*" "phpunit/phpcov": "*"

530
composer.lock generated
View file

@ -4,7 +4,7 @@
"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#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "13b7e1e474fe9264b098ba86face0feb", "content-hash": "bc39afd7f6d37c76509f96bea69f6131",
"packages": [ "packages": [
{ {
"name": "container-interop/container-interop", "name": "container-interop/container-interop",
@ -713,6 +713,51 @@
], ],
"time": "2015-06-14T21:17:01+00:00" "time": "2015-06-14T21:17:01+00:00"
}, },
{
"name": "myclabs/deep-copy",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^4.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"time": "2017-10-19T19:58:43+00:00"
},
{ {
"name": "pdepend/pdepend", "name": "pdepend/pdepend",
"version": "2.5.2", "version": "2.5.2",
@ -809,22 +854,22 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "3.2.2", "version": "3.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157" "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157", "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5", "php": "^5.6 || ^7.0",
"phpdocumentor/reflection-common": "^1.0@dev", "phpdocumentor/reflection-common": "^1.0.0",
"phpdocumentor/type-resolver": "^0.3.0", "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0" "webmozart/assert": "^1.0"
}, },
"require-dev": { "require-dev": {
@ -850,20 +895,20 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-08T06:39:58+00:00" "time": "2017-11-10T14:09:06+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "0.3.0", "version": "0.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773" "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -897,7 +942,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2017-06-03T08:32:36+00:00" "time": "2017-07-14T14:27:02+00:00"
}, },
{ {
"name": "phpmd/phpmd", "name": "phpmd/phpmd",
@ -1030,39 +1075,40 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "2.2.4", "version": "4.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "ext-dom": "*",
"phpunit/php-file-iterator": "~1.3", "ext-xmlwriter": "*",
"phpunit/php-text-template": "~1.2", "php": "^5.6 || ^7.0",
"phpunit/php-token-stream": "~1.3", "phpunit/php-file-iterator": "^1.3",
"sebastian/environment": "^1.3.2", "phpunit/php-text-template": "^1.2",
"sebastian/version": "~1.0" "phpunit/php-token-stream": "^1.4.2 || ^2.0",
"sebastian/code-unit-reverse-lookup": "^1.0",
"sebastian/environment": "^1.3.2 || ^2.0",
"sebastian/version": "^1.0 || ^2.0"
}, },
"require-dev": { "require-dev": {
"ext-xdebug": ">=2.1.4", "ext-xdebug": "^2.1.4",
"phpunit/phpunit": "~4" "phpunit/phpunit": "^5.7"
}, },
"suggest": { "suggest": {
"ext-dom": "*", "ext-xdebug": "^2.5.1"
"ext-xdebug": ">=2.2.1",
"ext-xmlwriter": "*"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.2.x-dev" "dev-master": "4.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1088,7 +1134,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-10-06T15:47:00+00:00" "time": "2017-04-02T07:44:40+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -1278,26 +1324,26 @@
}, },
{ {
"name": "phpunit/phpcov", "name": "phpunit/phpcov",
"version": "2.0.2", "version": "3.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpcov.git", "url": "https://github.com/sebastianbergmann/phpcov.git",
"reference": "9ef291483ff65eefd8639584d61bbfb044d747f3" "reference": "2005bd90c2c8aae6d93ec82d9cda9d55dca96c3d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/9ef291483ff65eefd8639584d61bbfb044d747f3", "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/2005bd90c2c8aae6d93ec82d9cda9d55dca96c3d",
"reference": "9ef291483ff65eefd8639584d61bbfb044d747f3", "reference": "2005bd90c2c8aae6d93ec82d9cda9d55dca96c3d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": "^5.6 || ^7.0",
"phpunit/php-code-coverage": "~2.0", "phpunit/php-code-coverage": "^4.0",
"phpunit/phpunit": ">=4.1", "phpunit/phpunit": "^5.0",
"sebastian/diff": "~1.1", "sebastian/diff": "^1.1",
"sebastian/finder-facade": "~1.1", "sebastian/finder-facade": "^1.1",
"sebastian/version": "~1.0", "sebastian/version": "^1.0|^2.0",
"symfony/console": "~2.2" "symfony/console": "^2|^3"
}, },
"bin": [ "bin": [
"phpcov" "phpcov"
@ -1305,7 +1351,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev" "dev-master": "3.1.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1326,44 +1372,54 @@
], ],
"description": "CLI frontend for PHP_CodeCoverage", "description": "CLI frontend for PHP_CodeCoverage",
"homepage": "https://github.com/sebastianbergmann/phpcov", "homepage": "https://github.com/sebastianbergmann/phpcov",
"time": "2015-10-05T09:24:23+00:00" "time": "2016-06-03T07:01:55+00:00"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "4.8.36", "version": "5.7.27",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517" "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517", "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-json": "*", "ext-json": "*",
"ext-pcre": "*", "ext-libxml": "*",
"ext-reflection": "*", "ext-mbstring": "*",
"ext-spl": "*", "ext-xml": "*",
"php": ">=5.3.3", "myclabs/deep-copy": "~1.3",
"phpspec/prophecy": "^1.3.1", "php": "^5.6 || ^7.0",
"phpunit/php-code-coverage": "~2.1", "phpspec/prophecy": "^1.6.2",
"phpunit/php-code-coverage": "^4.0.4",
"phpunit/php-file-iterator": "~1.4", "phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "^1.0.6", "phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3", "phpunit/phpunit-mock-objects": "^3.2",
"sebastian/comparator": "~1.2.2", "sebastian/comparator": "^1.2.4",
"sebastian/diff": "~1.2", "sebastian/diff": "^1.4.3",
"sebastian/environment": "~1.3", "sebastian/environment": "^1.3.4 || ^2.0",
"sebastian/exporter": "~1.2", "sebastian/exporter": "~2.0",
"sebastian/global-state": "~1.0", "sebastian/global-state": "^1.1",
"sebastian/version": "~1.0", "sebastian/object-enumerator": "~2.0",
"symfony/yaml": "~2.1|~3.0" "sebastian/resource-operations": "~1.0",
"sebastian/version": "^1.0.6|^2.0.1",
"symfony/yaml": "~2.1|~3.0|~4.0"
},
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2"
},
"require-dev": {
"ext-pdo": "*"
}, },
"suggest": { "suggest": {
"ext-xdebug": "*",
"phpunit/php-invoker": "~1.1" "phpunit/php-invoker": "~1.1"
}, },
"bin": [ "bin": [
@ -1372,7 +1428,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.8.x-dev" "dev-master": "5.7.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1398,30 +1454,33 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-06-21T08:07:12+00:00" "time": "2018-02-01T05:50:59+00:00"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "2.3.8", "version": "3.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3", "php": "^5.6 || ^7.0",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "^1.2",
"sebastian/exporter": "~1.2" "sebastian/exporter": "^1.2 || ^2.0"
},
"conflict": {
"phpunit/phpunit": "<5.4.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "^5.4"
}, },
"suggest": { "suggest": {
"ext-soap": "*" "ext-soap": "*"
@ -1429,7 +1488,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.3.x-dev" "dev-master": "3.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1454,7 +1513,52 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-10-02T06:51:40+00:00" "time": "2017-06-30T09:13:00+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2017-03-04T06:30:41+00:00"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -1574,28 +1678,28 @@
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
"version": "1.3.8", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/environment.git", "url": "https://github.com/sebastianbergmann/environment.git",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.3.3 || ^7.0" "php": "^5.6 || ^7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0" "phpunit/phpunit": "^5.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1620,25 +1724,25 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2016-08-18T05:49:44+00:00" "time": "2016-11-26T07:53:53+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "1.2.2", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"sebastian/recursion-context": "~1.0" "sebastian/recursion-context": "~2.0"
}, },
"require-dev": { "require-dev": {
"ext-mbstring": "*", "ext-mbstring": "*",
@ -1647,7 +1751,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1687,7 +1791,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2016-06-17T09:04:28+00:00" "time": "2016-11-19T08:54:04+00:00"
}, },
{ {
"name": "sebastian/finder-facade", "name": "sebastian/finder-facade",
@ -1780,26 +1884,71 @@
"time": "2015-10-12T03:26:01+00:00" "time": "2015-10-12T03:26:01+00:00"
}, },
{ {
"name": "sebastian/phpcpd", "name": "sebastian/object-enumerator",
"version": "2.0.4", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpcpd.git", "url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db" "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/24d9a880deadb0b8c9680e9cfe78e30b704225db", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
"reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db", "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.6",
"phpunit/php-timer": ">=1.0.6", "sebastian/recursion-context": "~2.0"
"sebastian/finder-facade": "~1.1", },
"sebastian/version": "~1.0|~2.0", "require-dev": {
"symfony/console": "~2.7|^3.0", "phpunit/phpunit": "~5"
"theseer/fdomdocument": "~1.4" },
"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": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"time": "2017-02-18T15:18:39+00:00"
},
{
"name": "sebastian/phpcpd",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpcpd.git",
"reference": "dfed51c1288790fc957c9433e2f49ab152e8a564"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/dfed51c1288790fc957c9433e2f49ab152e8a564",
"reference": "dfed51c1288790fc957c9433e2f49ab152e8a564",
"shasum": ""
},
"require": {
"php": "^5.6|^7.0",
"phpunit/php-timer": "^1.0.6",
"sebastian/finder-facade": "^1.1",
"sebastian/version": "^1.0|^2.0",
"symfony/console": "^2.7|^3.0|^4.0"
}, },
"bin": [ "bin": [
"phpcpd" "phpcpd"
@ -1807,7 +1956,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0-dev" "dev-master": "3.0-dev"
} }
}, },
"autoload": { "autoload": {
@ -1828,20 +1977,20 @@
], ],
"description": "Copy/Paste Detector (CPD) for PHP code.", "description": "Copy/Paste Detector (CPD) for PHP code.",
"homepage": "https://github.com/sebastianbergmann/phpcpd", "homepage": "https://github.com/sebastianbergmann/phpcpd",
"time": "2016-04-17T19:32:49+00:00" "time": "2017-11-16T08:49:28+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "1.0.5", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1853,7 +2002,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1881,23 +2030,73 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-10-03T07:41:43+00:00" "time": "2016-11-19T07:33:16+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/resource-operations",
"version": "1.0.6", "version": "1.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/version.git", "url": "https://github.com/sebastianbergmann/resource-operations.git",
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
"shasum": "" "shasum": ""
}, },
"require": {
"php": ">=5.6.0"
},
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"time": "2015-07-28T20:34:47+00:00"
},
{
"name": "sebastian/version",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"src/" "src/"
@ -1916,7 +2115,7 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21T13:59:46+00:00" "time": "2016-10-03T07:35:21+00:00"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
@ -2060,37 +2259,45 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.8.34", "version": "v3.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "162ca7d0ea597599967aa63b23418e747da0896b" "reference": "26b6f419edda16c19775211987651cb27baea7f1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/162ca7d0ea597599967aa63b23418e747da0896b", "url": "https://api.github.com/repos/symfony/console/zipball/26b6f419edda16c19775211987651cb27baea7f1",
"reference": "162ca7d0ea597599967aa63b23418e747da0896b", "reference": "26b6f419edda16c19775211987651cb27baea7f1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.9", "php": "^5.5.9|>=7.0.8",
"symfony/debug": "^2.7.2|~3.0.0", "symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0" "symfony/polyfill-mbstring": "~1.0"
}, },
"conflict": {
"symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3"
},
"require-dev": { "require-dev": {
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1|~3.0.0", "symfony/config": "~3.3|~4.0",
"symfony/process": "~2.1|~3.0.0" "symfony/dependency-injection": "~3.4|~4.0",
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
"symfony/lock": "~3.4|~4.0",
"symfony/process": "~3.3|~4.0"
}, },
"suggest": { "suggest": {
"psr/log": "For using the console logger", "psr/log": "For using the console logger",
"symfony/event-dispatcher": "", "symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": "" "symfony/process": ""
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.8-dev" "dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -2117,37 +2324,36 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-01-29T08:54:45+00:00" "time": "2018-01-29T09:03:43+00:00"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v3.0.9", "version": "v3.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" "reference": "53f6af2805daf52a43b393b93d2f24925d35c937"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", "url": "https://api.github.com/repos/symfony/debug/zipball/53f6af2805daf52a43b393b93d2f24925d35c937",
"reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", "reference": "53f6af2805daf52a43b393b93d2f24925d35c937",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5.9", "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0" "psr/log": "~1.0"
}, },
"conflict": { "conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
}, },
"require-dev": { "require-dev": {
"symfony/class-loader": "~2.8|~3.0", "symfony/http-kernel": "~2.8|~3.0|~4.0"
"symfony/http-kernel": "~2.8|~3.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.0-dev" "dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -2174,20 +2380,20 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-07-30T07:22:48+00:00" "time": "2018-01-18T22:16:57+00:00"
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",
"version": "v3.3.16", "version": "v3.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dependency-injection.git", "url": "https://github.com/symfony/dependency-injection.git",
"reference": "54243abc4e1a1a15e274e391bd6f7090b44711f1" "reference": "4b2717ee2499390e371e1fc7abaf886c1c83e83d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54243abc4e1a1a15e274e391bd6f7090b44711f1", "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4b2717ee2499390e371e1fc7abaf886c1c83e83d",
"reference": "54243abc4e1a1a15e274e391bd6f7090b44711f1", "reference": "4b2717ee2499390e371e1fc7abaf886c1c83e83d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2197,15 +2403,16 @@
"conflict": { "conflict": {
"symfony/config": "<3.3.7", "symfony/config": "<3.3.7",
"symfony/finder": "<3.3", "symfony/finder": "<3.3",
"symfony/yaml": "<3.3" "symfony/proxy-manager-bridge": "<3.4",
"symfony/yaml": "<3.4"
}, },
"provide": { "provide": {
"psr/container-implementation": "1.0" "psr/container-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"symfony/config": "~3.3", "symfony/config": "~3.3|~4.0",
"symfony/expression-language": "~2.8|~3.0", "symfony/expression-language": "~2.8|~3.0|~4.0",
"symfony/yaml": "~3.3" "symfony/yaml": "~3.4|~4.0"
}, },
"suggest": { "suggest": {
"symfony/config": "", "symfony/config": "",
@ -2217,7 +2424,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.3-dev" "dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -2244,7 +2451,7 @@
], ],
"description": "Symfony DependencyInjection Component", "description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-01-29T09:02:23+00:00" "time": "2018-01-29T09:16:57+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
@ -2346,16 +2553,16 @@
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.6.0", "version": "v1.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2367,7 +2574,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.6-dev" "dev-master": "1.7-dev"
} }
}, },
"autoload": { "autoload": {
@ -2401,27 +2608,30 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2017-10-11T12:05:26+00:00" "time": "2018-01-30T19:27:44+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v3.3.16", "version": "v3.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "af615970e265543a26ee712c958404eb9b7ac93d" "reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/af615970e265543a26ee712c958404eb9b7ac93d", "url": "https://api.github.com/repos/symfony/yaml/zipball/eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
"reference": "af615970e265543a26ee712c958404eb9b7ac93d", "reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.5.9|>=7.0.8" "php": "^5.5.9|>=7.0.8"
}, },
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": { "require-dev": {
"symfony/console": "~2.8|~3.0" "symfony/console": "~3.4|~4.0"
}, },
"suggest": { "suggest": {
"symfony/console": "For validating YAML files using the lint command" "symfony/console": "For validating YAML files using the lint command"
@ -2429,7 +2639,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.3-dev" "dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -2456,7 +2666,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-01-20T15:04:53+00:00" "time": "2018-01-21T19:05:02+00:00"
}, },
{ {
"name": "theseer/fdomdocument", "name": "theseer/fdomdocument",
@ -2558,10 +2768,10 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": ">=5.5" "php": ">=5.6"
}, },
"platform-dev": [], "platform-dev": [],
"platform-overrides": { "platform-overrides": {
"php": "5.5.38" "php": "5.6.31"
} }
} }

View file

@ -3,11 +3,13 @@
namespace Shaarli\Api\Controllers; namespace Shaarli\Api\Controllers;
use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Slim\Container; use Slim\Container;
use Slim\Http\Environment; use Slim\Http\Environment;
use Slim\Http\Request; use Slim\Http\Request;
use Slim\Http\Response; use Slim\Http\Response;
use Slim\Router;
/** /**
* Class PostLinkTest * Class PostLinkTest
@ -16,7 +18,7 @@
* *
* @package Shaarli\Api\Controllers * @package Shaarli\Api\Controllers
*/ */
class PostLinkTest extends \PHPUnit_Framework_TestCase class PostLinkTest extends TestCase
{ {
/** /**
* @var string datastore to test write operations * @var string datastore to test write operations
@ -78,7 +80,7 @@ public function setUp()
$this->controller = new Links($this->container); $this->controller = new Links($this->container);
$mock = $this->getMock('\Slim\Router', ['relativePathFor']); $mock = $this->createMock(Router::class);
$mock->expects($this->any()) $mock->expects($this->any())
->method('relativePathFor') ->method('relativePathFor')
->willReturn('api/v1/links/1'); ->willReturn('api/v1/links/1');