matrix:
include:
# jobs for each supported php version
+ - language: php
+ php: nightly # PHP 8.0
+ install:
+ - composer self-update --2
+ - composer update --ignore-platform-req=php
+ - composer remove --dev --ignore-platform-req=php phpunit/phpunit
+ - composer require --dev --ignore-platform-req=php phpunit/php-text-template ^2.0
+ - composer require --dev --ignore-platform-req=php phpunit/phpunit ^9.0
- language: php
php: 7.4
- language: php
// JSON_PRETTY_PRINT is available from PHP 5.4.
$print = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0;
$data = self::getPhpHeaders() . json_encode($conf, $print) . self::getPhpSuffix();
- if (!file_put_contents($filepath, $data)) {
+ if (empty($filepath) || !file_put_contents($filepath, $data)) {
throw new \Shaarli\Exceptions\IOException(
$filepath,
t('Shaarli could not create the config file. '.
},
"require-dev": {
"roave/security-advisories": "dev-master",
- "phpunit/phpcov": "*",
- "phpunit/phpunit": "^7.5 || ^8.0",
- "squizlabs/php_codesniffer": "3.*"
+ "squizlabs/php_codesniffer": "3.*",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"suggest": {
"ext-curl": "Allows fetching web pages and thumbnails in a more robust way",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "37e420b4b6e9fa74b27e127dd422d9a6",
+ "content-hash": "98520a05a7185503ee13d05ffaa535f6",
"packages": [
{
"name": "arthurhoaro/web-thumbnailer",
- "version": "v2.0.1",
+ "version": "v2.0.3",
"source": {
"type": "git",
"url": "https://github.com/ArthurHoaro/web-thumbnailer.git",
- "reference": "4aa27a1b54b9823341fedd7ca2dcfb11a6b3186a"
+ "reference": "39bfd4f3136d9e6096496b9720e877326cfe4775"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ArthurHoaro/web-thumbnailer/zipball/4aa27a1b54b9823341fedd7ca2dcfb11a6b3186a",
- "reference": "4aa27a1b54b9823341fedd7ca2dcfb11a6b3186a",
+ "url": "https://api.github.com/repos/ArthurHoaro/web-thumbnailer/zipball/39bfd4f3136d9e6096496b9720e877326cfe4775",
+ "reference": "39bfd4f3136d9e6096496b9720e877326cfe4775",
"shasum": ""
},
"require": {
"php": ">=7.1",
- "phpunit/php-text-template": "^1.2"
+ "phpunit/php-text-template": "^1.2 || ^2.0"
},
"require-dev": {
+ "gskema/phpcs-type-sniff": "^0.13.1",
"php-coveralls/php-coveralls": "^2.0",
- "phpunit/phpunit": "^7.0 || ^8.0",
+ "phpstan/phpstan": "^0.12.9",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.0"
},
"type": "library",
}
],
"description": "PHP library which will retrieve a thumbnail for any given URL",
- "time": "2020-01-17T19:42:49+00:00"
+ "support": {
+ "issues": "https://github.com/ArthurHoaro/web-thumbnailer/issues",
+ "source": "https://github.com/ArthurHoaro/web-thumbnailer/tree/v2.0.3"
+ },
+ "time": "2020-09-29T15:51:03+00:00"
},
{
"name": "erusev/parsedown",
"markdown",
"parser"
],
+ "support": {
+ "issues": "https://github.com/erusev/parsedown/issues",
+ "source": "https://github.com/erusev/parsedown/tree/1.7.x"
+ },
"time": "2019-12-30T22:54:17+00:00"
},
{
"po",
"translation"
],
+ "support": {
+ "email": "oom@oscarotero.com",
+ "issues": "https://github.com/oscarotero/Gettext/issues",
+ "source": "https://github.com/php-gettext/Gettext/tree/v4.8.2"
+ },
"time": "2019-12-02T10:21:14+00:00"
},
{
"translations",
"unicode"
],
+ "support": {
+ "issues": "https://github.com/php-gettext/Languages/issues",
+ "source": "https://github.com/php-gettext/Languages/tree/2.6.0"
+ },
"time": "2019-11-13T10:30:21+00:00"
},
{
"keywords": [
"logging"
],
+ "support": {
+ "issues": "https://github.com/katzgrau/KLogger/issues",
+ "source": "https://github.com/katzgrau/KLogger/tree/master"
+ },
"time": "2016-11-07T19:29:14+00:00"
},
{
"router",
"routing"
],
+ "support": {
+ "issues": "https://github.com/nikic/FastRoute/issues",
+ "source": "https://github.com/nikic/FastRoute/tree/master"
+ },
"time": "2018-02-13T20:26:39+00:00"
},
{
"keywords": [
"template"
],
+ "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"
},
{
"container",
"dependency injection"
],
+ "support": {
+ "issues": "https://github.com/silexphp/Pimple/issues",
+ "source": "https://github.com/silexphp/Pimple/tree/master"
+ },
"time": "2018-01-21T07:42:36+00:00"
},
{
"container-interop",
"psr"
],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/master"
+ },
"time": "2017-02-14T16:28:37+00:00"
},
{
"request",
"response"
],
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/master"
+ },
"time": "2016-08-06T14:39:51+00:00"
},
{
"psr",
"psr-3"
],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.3"
+ },
"time": "2020-03-23T09:12:05+00:00"
},
{
"ext-curl": "*",
"php": "~5.4 || ~7.0"
},
+ "default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
"pubsubhubbub",
"websub"
],
+ "support": {
+ "issues": "https://github.com/pubsubhubbub/php-publisher/issues",
+ "source": "https://github.com/pubsubhubbub/php-publisher/tree/master"
+ },
"time": "2018-10-09T05:20:28+00:00"
},
{
"name": "shaarli/netscape-bookmark-parser",
- "version": "v2.1.0",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/shaarli/netscape-bookmark-parser.git",
- "reference": "819008ee42c4dd7e45d988176a4a22d6ed689577"
+ "reference": "432a010af2bb1832d6fbc4763e6b0100b980a1df"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/shaarli/netscape-bookmark-parser/zipball/819008ee42c4dd7e45d988176a4a22d6ed689577",
- "reference": "819008ee42c4dd7e45d988176a4a22d6ed689577",
+ "url": "https://api.github.com/repos/shaarli/netscape-bookmark-parser/zipball/432a010af2bb1832d6fbc4763e6b0100b980a1df",
+ "reference": "432a010af2bb1832d6fbc4763e6b0100b980a1df",
"shasum": ""
},
"require": {
"bookmark",
"link",
"netscape",
- "parser"
+ "parse"
],
- "time": "2018-10-06T14:43:38+00:00"
+ "support": {
+ "issues": "https://github.com/shaarli/netscape-bookmark-parser/issues",
+ "source": "https://github.com/shaarli/netscape-bookmark-parser/tree/v2.2.0"
+ },
+ "time": "2020-06-06T15:53:53+00:00"
},
{
"name": "slim/slim",
"micro",
"router"
],
+ "support": {
+ "issues": "https://github.com/slimphp/Slim/issues",
+ "source": "https://github.com/slimphp/Slim/tree/3.x"
+ },
"time": "2019-11-28T17:40:33+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.3.0",
+ "version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+ "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
+ "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"constructor",
"instantiate"
],
- "time": "2019-10-21T16:45:58+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.3.x"
+ },
+ "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-05-29T17:27:14+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.5",
+ "version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
"object",
"object graph"
],
- "time": "2020-01-17T21:11:47+00:00"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.x"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-06-29T13:22:24+00:00"
},
{
"name": "phar-io/manifest",
}
],
"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/master"
+ },
"time": "2018-07-08T19:23:20+00:00"
},
{
}
],
"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/master"
+ },
"time": "2018-07-08T19:19:57+00:00"
},
{
"reflection",
"static analysis"
],
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master"
+ },
"time": "2020-04-27T09:25:28+00:00"
},
{
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x"
+ },
"time": "2019-12-28T18:55:12+00:00"
},
{
}
],
"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/0.7.2"
+ },
"time": "2019-08-22T18:11:29+00:00"
},
{
"spy",
"stub"
],
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
+ },
"time": "2020-03-05T15:02:03+00:00"
},
{
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master"
+ },
"time": "2018-10-31T16:06:48+00:00"
},
{
"filesystem",
"iterator"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.2"
+ },
"time": "2018-09-13T20:33:42+00:00"
},
{
"keywords": [
"timer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/master"
+ },
"time": "2019-06-07T04:22:29+00:00"
},
{
"keywords": [
"tokenizer"
],
- "time": "2019-09-17T06:23:10+00:00"
- },
- {
- "name": "phpunit/phpcov",
- "version": "5.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpcov.git",
- "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.1"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8",
- "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8",
- "shasum": ""
- },
- "require": {
- "php": "^7.1",
- "phpunit/php-code-coverage": "^6.0",
- "phpunit/phpunit": "^7.0",
- "sebastian/diff": "^3.0",
- "sebastian/finder-facade": "^1.1",
- "sebastian/version": "^2.0",
- "symfony/console": "^3.0 || ^4.0"
- },
- "bin": [
- "phpcov"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0-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": "CLI frontend for php-code-coverage",
- "homepage": "https://github.com/sebastianbergmann/phpcov",
- "time": "2018-02-04T10:18:50+00:00"
+ "abandoned": true,
+ "time": "2019-09-17T06:23:10+00:00"
},
{
"name": "phpunit/phpunit",
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20"
+ },
"time": "2020-01-08T08:45:45+00:00"
},
{
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
- "reference": "5a342e2dc0408d026b97ee3176b5b406e54e3766"
+ "reference": "0749ceaf15c136d085b722a5bb88141398a54142"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5a342e2dc0408d026b97ee3176b5b406e54e3766",
- "reference": "5a342e2dc0408d026b97ee3176b5b406e54e3766",
+ "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0749ceaf15c136d085b722a5bb88141398a54142",
+ "reference": "0749ceaf15c136d085b722a5bb88141398a54142",
"shasum": ""
},
"conflict": {
"alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
"amphp/artax": "<1.0.6|>=2,<2.0.6",
"amphp/http": "<1.0.1",
+ "amphp/http-client": ">=4,<4.4",
"api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6",
"asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
"aws/aws-sdk-php": ">=3,<3.2.1",
"bagisto/bagisto": "<0.1.5",
- "barrelstrength/sprout-base-email": "<3.9",
- "bolt/bolt": "<3.6.10",
+ "barrelstrength/sprout-base-email": "<1.2.7",
+ "barrelstrength/sprout-forms": "<3.9",
+ "baserproject/basercms": ">=4,<=4.3.6",
+ "bolt/bolt": "<3.7.1",
"brightlocal/phpwhois": "<=4.2.5",
"buddypress/buddypress": "<5.1.2",
"bugsnag/bugsnag-laravel": ">=2,<2.0.2",
"composer/composer": "<=1-alpha.11",
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
"contao/core": ">=2,<3.5.39",
- "contao/core-bundle": ">=4,<4.4.46|>=4.5,<4.8.6",
+ "contao/core-bundle": ">=4,<4.4.52|>=4.5,<4.9.6|= 4.10.0",
"contao/listing-bundle": ">=4,<4.4.8",
"datadog/dd-trace": ">=0.30,<0.30.2",
"david-garcia/phpwhois": "<=4.3.1",
+ "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
"doctrine/annotations": ">=1,<1.2.7",
"doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2",
"doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1",
"doctrine/mongodb-odm": ">=1,<1.0.2",
"doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
"doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1",
- "dolibarr/dolibarr": "<=10.0.6",
+ "dolibarr/dolibarr": "<11.0.4",
"dompdf/dompdf": ">=0.6,<0.6.2",
- "drupal/core": ">=7,<7.69|>=8,<8.7.12|>=8.8,<8.8.4",
- "drupal/drupal": ">=7,<7.69|>=8,<8.7.12|>=8.8,<8.8.4",
+ "drupal/core": ">=7,<7.73|>=8,<8.8.10|>=8.9,<8.9.6|>=9,<9.0.6",
+ "drupal/drupal": ">=7,<7.73|>=8,<8.8.10|>=8.9,<8.9.6|>=9,<9.0.6",
"endroid/qr-code-bundle": "<3.4.2",
"enshrined/svg-sanitize": "<0.13.1",
"erusev/parsedown": "<1.7.2",
"ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
"ezsystems/ezplatform": ">=1.7,<1.7.9.1|>=1.13,<1.13.5.1|>=2.5,<2.5.4",
"ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6",
- "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2",
+ "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
+ "ezsystems/ezplatform-kernel": ">=1,<1.0.2.1",
"ezsystems/ezplatform-user": ">=1,<1.0.1",
- "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.14.1|>=6,<6.7.9.1|>=6.8,<6.13.6.2|>=7,<7.2.4.1|>=7.3,<7.3.2.1|>=7.5,<7.5.6.2",
+ "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.14.2|>=6,<6.7.9.1|>=6.8,<6.13.6.3|>=7,<7.2.4.1|>=7.3,<7.3.2.1|>=7.5,<7.5.7.1",
"ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.14.1|>=2011,<2017.12.7.2|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3|>=2019.3,<2019.3.4.2",
+ "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
"ezsystems/repository-forms": ">=2.3,<2.3.2.1",
"ezyang/htmlpurifier": "<4.1.1",
"firebase/php-jwt": "<2",
"friendsofsymfony/oauth2-php": "<1.3",
"friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
"friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
+ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
"fuel/core": "<1.8.1",
"getgrav/grav": "<1.7-beta.8",
+ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
"gree/jose": "<=2.2",
"gregwar/rst": "<1.0.3",
"guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1",
"illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
- "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30",
- "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29",
+ "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
+ "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29|>=5.5,<=5.5.44|>=6,<6.18.34|>=7,<7.23.2",
"illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
"illuminate/view": ">=7,<7.1.2",
"ivankristianto/phpwhois": "<=4.3",
"joomla/session": "<1.3.1",
"jsmitty12/phpwhois": "<5.1",
"kazist/phpwhois": "<=4.2.6",
+ "kitodo/presentation": "<3.1.2",
"kreait/firebase-php": ">=3.2,<3.8.1",
"la-haute-societe/tcpdf": "<6.2.22",
- "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30|>=7,<7.1.2",
+ "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.34|>=7,<7.23.2",
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
"league/commonmark": "<0.18.3",
"librenms/librenms": "<1.53",
+ "livewire/livewire": ">2.2.4,<2.2.6",
"magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
"magento/magento1ce": "<1.9.4.3",
"magento/magento1ee": ">=1,<1.14.4.3",
"magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
+ "marcwillmann/turn": "<0.3.3",
+ "mittwald/typo3_forum": "<1.2.1",
"monolog/monolog": ">=1.8,<1.12",
"namshi/jose": "<2.2",
+ "nystudio107/craft-seomatic": "<3.3",
"nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
+ "october/backend": ">=1.0.319,<1.0.467",
+ "october/cms": ">=1.0.319,<1.0.466",
+ "october/october": ">=1.0.319,<1.0.466",
+ "october/rain": ">=1.0.319,<1.0.468",
"onelogin/php-saml": "<2.10.4",
"oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
"openid/php-openid": "<2.3",
+ "openmage/magento-lts": "<19.4.6|>=20,<20.0.2",
"oro/crm": ">=1.7,<1.7.4",
"oro/platform": ">=1.7,<1.7.4",
"padraic/humbug_get_contents": "<1.1.2",
"paragonie/random_compat": "<2",
"paypal/merchant-sdk-php": "<3.12",
"pear/archive_tar": "<1.4.4",
+ "personnummer/personnummer": "<3.0.2",
"phpfastcache/phpfastcache": ">=5,<5.0.13",
- "phpmailer/phpmailer": ">=5,<5.2.27|>=6,<6.0.6",
+ "phpmailer/phpmailer": "<6.1.6",
+ "phpmussel/phpmussel": ">=1,<1.6",
"phpmyadmin/phpmyadmin": "<4.9.2",
"phpoffice/phpexcel": "<1.8.2",
"phpoffice/phpspreadsheet": "<1.8",
"phpxmlrpc/extras": "<0.6.1",
"pimcore/pimcore": "<6.3",
"prestashop/autoupgrade": ">=4,<4.10.1",
+ "prestashop/contactform": ">1.0.1,<4.3",
"prestashop/gamification": "<2.3.2",
"prestashop/ps_facetedsearch": "<3.4.1",
"privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2",
"propel/propel": ">=2-alpha.1,<=2-alpha.7",
"propel/propel1": ">=1,<=1.7.1",
"pusher/pusher-php-server": "<2.2.1",
+ "rainlab/debugbar-plugin": "<3.1",
"robrichards/xmlseclibs": "<3.0.4",
+ "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
"sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
"scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
"sensiolabs/connect": "<4.2.3",
"serluck/phpwhois": "<=4.2.6",
+ "shopware/core": "<=6.3.1",
+ "shopware/platform": "<=6.3.1",
"shopware/shopware": "<5.3.7",
"silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1",
"silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2",
"silverstripe/cms": "<4.3.6|>=4.4,<4.4.4",
"silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
"silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
- "silverstripe/framework": "<4.4.5|>=4.5,<4.5.2",
- "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2",
+ "silverstripe/framework": "<4.4.7|>=4.5,<4.5.4",
+ "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2|>=3.2,<3.2.4",
"silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
"silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
"silverstripe/subsites": ">=2,<2.1.1",
"ssddanbrown/bookstack": "<0.29.2",
"stormpath/sdk": ">=0,<9.9.99",
"studio-42/elfinder": "<2.1.49",
+ "sulu/sulu": "<1.6.34|>=2,<2.0.10|>=2.1,<2.1.1",
"swiftmailer/swiftmailer": ">=4,<5.4.5",
"sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
"sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
"sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
- "sylius/resource-bundle": "<1.3.13|>=1.4,<1.4.6|>=1.5,<1.5.1|>=1.6,<1.6.3",
+ "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4",
"sylius/sylius": "<1.3.16|>=1.4,<1.4.12|>=1.5,<1.5.9|>=1.6,<1.6.5",
"symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
"symbiote/silverstripe-versionedfiles": "<=2.0.3",
"symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
"symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
- "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8",
+ "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5",
"symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
"symfony/mime": ">=4.3,<4.3.8",
"symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
"symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
"symfony/serializer": ">=2,<2.0.11",
- "symfony/symfony": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
+ "symfony/symfony": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5",
"symfony/translation": ">=2,<2.0.17",
"symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
"symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
"symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
"symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
+ "t3g/svg-sanitizer": "<1.0.3",
"tecnickcom/tcpdf": "<6.2.22",
"thelia/backoffice-default-template": ">=2.1,<2.1.2",
"thelia/thelia": ">=2.1-beta.1,<2.1.3",
"titon/framework": ">=0,<9.9.99",
"truckersmp/phpwhois": "<=4.3.1",
"twig/twig": "<1.38|>=2,<2.7",
- "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.30|>=9,<9.5.17|>=10,<10.4.2",
- "typo3/cms-core": ">=8,<8.7.30|>=9,<9.5.17|>=10,<10.4.2",
+ "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.30|>=9,<9.5.20|>=10,<10.4.6",
+ "typo3/cms-core": ">=8,<8.7.30|>=9,<9.5.20|>=10,<10.4.6",
"typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5",
"typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4",
"typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
"willdurand/js-translation-bundle": "<2.1.1",
"yii2mod/yii2-cms": "<1.9.2",
"yiisoft/yii": ">=1.1.14,<1.1.15",
- "yiisoft/yii2": "<2.0.15",
+ "yiisoft/yii2": "<2.0.38",
"yiisoft/yii2-bootstrap": "<2.0.4",
"yiisoft/yii2-dev": "<2.0.15",
"yiisoft/yii2-elasticsearch": "<2.0.5",
}
],
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
- "time": "2020-05-12T11:18:47+00:00"
+ "support": {
+ "issues": "https://github.com/Roave/SecurityAdvisories/issues",
+ "source": "https://github.com/Roave/SecurityAdvisories/tree/latest"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Ocramius",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-24T17:02:11+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/master"
+ },
"time": "2017-03-04T06:30:41+00:00"
},
{
"compare",
"equality"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/master"
+ },
"time": "2018-07-12T15:12:46+00:00"
},
{
"unidiff",
"unified diff"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/master"
+ },
"time": "2019-02-04T06:01:07+00:00"
},
{
"environment",
"hhvm"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.3"
+ },
"time": "2019-11-20T08:46:58+00:00"
},
{
"export",
"exporter"
],
- "time": "2019-09-14T09:02:43+00:00"
- },
- {
- "name": "sebastian/finder-facade",
- "version": "1.2.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/finder-facade.git",
- "reference": "167c45d131f7fc3d159f56f191a0a22228765e16"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/167c45d131f7fc3d159f56f191a0a22228765e16",
- "reference": "167c45d131f7fc3d159f56f191a0a22228765e16",
- "shasum": ""
- },
- "require": {
- "php": "^7.1",
- "symfony/finder": "^2.3|^3.0|^4.0|^5.0",
- "theseer/fdomdocument": "^1.6"
- },
- "type": "library",
- "extra": {
- "branch-alias": []
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/master"
},
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.",
- "homepage": "https://github.com/sebastianbergmann/finder-facade",
- "time": "2020-01-16T08:08:45+00:00"
+ "time": "2019-09-14T09:02:43+00:00"
},
{
"name": "sebastian/global-state",
"keywords": [
"global state"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0"
+ },
"time": "2017-04-27T15:39:26+00:00"
},
{
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master"
+ },
"time": "2017-08-03T12:35:26+00:00"
},
{
],
"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/master"
+ },
"time": "2017-03-29T09:07:27+00:00"
},
{
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/master"
+ },
"time": "2017-03-03T06:23:57+00:00"
},
{
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/master"
+ },
"time": "2018-10-04T04:07:39+00:00"
},
{
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
+ "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": "squizlabs/php_codesniffer",
- "version": "3.5.5",
+ "version": "3.5.6",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6"
+ "reference": "e97627871a7eab2f70e59166072a6b767d5834e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
- "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e97627871a7eab2f70e59166072a6b767d5834e0",
+ "reference": "e97627871a7eab2f70e59166072a6b767d5834e0",
"shasum": ""
},
"require": {
"phpcs",
"standards"
],
- "time": "2020-04-17T01:09:41+00:00"
- },
- {
- "name": "symfony/console",
- "version": "v4.4.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
- "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
- "shasum": ""
- },
- "require": {
- "php": "^7.1.3",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.8",
- "symfony/service-contracts": "^1.1|^2"
- },
- "conflict": {
- "symfony/dependency-injection": "<3.4",
- "symfony/event-dispatcher": "<4.3|>=5",
- "symfony/lock": "<4.4",
- "symfony/process": "<3.3"
- },
- "provide": {
- "psr/log-implementation": "1.0"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "^3.4|^4.0|^5.0",
- "symfony/dependency-injection": "^3.4|^4.0|^5.0",
- "symfony/event-dispatcher": "^4.3",
- "symfony/lock": "^4.4|^5.0",
- "symfony/process": "^3.4|^4.0|^5.0",
- "symfony/var-dumper": "^4.3|^5.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Console Component",
- "homepage": "https://symfony.com",
- "time": "2020-03-30T11:41:10+00:00"
- },
- {
- "name": "symfony/finder",
- "version": "v4.4.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/finder.git",
- "reference": "5729f943f9854c5781984ed4907bbb817735776b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b",
- "reference": "5729f943f9854c5781984ed4907bbb817735776b",
- "shasum": ""
- },
- "require": {
- "php": "^7.1.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
+ "support": {
+ "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+ "source": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Finder Component",
- "homepage": "https://symfony.com",
- "time": "2020-03-27T16:54:36+00:00"
+ "time": "2020-08-10T04:50:15+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.17.0",
+ "version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"polyfill",
"portable"
],
- "time": "2020-05-12T16:14:59+00:00"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.17.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.17-dev"
- }
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.18.0"
},
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ "funding": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
},
{
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "time": "2020-05-12T16:47:27+00:00"
- },
- {
- "name": "symfony/polyfill-php73",
- "version": "v1.17.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
- "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.17-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php73\\": ""
+ "url": "https://github.com/fabpot",
+ "type": "github"
},
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "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": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "time": "2020-05-12T16:47:27+00:00"
- },
- {
- "name": "symfony/service-contracts",
- "version": "v1.1.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffc7f5692092df31515df2a5ecf3b7302b3ddacf",
- "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf",
- "shasum": ""
- },
- "require": {
- "php": "^7.1.3",
- "psr/container": "^1.0"
- },
- "suggest": {
- "symfony/service-implementation": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Service\\": ""
- }
- },
- "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": "Generic abstractions related to writing services",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "time": "2019-10-14T12:27:06+00:00"
- },
- {
- "name": "theseer/fdomdocument",
- "version": "1.6.6",
- "source": {
- "type": "git",
- "url": "https://github.com/theseer/fDOMDocument.git",
- "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca",
- "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "lib-libxml": "*",
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
{
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "lead"
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
}
],
- "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.",
- "homepage": "https://github.com/theseer/fDOMDocument",
- "time": "2017-06-30T11:53:12+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "theseer/tokenizer",
}
],
"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/master"
+ },
"time": "2019-06-13T22:48:21+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.8.0",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
- "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0",
+ "php": "^5.3.3 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
+ "phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
"check",
"validate"
],
- "time": "2020-04-18T12:12:48+00:00"
+ "support": {
+ "issues": "https://github.com/webmozart/assert/issues",
+ "source": "https://github.com/webmozart/assert/tree/master"
+ },
+ "time": "2020-07-08T17:02:28+00:00"
}
],
"aliases": [],
"platform-dev": [],
"platform-overrides": {
"php": "7.1.29"
- }
+ },
+ "plugin-api-version": "2.0.0"
}
/**
* Unitary tests for Shaarli utilities
*/
-class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
+class ApplicationUtilsTest extends \Shaarli\TestCase
{
protected static $testUpdateFile = 'sandbox/update.txt';
protected static $testVersion = '0.5.0';
/**
* Test update checks - invalid Git branch
- * @expectedException Exception
*/
public function testCheckUpdateInvalidGitBranch()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid branch selected for updates/');
ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
/**
* Check a unsupported PHP version
- * @expectedException Exception
*/
public function testCheckSupportedPHPVersion51()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
$this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0'));
/**
* Check another unsupported PHP version
- * @expectedException Exception
*/
public function testCheckSupportedPHPVersion52()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
$this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2'));
*
* Test file utility class.
*/
-class FileUtilsTest extends \PHPUnit\Framework\TestCase
+class FileUtilsTest extends \Shaarli\TestCase
{
/**
* @var string Test file path.
namespace Shaarli;
use DateTime;
-use Exception;
use Shaarli\Bookmark\Bookmark;
-class HistoryTest extends \PHPUnit\Framework\TestCase
+class HistoryTest extends \Shaarli\TestCase
{
/**
* @var string History file path
/**
* Class LanguagesTest.
*/
-class LanguagesTest extends \PHPUnit\Framework\TestCase
+class LanguagesTest extends \Shaarli\TestCase
{
/**
* @var string Config file path (without extension).
<?php
+
namespace Shaarli\Plugin;
use Shaarli\Config\ConfigManager;
/**
* Unit tests for Plugins
*/
-class PluginManagerTest extends \PHPUnit\Framework\TestCase
+class PluginManagerTest extends \Shaarli\TestCase
{
/**
* Path to tests plugin.
$data = [];
$this->pluginManager->executeHooks('error', $data);
- $this->assertSame(
- 'test [plugin incompatibility]: Class \'Unknown\' not found',
+ $this->assertRegExp(
+ '/test \[plugin incompatibility\]: Class [\'"]Unknown[\'"] not found/',
$this->pluginManager->getErrors()[0]
);
}
--- /dev/null
+<?php
+
+declare(strict_types=1);
+
+namespace Shaarli;
+
+/**
+ * Helper class extending \PHPUnit\Framework\TestCase.
+ * Used to make Shaarli UT run on multiple versions of PHPUnit.
+ */
+class TestCase extends \PHPUnit\Framework\TestCase
+{
+ /**
+ * expectExceptionMessageRegExp has been removed and replaced by expectExceptionMessageMatches in PHPUnit 9.
+ */
+ public function expectExceptionMessageRegExp(string $regularExpression): void
+ {
+ if (method_exists($this, 'expectExceptionMessageMatches')) {
+ $this->expectExceptionMessageMatches($regularExpression);
+ } else {
+ parent::expectExceptionMessageRegExp($regularExpression);
+ }
+ }
+
+ /**
+ * assertContains is now used for iterable, strings should use assertStringContainsString
+ */
+ public function assertContainsPolyfill($expected, $actual, string $message = ''): void
+ {
+ if (is_string($actual) && method_exists($this, 'assertStringContainsString')) {
+ static::assertStringContainsString($expected, $actual, $message);
+ } else {
+ static::assertContains($expected, $actual, $message);
+ }
+ }
+
+ /**
+ * assertNotContains is now used for iterable, strings should use assertStringNotContainsString
+ */
+ public function assertNotContainsPolyfill($expected, $actual, string $message = ''): void
+ {
+ if (is_string($actual) && method_exists($this, 'assertStringNotContainsString')) {
+ static::assertStringNotContainsString($expected, $actual, $message);
+ } else {
+ static::assertNotContains($expected, $actual, $message);
+ }
+ }
+
+ /**
+ * assertFileNotExists has been renamed in assertFileDoesNotExist
+ */
+ public static function assertFileNotExists(string $filename, string $message = ''): void
+ {
+ if (method_exists(TestCase::class, 'assertFileDoesNotExist')) {
+ static::assertFileDoesNotExist($filename, $message);
+ } else {
+ parent::assertFileNotExists($filename, $message);
+ }
+ }
+
+ /**
+ * assertRegExp has been renamed in assertMatchesRegularExpression
+ */
+ public static function assertRegExp(string $pattern, string $string, string $message = ''): void
+ {
+ if (method_exists(TestCase::class, 'assertMatchesRegularExpression')) {
+ static::assertMatchesRegularExpression($pattern, $string, $message);
+ } else {
+ parent::assertRegExp($pattern, $string, $message);
+ }
+ }
+
+ public function isInTestsContext(): bool
+ {
+ return true;
+ }
+}
namespace Shaarli;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use WebThumbnailer\Application\ConfigManager as WTConfigManager;
/**
* Unitary tests for timezone utilities
*/
-class TimeZoneTest extends PHPUnit\Framework\TestCase
+class TimeZoneTest extends \Shaarli\TestCase
{
/**
* @var array of timezones
/**
* Unitary tests for Shaarli utilities
*/
-class UtilsTest extends PHPUnit\Framework\TestCase
+class UtilsTest extends \Shaarli\TestCase
{
// Log file
protected static $testLogFile = 'tests.log';
*
* @package Api
*/
-class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase
+class ApiMiddlewareTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
protected static $testDatastore = 'sandbox/datastore.php';
/**
- * @var \ConfigManager instance
+ * @var ConfigManager instance
*/
protected $conf;
$this->assertEquals(401, $response->getStatusCode());
$body = json_decode((string) $response->getBody());
$this->assertEquals('Not authorized: API is disabled', $body->message);
- $this->assertContains('ApiAuthorizationException', $body->stacktrace);
+ $this->assertContainsPolyfill('ApiAuthorizationException', $body->stacktrace);
}
/**
$this->assertEquals(401, $response->getStatusCode());
$body = json_decode((string) $response->getBody());
$this->assertEquals('Not authorized: JWT token not provided', $body->message);
- $this->assertContains('ApiAuthorizationException', $body->stacktrace);
+ $this->assertContainsPolyfill('ApiAuthorizationException', $body->stacktrace);
}
/**
$this->assertEquals(401, $response->getStatusCode());
$body = json_decode((string) $response->getBody());
$this->assertEquals('Not authorized: Token secret must be set in Shaarli\'s administration', $body->message);
- $this->assertContains('ApiAuthorizationException', $body->stacktrace);
+ $this->assertContainsPolyfill('ApiAuthorizationException', $body->stacktrace);
}
/**
$this->assertEquals(401, $response->getStatusCode());
$body = json_decode((string) $response->getBody());
$this->assertEquals('Not authorized: Invalid JWT header', $body->message);
- $this->assertContains('ApiAuthorizationException', $body->stacktrace);
+ $this->assertContainsPolyfill('ApiAuthorizationException', $body->stacktrace);
}
/**
$this->assertEquals(401, $response->getStatusCode());
$body = json_decode((string) $response->getBody());
$this->assertEquals('Not authorized: Malformed JWT token', $body->message);
- $this->assertContains('ApiAuthorizationException', $body->stacktrace);
+ $this->assertContainsPolyfill('ApiAuthorizationException', $body->stacktrace);
}
}
/**
* Class ApiUtilsTest
*/
-class ApiUtilsTest extends \PHPUnit\Framework\TestCase
+class ApiUtilsTest extends \Shaarli\TestCase
{
/**
* Force the timezone for ISO datetimes.
require_once 'tests/utils/ReferenceHistory.php';
-class HistoryTest extends \PHPUnit\Framework\TestCase
+class HistoryTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
<?php
namespace Shaarli\Api\Controllers;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
use Slim\Container;
use Slim\Http\Environment;
use Slim\Http\Request;
use Slim\Http\Request;
use Slim\Http\Response;
-class DeleteLinkTest extends \PHPUnit\Framework\TestCase
+class DeleteLinkTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
*
* @package Shaarli\Api\Controllers
*/
-class GetLinkIdTest extends \PHPUnit\Framework\TestCase
+class GetLinkIdTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
*
* @package Shaarli\Api\Controllers
*/
-class GetLinksTest extends \PHPUnit\Framework\TestCase
+class GetLinksTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
namespace Shaarli\Api\Controllers;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
use Slim\Container;
use Slim\Http\Environment;
use Slim\Http\Request;
use Slim\Http\Request;
use Slim\Http\Response;
-class PutLinkTest extends \PHPUnit\Framework\TestCase
+class PutLinkTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
use Slim\Http\Request;
use Slim\Http\Response;
-class DeleteTagTest extends \PHPUnit\Framework\TestCase
+class DeleteTagTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
*
* @package Shaarli\Api\Controllers
*/
-class GetTagNameTest extends \PHPUnit\Framework\TestCase
+class GetTagNameTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
*
* @package Shaarli\Api\Controllers
*/
-class GetTagsTest extends \PHPUnit\Framework\TestCase
+class GetTagsTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
use Slim\Http\Request;
use Slim\Http\Response;
-class PutTagTest extends \PHPUnit\Framework\TestCase
+class PutTagTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
namespace Shaarli\Bookmark;
-use PHPUnit\Framework\TestCase;
-use Shaarli\Bookmark\Exception\InvalidBookmarkException;
-use Shaarli\Config\ConfigManager;
-use Shaarli\History;
+use Shaarli\TestCase;
/**
* Class BookmarkArrayTest
namespace Shaarli\Bookmark;
use DateTime;
-use PHPUnit\Framework\TestCase;
use ReferenceLinkDB;
use ReflectionClass;
use Shaarli;
use Shaarli\Config\ConfigManager;
use Shaarli\Formatter\BookmarkMarkdownFormatter;
use Shaarli\History;
+use Shaarli\TestCase;
/**
* Unitary tests for LegacyLinkDBTest
*/
/**
* Attempt to instantiate a LinkDB whereas the datastore is not writable
- *
- * @expectedException Shaarli\Bookmark\Exception\NotWritableDataStoreException
*/
public function testConstructDatastoreNotWriteable()
{
+ $this->expectException(\Shaarli\Bookmark\Exception\NotWritableDataStoreException::class);
$this->expectExceptionMessageRegExp('#Couldn\'t load data from the data store file "null".*#');
$conf = new ConfigManager('tests/utils/config/configJson');
$link = $this->publicLinkDB->findByUrl('http://mediagoblin.org/');
$this->assertNotEquals(false, $link);
- $this->assertContains(
+ $this->assertContainsPolyfill(
'A free software media publishing platform',
$link->getDescription()
);
namespace Shaarli\Bookmark;
use Exception;
-use PHPUnit\Framework\TestCase;
use ReferenceLinkDB;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
/**
* Class BookmarkFilterTest.
/**
* Use an invalid date format
- * @expectedException Exception
*/
public function testFilterInvalidDayWithChars()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid date format/');
self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away');
/**
* Use an invalid date format
- * @expectedException Exception
*/
public function testFilterInvalidDayDigits()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid date format/');
self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20');
namespace Shaarli\Bookmark;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
/**
* Class BookmarkInitializerTest
namespace Shaarli\Bookmark;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Exception\InvalidBookmarkException;
+use Shaarli\TestCase;
/**
* Class BookmarkTest
$exception = $e;
}
$this->assertNotNull($exception);
- $this->assertContains('- ID: '. PHP_EOL, $exception->getMessage());
+ $this->assertContainsPolyfill('- ID: '. PHP_EOL, $exception->getMessage());
}
/**
$exception = $e;
}
$this->assertNotNull($exception);
- $this->assertContains('- ID: str'. PHP_EOL, $exception->getMessage());
+ $this->assertContainsPolyfill('- ID: str'. PHP_EOL, $exception->getMessage());
}
/**
$exception = $e;
}
$this->assertNotNull($exception);
- $this->assertContains('- ShortUrl: '. PHP_EOL, $exception->getMessage());
+ $this->assertContainsPolyfill('- ShortUrl: '. PHP_EOL, $exception->getMessage());
}
/**
$exception = $e;
}
$this->assertNotNull($exception);
- $this->assertContains('- Created: '. PHP_EOL, $exception->getMessage());
+ $this->assertContainsPolyfill('- Created: '. PHP_EOL, $exception->getMessage());
}
/**
$exception = $e;
}
$this->assertNotNull($exception);
- $this->assertContains('- Created: Not a DateTime object'. PHP_EOL, $exception->getMessage());
+ $this->assertContainsPolyfill('- Created: Not a DateTime object'. PHP_EOL, $exception->getMessage());
}
/**
namespace Shaarli\Bookmark;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
require_once 'tests/utils/CurlUtils.php';
カタカナ #カタカナ」カタカナ\n';
$autolinkedDescription = hashtag_autolink($rawDescription, $index);
- $this->assertContains($this->getHashtagLink('hashtag', $index), $autolinkedDescription);
- $this->assertNotContains(' #hashtag', $autolinkedDescription);
- $this->assertNotContains('>#nothashtag', $autolinkedDescription);
- $this->assertContains($this->getHashtagLink('ашок', $index), $autolinkedDescription);
- $this->assertContains($this->getHashtagLink('カタカナ', $index), $autolinkedDescription);
- $this->assertContains($this->getHashtagLink('hashtag_hashtag', $index), $autolinkedDescription);
- $this->assertNotContains($this->getHashtagLink('hashtag-nothashtag', $index), $autolinkedDescription);
+ $this->assertContainsPolyfill($this->getHashtagLink('hashtag', $index), $autolinkedDescription);
+ $this->assertNotContainsPolyfill(' #hashtag', $autolinkedDescription);
+ $this->assertNotContainsPolyfill('>#nothashtag', $autolinkedDescription);
+ $this->assertContainsPolyfill($this->getHashtagLink('ашок', $index), $autolinkedDescription);
+ $this->assertContainsPolyfill($this->getHashtagLink('カタカナ', $index), $autolinkedDescription);
+ $this->assertContainsPolyfill($this->getHashtagLink('hashtag_hashtag', $index), $autolinkedDescription);
+ $this->assertNotContainsPolyfill($this->getHashtagLink('hashtag-nothashtag', $index), $autolinkedDescription);
}
/**
$rawDescription = 'blabla #hashtag x#nothashtag';
$autolinkedDescription = hashtag_autolink($rawDescription);
- $this->assertContains($this->getHashtagLink('hashtag'), $autolinkedDescription);
- $this->assertNotContains(' #hashtag', $autolinkedDescription);
- $this->assertNotContains('>#nothashtag', $autolinkedDescription);
+ $this->assertContainsPolyfill($this->getHashtagLink('hashtag'), $autolinkedDescription);
+ $this->assertNotContainsPolyfill(' #hashtag', $autolinkedDescription);
+ $this->assertNotContainsPolyfill('>#nothashtag', $autolinkedDescription);
}
/**
require_once 'application/Utils.php';
require_once 'application/http/UrlUtils.php';
require_once 'application/http/HttpUtils.php';
+require_once 'tests/TestCase.php';
require_once 'tests/container/ShaarliTestContainer.php';
require_once 'tests/front/controller/visitor/FrontControllerMockHelper.php';
require_once 'tests/front/controller/admin/FrontAdminControllerMockHelper.php';
/**
* Class ConfigJsonTest
*/
-class ConfigJsonTest extends \PHPUnit\Framework\TestCase
+class ConfigJsonTest extends \Shaarli\TestCase
{
/**
* @var ConfigJson
public function testReadInvalidJson()
{
$this->expectException(\Exception::class);
- $this->expectExceptionMessageRegExp(' /An error occurred while parsing JSON configuration file \\([\\w\\/\\.]+\\): error code #4/');
+ $this->expectExceptionMessageRegExp('/An error occurred while parsing JSON configuration file \\([\\w\\/\\.]+\\): error code #4/');
$this->configIO->read('tests/utils/config/configInvalid.json.php');
}
unlink($dest);
}
- /**
- * Write to invalid path.
- */
- public function testWriteInvalidArray()
- {
- $this->expectException(\Shaarli\Exceptions\IOException::class);
-
- $conf = array('conf' => 'value');
- @$this->configIO->write(array(), $conf);
- }
-
/**
* Write to invalid path.
*/
* Note: it only test the manager with ConfigJson,
* ConfigPhp is only a workaround to handle the transition to JSON type.
*/
-class ConfigManagerTest extends \PHPUnit\Framework\TestCase
+class ConfigManagerTest extends \Shaarli\TestCase
{
/**
* @var ConfigManager
* which are kept between tests.
* @runTestsInSeparateProcesses
*/
-class ConfigPhpTest extends \PHPUnit\Framework\TestCase
+class ConfigPhpTest extends \Shaarli\TestCase
{
/**
* @var ConfigPhp
/**
* Unitary tests for Shaarli config related functions
*/
-class ConfigPluginTest extends \PHPUnit\Framework\TestCase
+class ConfigPluginTest extends \Shaarli\TestCase
{
/**
* Test save_plugin_config with valid data.
namespace Shaarli\Container;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkServiceInterface;
use Shaarli\Config\ConfigManager;
use Shaarli\Feed\FeedBuilder;
use Shaarli\Security\CookieManager;
use Shaarli\Security\LoginManager;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Shaarli\Updater\Updater;
use Slim\Http\Environment;
/**
* Unitary tests for cached pages
*/
-class CachedPageTest extends \PHPUnit\Framework\TestCase
+class CachedPageTest extends \Shaarli\TestCase
{
// test cache directory
protected static $testCacheDir = 'sandbox/pagecache';
namespace Shaarli\Feed;
use DateTime;
-use PHPUnit\Framework\TestCase;
use ReferenceLinkDB;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Config\ConfigManager;
use Shaarli\Formatter\FormatterFactory;
use Shaarli\History;
+use Shaarli\TestCase;
/**
* FeedBuilderTest class.
$pub = DateTime::createFromFormat(DateTime::RSS, $link['pub_iso_date']);
$up = DateTime::createFromFormat(DateTime::ATOM, $link['up_iso_date']);
$this->assertEquals($pub, $up);
- $this->assertContains('Stallman has a beard', $link['description']);
- $this->assertContains('Permalink', $link['description']);
- $this->assertContains('http://host.tld/shaare/WDWyig', $link['description']);
+ $this->assertContainsPolyfill('Stallman has a beard', $link['description']);
+ $this->assertContainsPolyfill('Permalink', $link['description']);
+ $this->assertContainsPolyfill('http://host.tld/shaare/WDWyig', $link['description']);
$this->assertEquals(1, count($link['taglist']));
$this->assertEquals('sTuff', $link['taglist'][0]);
$this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
$this->assertEquals('http://host.tld/shaare/WDWyig', $link['guid']);
$this->assertEquals('http://host.tld/shaare/WDWyig', $link['url']);
- $this->assertContains('Direct link', $link['description']);
- $this->assertContains('http://host.tld/shaare/WDWyig', $link['description']);
+ $this->assertContainsPolyfill('Direct link', $link['description']);
+ $this->assertContainsPolyfill('http://host.tld/shaare/WDWyig', $link['description']);
// Second link is a direct link
$link = $data['links'][array_keys($data['links'])[1]];
$this->assertEquals(8, $link['id']);
$this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114633'), $link['created']);
$this->assertEquals('http://host.tld/shaare/RttfEw', $link['guid']);
$this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['url']);
- $this->assertContains('Direct link', $link['description']);
- $this->assertContains('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['description']);
+ $this->assertContainsPolyfill('Direct link', $link['description']);
+ $this->assertContainsPolyfill('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['description']);
}
/**
$link = $data['links'][array_keys($data['links'])[0]];
$this->assertEquals('http://host.tld:8080/~user/shaarli/shaare/WDWyig', $link['guid']);
$this->assertEquals('http://host.tld:8080/~user/shaarli/shaare/WDWyig', $link['url']);
- $this->assertContains('http://host.tld:8080/~user/shaarli/./add-tag/hashtag', $link['description']);
+ $this->assertContainsPolyfill('http://host.tld:8080/~user/shaarli/./add-tag/hashtag', $link['description']);
}
}
namespace Shaarli\Formatter;
use DateTime;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
+use Shaarli\TestCase;
/**
* Class BookmarkDefaultFormatterTest
namespace Shaarli\Formatter;
use DateTime;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
+use Shaarli\TestCase;
/**
* Class BookmarkMarkdownFormatterTest
namespace Shaarli\Formatter;
use DateTime;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
+use Shaarli\TestCase;
/**
* Class BookmarkRawFormatterTest
namespace Shaarli\Formatter;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
+use Shaarli\TestCase;
/**
* Class FormatterFactoryTest
namespace Shaarli\Front;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Container\ShaarliContainer;
use Shaarli\Security\LoginManager;
+use Shaarli\TestCase;
use Shaarli\Updater\Updater;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Container\ShaarliContainer;
use Shaarli\Front\Exception\LoginBannedException;
use Shaarli\Render\PageBuilder;
use Shaarli\Render\PageCacheManager;
use Shaarli\Security\LoginManager;
+use Shaarli\TestCase;
use Shaarli\Updater\Updater;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Formatter\BookmarkFormatter;
use Shaarli\Formatter\BookmarkRawFormatter;
use Shaarli\Netscape\NetscapeBookmarkUtils;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Psr\Http\Message\UploadedFileInterface;
use Shaarli\Netscape\NetscapeBookmarkUtils;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Http\UploadedFile;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Security\CookieManager;
-use Shaarli\Security\LoginManager;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Formatter\BookmarkFormatter;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Formatter\BookmarkFormatter;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_editlink'], ['render_includes'])
->willReturnCallback(function (string $hook, array $data) use ($remoteTitle, $remoteDesc): array {
- static::assertSame('render_editlink', $hook);
- static::assertSame($remoteTitle, $data['link']['title']);
- static::assertSame($remoteDesc, $data['link']['description']);
+ if ('render_editlink' === $hook) {
+ static::assertSame($remoteTitle, $data['link']['title']);
+ static::assertSame($remoteDesc, $data['link']['description']);
+ }
return $data;
})
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
use Shaarli\Front\Controller\Admin\ManageShaareController;
use Shaarli\Http\HttpAccess;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Http\HttpAccess;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['save_link'])
->willReturnCallback(function (string $hook, array $data) use ($parameters, $id): array {
- static::assertSame('save_link', $hook);
-
- static::assertSame($id, $data['id']);
- static::assertSame($parameters['lf_url'], $data['url']);
- static::assertSame($parameters['lf_title'], $data['title']);
- static::assertSame($parameters['lf_description'], $data['description']);
- static::assertSame($parameters['lf_tags'], $data['tags']);
- static::assertTrue($data['private']);
+ if ('save_link' === $hook) {
+ static::assertSame($id, $data['id']);
+ static::assertSame($parameters['lf_url'], $data['url']);
+ static::assertSame($parameters['lf_title'], $data['title']);
+ static::assertSame($parameters['lf_description'], $data['description']);
+ static::assertSame($parameters['lf_tags'], $data['tags']);
+ static::assertTrue($data['private']);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['save_link'])
->willReturnCallback(function (string $hook, array $data) use ($parameters, $id): array {
- static::assertSame('save_link', $hook);
-
- static::assertSame($id, $data['id']);
- static::assertSame($parameters['lf_url'], $data['url']);
- static::assertSame($parameters['lf_title'], $data['title']);
- static::assertSame($parameters['lf_description'], $data['description']);
- static::assertSame($parameters['lf_tags'], $data['tags']);
- static::assertTrue($data['private']);
+ if ('save_link' === $hook) {
+ static::assertSame($id, $data['id']);
+ static::assertSame($parameters['lf_url'], $data['url']);
+ static::assertSame($parameters['lf_title'], $data['title']);
+ static::assertSame($parameters['lf_description'], $data['description']);
+ static::assertSame($parameters['lf_tags'], $data['tags']);
+ static::assertTrue($data['private']);
+ }
return $data;
})
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkFilter;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\OpenShaarliPasswordException;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Plugin\PluginManager;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Security\LoginManager;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
/**
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Admin;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Config\ConfigManager;
use Shaarli\Security\LoginManager;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Feed\CachedPage;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_daily'])
->willReturnCallback(function (string $hook, array $data, array $param) use ($currentDay): array {
- static::assertSame('render_daily', $hook);
+ if ('render_daily' === $hook) {
+ static::assertArrayHasKey('linksToDisplay', $data);
+ static::assertCount(3, $data['linksToDisplay']);
+ static::assertSame(1, $data['linksToDisplay'][0]['id']);
+ static::assertSame($currentDay->getTimestamp(), $data['day']);
+ static::assertSame('20200510', $data['previousday']);
+ static::assertSame('20200516', $data['nextday']);
- static::assertArrayHasKey('linksToDisplay', $data);
- static::assertCount(3, $data['linksToDisplay']);
- static::assertSame(1, $data['linksToDisplay'][0]['id']);
- static::assertSame($currentDay->getTimestamp(), $data['day']);
- static::assertSame('20200510', $data['previousday']);
- static::assertSame('20200516', $data['nextday']);
-
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_daily'])
->willReturnCallback(function (string $hook, array $data, array $param) use ($currentDay): array {
- static::assertSame('render_daily', $hook);
-
- static::assertArrayHasKey('linksToDisplay', $data);
- static::assertCount(1, $data['linksToDisplay']);
- static::assertSame(1, $data['linksToDisplay'][0]['id']);
- static::assertSame($currentDay->getTimestamp(), $data['day']);
- static::assertEmpty($data['previousday']);
- static::assertEmpty($data['nextday']);
+ if ('render_daily' === $hook) {
+ static::assertArrayHasKey('linksToDisplay', $data);
+ static::assertCount(1, $data['linksToDisplay']);
+ static::assertSame(1, $data['linksToDisplay'][0]['id']);
+ static::assertSame($currentDay->getTimestamp(), $data['day']);
+ static::assertEmpty($data['previousday']);
+ static::assertEmpty($data['nextday']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
});
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
->willReturnCallback(function (string $hook, array $data, array $param): array {
return $data;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
->willReturnCallback(function (string $hook, array $data, array $param): array {
return $data;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Front\Exception\ShaarliFrontException;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Http\Uri;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Feed\FeedBuilder;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_feed'])
->willReturnCallback(function (string $hook, array $data, array $param): void {
- static::assertSame('render_feed', $hook);
- static::assertSame('data', $data['content']);
+ if ('render_feed' === $hook) {
+ static::assertSame('data', $data['content']);
- static::assertArrayHasKey('loggedin', $param);
- static::assertSame('feed.rss', $param['target']);
+ static::assertArrayHasKey('loggedin', $param);
+ static::assertSame('feed.rss', $param['target']);
+ }
})
;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_feed'])
->willReturnCallback(function (string $hook, array $data, array $param): void {
- static::assertSame('render_feed', $hook);
- static::assertSame('data', $data['content']);
+ if ('render_feed' === $hook) {
+ static::assertSame('data', $data['content']);
- static::assertArrayHasKey('loggedin', $param);
- static::assertSame('feed.atom', $param['target']);
+ static::assertArrayHasKey('loggedin', $param);
+ static::assertSame('feed.atom', $param['target']);
+ }
})
;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_feed'])
->willReturnCallback(function (string $hook, array $data, array $param): void {
- static::assertSame('render_feed', $hook);
- static::assertSame('data', $data['content']);
+ if ('render_feed' === $hook) {
+ static::assertSame('data', $data['content']);
- static::assertArrayHasKey('loggedin', $param);
- static::assertSame('feed.atom', $param['target']);
+ static::assertArrayHasKey('loggedin', $param);
+ static::assertSame('feed.atom', $param['target']);
+ }
})
;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\MockObject\MockObject;
use Shaarli\Bookmark\BookmarkServiceInterface;
use Shaarli\Config\ConfigManager;
use Shaarli\Container\ShaarliTestContainer;
/**
* Force to be used in PHPUnit context.
*/
- protected abstract function createMock($originalClassName): MockObject;
+ protected abstract function isInTestsContext(): bool;
}
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\AlreadyInstalledException;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\LoginBannedException;
use Shaarli\Front\Exception\WrongTokenException;
use Shaarli\Render\TemplatePage;
use Shaarli\Security\CookieManager;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
use Shaarli\Front\Exception\ThumbnailsDisabledException;
+use Shaarli\TestCase;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_picwall'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_picwall', $hook);
- static::assertArrayHasKey('linksToDisplay', $data);
- static::assertCount(2, $data['linksToDisplay']);
- static::assertSame(1, $data['linksToDisplay'][0]['id']);
- static::assertSame(3, $data['linksToDisplay'][1]['id']);
- static::assertArrayHasKey('loggedin', $param);
+ if ('render_picwall' === $hook) {
+ static::assertArrayHasKey('linksToDisplay', $data);
+ static::assertCount(2, $data['linksToDisplay']);
+ static::assertSame(1, $data['linksToDisplay'][0]['id']);
+ static::assertSame(3, $data['linksToDisplay'][1]['id']);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
});
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFilter;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFilter;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_tagcloud'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_tagcloud', $hook);
- static::assertSame('', $data['search_tags']);
- static::assertCount(3, $data['tags']);
+ if ('render_tagcloud' === $hook) {
+ static::assertSame('', $data['search_tags']);
+ static::assertCount(3, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_tagcloud'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_tagcloud', $hook);
- static::assertSame('ghi def', $data['search_tags']);
- static::assertCount(1, $data['tags']);
+ if ('render_tagcloud' === $hook) {
+ static::assertSame('ghi def', $data['search_tags']);
+ static::assertCount(1, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_tagcloud'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_tagcloud', $hook);
- static::assertSame('', $data['search_tags']);
- static::assertCount(0, $data['tags']);
+ if ('render_tagcloud' === $hook) {
+ static::assertSame('', $data['search_tags']);
+ static::assertCount(0, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_taglist'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_taglist', $hook);
- static::assertSame('', $data['search_tags']);
- static::assertCount(3, $data['tags']);
+ if ('render_taglist' === $hook) {
+ static::assertSame('', $data['search_tags']);
+ static::assertCount(3, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_taglist'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_taglist', $hook);
- static::assertSame('ghi def', $data['search_tags']);
- static::assertCount(1, $data['tags']);
+ if ('render_taglist' === $hook) {
+ static::assertSame('ghi def', $data['search_tags']);
+ static::assertCount(1, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
// Make sure that PluginManager hook is triggered
$this->container->pluginManager
- ->expects(static::at(0))
+ ->expects(static::atLeastOnce())
->method('executeHooks')
+ ->withConsecutive(['render_taglist'])
->willReturnCallback(function (string $hook, array $data, array $param): array {
- static::assertSame('render_taglist', $hook);
- static::assertSame('', $data['search_tags']);
- static::assertCount(0, $data['tags']);
+ if ('render_taglist' === $hook) {
+ static::assertSame('', $data['search_tags']);
+ static::assertCount(0, $data['tags']);
- static::assertArrayHasKey('loggedin', $param);
+ static::assertArrayHasKey('loggedin', $param);
+ }
return $data;
})
namespace Shaarli\Front\Controller\Visitor;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
/**
* Unitary tests for client_ip_id()
*/
-class ClientIpIdTest extends \PHPUnit\Framework\TestCase
+class ClientIpIdTest extends \Shaarli\TestCase
{
/**
* Get a remote client ID based on its IP
/**
* Unitary tests for get_http_response()
*/
-class GetHttpUrlTest extends \PHPUnit\Framework\TestCase
+class GetHttpUrlTest extends \Shaarli\TestCase
{
/**
* Get an invalid local URL
/**
* Unitary tests for getIpAddressFromProxy()
*/
-class GetIpAdressFromProxyTest extends \PHPUnit\Framework\TestCase
+class GetIpAdressFromProxyTest extends \Shaarli\TestCase
{
/**
namespace Shaarli\Http;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
require_once 'application/http/HttpUtils.php';
namespace Shaarli\Http;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
/**
* Test index_url with SHAARLI_ROOT_URL defined to override automatic retrieval.
*
* Test class for is_https() function.
*/
-class IsHttpsTest extends \PHPUnit\Framework\TestCase
+class IsHttpsTest extends \Shaarli\TestCase
{
/**
/**
* Unitary tests for page_url()
*/
-class PageUrlTest extends \PHPUnit\Framework\TestCase
+class PageUrlTest extends \Shaarli\TestCase
{
/**
* If on the main page, remove "index.php" from the URL resource
/**
* Unitary tests for server_url()
*/
-class ServerUrlTest extends \PHPUnit\Framework\TestCase
+class ServerUrlTest extends \Shaarli\TestCase
{
/**
* Detect if the server uses SSL
/**
* Unitary tests for URL utilities
*/
-class UrlTest extends \PHPUnit\Framework\TestCase
+class UrlTest extends \Shaarli\TestCase
{
// base URL for tests
protected static $baseUrl = 'http://domain.tld:3000';
require_once 'application/http/UrlUtils.php';
-class CleanupUrlTest extends \PHPUnit\Framework\TestCase
+class CleanupUrlTest extends \Shaarli\TestCase
{
/**
* @var string reference URL
require_once 'application/http/UrlUtils.php';
-class GetUrlSchemeTest extends \PHPUnit\Framework\TestCase
+class GetUrlSchemeTest extends \Shaarli\TestCase
{
/**
* Get empty scheme string for empty UrlUtils
/**
* Unitary tests for unparse_url()
*/
-class UnparseUrlTest extends \PHPUnit\Framework\TestCase
+class UnparseUrlTest extends \Shaarli\TestCase
{
/**
* Thanks for building nothing
*
* Test whitelist_protocols() function of UrlUtils.
*/
-class WhitelistProtocolsTest extends \PHPUnit\Framework\TestCase
+class WhitelistProtocolsTest extends \Shaarli\TestCase
{
/**
* Test whitelist_protocols() on a note (relative URL).
*
* @package Shaarli
*/
-class LanguagesFrTest extends \PHPUnit\Framework\TestCase
+class LanguagesFrTest extends \Shaarli\TestCase
{
/**
* @var string Config file path (without extension).
namespace Shaarli\Legacy;
-use PHPUnit\Framework\TestCase;
use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper;
+use Shaarli\TestCase;
use Slim\Http\Request;
use Slim\Http\Response;
/**
* Unitary tests for LegacyLinkDBTest
*/
-class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase
+class LegacyLinkDBTest extends \Shaarli\TestCase
{
// datastore to test write operations
protected static $testDatastore = 'sandbox/datastore.php';
/**
* Attempt to instantiate a LinkDB whereas the datastore is not writable
- *
- * @expectedException Shaarli\Exceptions\IOException
*/
public function testConstructDatastoreNotWriteable()
{
+ $this->expectException(\Shaarli\Exceptions\IOException::class);
$this->expectExceptionMessageRegExp('/Error accessing "null"/');
new LegacyLinkDB('null/store.db', false, false);
$link = self::$publicLinkDB->getLinkFromUrl('http://mediagoblin.org/');
$this->assertNotEquals(false, $link);
- $this->assertContains(
+ $this->assertContainsPolyfill(
'A free software media publishing platform',
$link['description']
);
$res = $linkDB->renameTag('cartoon', 'Taz');
$this->assertEquals(3, count($res));
- $this->assertContains(' Taz ', $linkDB[4]['tags']);
- $this->assertContains(' Taz ', $linkDB[1]['tags']);
- $this->assertContains(' Taz ', $linkDB[0]['tags']);
+ $this->assertContainsPolyfill(' Taz ', $linkDB[4]['tags']);
+ $this->assertContainsPolyfill(' Taz ', $linkDB[1]['tags']);
+ $this->assertContainsPolyfill(' Taz ', $linkDB[0]['tags']);
}
/**
$res = $linkDB->renameTag('cartoon', null);
$this->assertEquals(3, count($res));
- $this->assertNotContains('cartoon', $linkDB[4]['tags']);
+ $this->assertNotContainsPolyfill('cartoon', $linkDB[4]['tags']);
}
/**
/**
* Class LegacyLinkFilterTest.
*/
-class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase
+class LegacyLinkFilterTest extends \Shaarli\TestCase
{
/**
* @var string Test datastore path.
/**
* Use an invalid date format
- * @expectedException Exception
*/
public function testFilterInvalidDayWithChars()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid date format/');
self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, 'Rainy day, dream away');
/**
* Use an invalid date format
- * @expectedException Exception
*/
public function testFilterInvalidDayDigits()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid date format/');
self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, '20');
* Class UpdaterTest.
* Runs unit tests against the updater class.
*/
-class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase
+class LegacyUpdaterTest extends \Shaarli\TestCase
{
/**
* @var string Path to test datastore.
/**
* Test errors in UpdaterUtils::write_updates_file(): empty updates file.
- *
- * @expectedException Exception
*/
public function testWriteEmptyUpdatesFile()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
UpdaterUtils::write_updates_file('', array('test'));
/**
* Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
- *
- * @expectedException Exception
*/
public function testWriteUpdatesFileNotWritable()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Unable to write(.*)/');
$updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
$this->assertEquals(\Shaarli\Thumbnailer::MODE_ALL, $this->conf->get('thumbnails.mode'));
$this->assertEquals(125, $this->conf->get('thumbnails.width'));
$this->assertEquals(90, $this->conf->get('thumbnails.height'));
- $this->assertContains('You have enabled or changed thumbnails', $_SESSION['warnings'][0]);
+ $this->assertContainsPolyfill('You have enabled or changed thumbnails', $_SESSION['warnings'][0]);
}
/**
namespace Shaarli\Netscape;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Config\ConfigManager;
use Shaarli\Formatter\BookmarkFormatter;
use Shaarli\Formatter\FormatterFactory;
use Shaarli\History;
+use Shaarli\TestCase;
require_once 'tests/utils/ReferenceLinkDB.php';
/**
* Attempt to export an invalid link selection
- * @expectedException Exception
*/
public function testFilterAndFormatInvalid()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid export selection/');
$this->netscapeBookmarkUtils->filterAndFormat(
namespace Shaarli\Netscape;
use DateTime;
-use PHPUnit\Framework\TestCase;
use Psr\Http\Message\UploadedFileInterface;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Bookmark\BookmarkFilter;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
use Slim\Http\UploadedFile;
/**
/**
* Unit test for the Addlink toolbar plugin
*/
-class PluginAddlinkTest extends \PHPUnit\Framework\TestCase
+class PluginAddlinkTest extends \Shaarli\TestCase
{
/**
* Reset plugin path.
* PluginArchiveorgTest.php
*/
-use PHPUnit\Framework\TestCase;
use Shaarli\Plugin\PluginManager;
+use Shaarli\TestCase;
require_once 'plugins/archiveorg/archiveorg.php';
namespace Shaarli\Plugin\DefaultColors;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\LinkDB;
use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager;
+use Shaarli\TestCase;
require_once 'plugins/default_colors/default_colors.php';
namespace Shaarli\Plugin\Isso;
use DateTime;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\Bookmark;
use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager;
+use Shaarli\TestCase;
require_once 'plugins/isso/isso.php';
$processed = hook_isso_render_linklist($data, $conf);
// link_plugin should be added for the icon
- $this->assertContains('<a href="/shaare/'. $short1 .'#isso-thread">', $processed['links'][0]['link_plugin'][0]);
- $this->assertContains('<a href="/shaare/'. $short2 .'#isso-thread">', $processed['links'][1]['link_plugin'][0]);
+ $this->assertContainsPolyfill('<a href="/shaare/'. $short1 .'#isso-thread">', $processed['links'][0]['link_plugin'][0]);
+ $this->assertContainsPolyfill('<a href="/shaare/'. $short2 .'#isso-thread">', $processed['links'][1]['link_plugin'][0]);
}
/**
$processed = hook_isso_render_linklist($data, $conf);
// link_plugin should be added for the icon
- $this->assertContains('<a href="/shaare/'. $short1 .'#isso-thread">', $processed['links'][0]['link_plugin'][0]);
+ $this->assertContainsPolyfill('<a href="/shaare/'. $short1 .'#isso-thread">', $processed['links'][0]['link_plugin'][0]);
}
/**
* Class PluginPlayvideosTest
* Unit test for the PlayVideos plugin
*/
-class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase
+class PluginPlayvideosTest extends \Shaarli\TestCase
{
/**
* Reset plugin path
* Class PluginPubsubhubbubTest
* Unit test for the pubsubhubbub plugin
*/
-class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase
+class PluginPubsubhubbubTest extends \Shaarli\TestCase
{
/**
* @var string Config file path (without extension).
* Class PluginQrcodeTest
* Unit test for the QR-Code plugin
*/
-class PluginQrcodeTest extends \PHPUnit\Framework\TestCase
+class PluginQrcodeTest extends \Shaarli\TestCase
{
/**
* Reset plugin path
* Class PluginWallabagTest
* Unit test for the Wallabag plugin
*/
-class PluginWallabagTest extends \PHPUnit\Framework\TestCase
+class PluginWallabagTest extends \Shaarli\TestCase
{
/**
* Reset plugin path
/**
* Class WallabagInstanceTest
*/
-class WallabagInstanceTest extends \PHPUnit\Framework\TestCase
+class WallabagInstanceTest extends \Shaarli\TestCase
{
/**
* @var string wallabag url.
namespace Shaarli\Render;
-use PHPUnit\Framework\TestCase;
use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
/**
* Unitary tests for cached pages
*
* @package Shaarli
*/
-class ThemeUtilsTest extends \PHPUnit\Framework\TestCase
+class ThemeUtilsTest extends \Shaarli\TestCase
{
/**
* Test getThemes() with existing theme directories.
namespace Shaarli\Security;
-use PHPUnit\Framework\TestCase;
use Shaarli\FileUtils;
+use Shaarli\TestCase;
/**
* Test coverage for BanManager
namespace Shaarli\Security;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
/**
* Test coverage for LoginManager
namespace Shaarli\Security;
-use PHPUnit\Framework\TestCase;
+use Shaarli\TestCase;
/**
* Test coverage for SessionManager
*
* @return bool true.
*/
- final private function updateMethodDummy1()
+ final protected function updateMethodDummy1()
{
return true;
}
*
* @return bool true.
*/
- final private function updateMethodDummy2()
+ final protected function updateMethodDummy2()
{
return true;
}
*
* @return bool true.
*/
- final private function updateMethodDummy3()
+ final protected function updateMethodDummy3()
{
return true;
}
*
* @throws Exception error.
*/
- final private function updateMethodException()
+ final protected function updateMethodException()
{
throw new Exception('whatever');
}
namespace Shaarli\Updater;
use Exception;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Bookmark\BookmarkServiceInterface;
use Shaarli\Config\ConfigManager;
use Shaarli\History;
+use Shaarli\TestCase;
/**
/**
* Test errors in UpdaterUtils::write_updates_file(): empty updates file.
- *
- * @expectedException Exception
*/
public function testWriteEmptyUpdatesFile()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
UpdaterUtils::write_updates_file('', array('test'));
/**
* Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
- *
- * @expectedException Exception
*/
public function testWriteUpdatesFileNotWritable()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Unable to write(.*)/');
$updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';