diff --git a/composer.lock b/composer.lock index 1db1935e8..719044f3d 100644 --- a/composer.lock +++ b/composer.lock @@ -9477,16 +9477,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { @@ -9495,7 +9495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -9546,7 +9546,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", @@ -11138,16 +11138,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.17.3", + "version": "v2.18.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595" + "reference": "cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bd32f5dd72cdfc7b53f54077f980e144bfa2f595", - "reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef", + "reference": "cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef", "shasum": "" }, "require": { @@ -11169,7 +11169,6 @@ "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", "keradus/cli-executor": "^1.4", "mikey179/vfsstream": "^1.6", @@ -11178,11 +11177,11 @@ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.1", + "symfony/phpunit-bridge": "^5.2.1", "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { @@ -11234,7 +11233,7 @@ "type": "github" } ], - "time": "2020-12-24T11:14:44+00:00" + "time": "2021-01-18T03:31:06+00:00" }, { "name": "m6web/redis-mock", diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 42f8aff35..d5873ca8d 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -327,7 +327,7 @@ class ConfigController extends Controller $backupCodes = (new BackupCodes())->toArray(); $backupCodesHashed = array_map( function ($backupCode) { - return password_hash($backupCode, PASSWORD_DEFAULT); + return password_hash($backupCode, \PASSWORD_DEFAULT); }, $backupCodes ); diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 9fb2f94fd..6588785bf 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -84,7 +84,7 @@ class Tag */ public function setLabel($label) { - $this->label = mb_convert_case($label, MB_CASE_LOWER); + $this->label = mb_convert_case($label, \MB_CASE_LOWER); return $this; } diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 7e93249dd..cd9c17e77 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -141,7 +141,7 @@ class ContentProxy $date = $value; // is it a timestamp? - if (false !== filter_var($date, FILTER_VALIDATE_INT)) { + if (false !== filter_var($date, \FILTER_VALIDATE_INT)) { $date = '@' . $date; } @@ -163,7 +163,7 @@ class ContentProxy */ public function setEntryDomainName(Entry $entry) { - $domainName = parse_url($entry->getUrl(), PHP_URL_HOST); + $domainName = parse_url($entry->getUrl(), \PHP_URL_HOST); if (false !== $domainName) { $entry->setDomainName($domainName); } @@ -177,7 +177,7 @@ class ContentProxy public function setDefaultEntryTitle(Entry $entry) { $url = parse_url($entry->getUrl()); - $path = pathinfo($url['path'], PATHINFO_BASENAME); + $path = pathinfo($url['path'], \PATHINFO_BASENAME); if (empty($path)) { $path = $url['host']; diff --git a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php index 433b09fef..0b4e1e29f 100644 --- a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php +++ b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php @@ -44,7 +44,7 @@ class TagsAssigner } foreach ($tags as $label) { - $label = trim(mb_convert_case($label, MB_CASE_LOWER)); + $label = trim(mb_convert_case($label, \MB_CASE_LOWER)); // avoid empty tag if (0 === \strlen($label)) { diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index fe7ce8c1b..01fcf5674 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php @@ -158,7 +158,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface $nbDays = (int) $interval->format('%a') ?: 1; // force setlocale for date translation - setlocale(LC_TIME, strtolower($user->getConfig()->getLanguage()) . '_' . strtoupper(strtolower($user->getConfig()->getLanguage()))); + setlocale(\LC_TIME, strtolower($user->getConfig()->getLanguage()) . '_' . strtoupper(strtolower($user->getConfig()->getLanguage()))); return $this->translator->trans('footer.stats', [ '%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()), diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 24fdaa2b8..469a8f16c 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -246,7 +246,7 @@ class PocketImport extends AbstractImport { $data = json_decode((string) $response->getBody(), true); - if (JSON_ERROR_NONE !== json_last_error()) { + if (\JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException('Unable to parse JSON data: ' . json_last_error_msg()); } diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 644727448..c058c52f7 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -832,7 +832,7 @@ class EntryRestControllerTest extends WallabagApiTestCase $this->client->request('GET', '/api/entries/' . $entry->getId() . '/tags'); - $this->assertSame(json_encode($tags, JSON_HEX_QUOT), $this->client->getResponse()->getContent()); + $this->assertSame(json_encode($tags, \JSON_HEX_QUOT), $this->client->getResponse()->getContent()); } public function testPostTagsOnEntry()