From 11031114e2cebe20f89fe38718dec5a541f81c7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jan 2021 03:48:34 +0000 Subject: [PATCH 1/2] Bump friendsofphp/php-cs-fixer from 2.17.3 to 2.18.0 Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 2.17.3 to 2.18.0. - [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases) - [Changelog](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.18.0/CHANGELOG.md) - [Commits](https://github.com/FriendsOfPHP/PHP-CS-Fixer/compare/v2.17.3...v2.18.0) Signed-off-by: dependabot[bot] --- composer.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.lock b/composer.lock index ded061918..f764fb4c9 100644 --- a/composer.lock +++ b/composer.lock @@ -7852,6 +7852,7 @@ } ], "description": "A security checker for your composer.lock", + "abandoned": "https://github.com/fabpot/local-php-security-checker", "time": "2019-11-01T13:20:14+00:00" }, { @@ -9476,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": { @@ -9494,7 +9495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -9545,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", @@ -11137,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": { @@ -11168,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", @@ -11177,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": { @@ -11233,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", From 381f9681b55814bcc39a108a1ad6911489c7f1b4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 18 Jan 2021 10:38:56 +0100 Subject: [PATCH 2/2] Fix CS --- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- src/Wallabag/CoreBundle/Entity/Tag.php | 2 +- src/Wallabag/CoreBundle/Helper/ContentProxy.php | 6 +++--- src/Wallabag/CoreBundle/Helper/TagsAssigner.php | 2 +- src/Wallabag/CoreBundle/Twig/WallabagExtension.php | 2 +- src/Wallabag/ImportBundle/Import/PocketImport.php | 2 +- .../ApiBundle/Controller/EntryRestControllerTest.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) 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()