From bee59d1c4a6b8546ef49070264bbd7a4bbc41dd8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 15 Jul 2024 10:44:49 +0200 Subject: [PATCH 1/3] Update site config --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 4c4c20ed9..c2a61423b 100644 --- a/composer.lock +++ b/composer.lock @@ -4605,16 +4605,16 @@ }, { "name": "j0k3r/graby-site-config", - "version": "1.0.185", + "version": "1.0.189", "source": { "type": "git", "url": "https://github.com/j0k3r/graby-site-config.git", - "reference": "c2fed027457913fe2e51b68283f1aca019524740" + "reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/c2fed027457913fe2e51b68283f1aca019524740", - "reference": "c2fed027457913fe2e51b68283f1aca019524740", + "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/4c4721be3e7b8830dd6881ff80e149fb14a19bb8", + "reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8", "shasum": "" }, "require": { @@ -4643,9 +4643,9 @@ "description": "Graby site config files", "support": { "issues": "https://github.com/j0k3r/graby-site-config/issues", - "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.185" + "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.189" }, - "time": "2024-04-01T02:12:50+00:00" + "time": "2024-07-01T02:17:59+00:00" }, { "name": "j0k3r/httplug-ssrf-plugin", From 580c5fe810f0aab3ccc1784112b63c050e9fd400 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 15 Jul 2024 10:54:21 +0200 Subject: [PATCH 2/3] Downgrade `lcobucci/jwt` because of auth problem --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 182008d5a..2d05b6065 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ "kphoen/rulerz": "^0.21.1", "kphoen/rulerz-bundle": "^0.15", "laminas/laminas-code": "^4.7.1", - "lcobucci/jwt": "^4.3.0", + "lcobucci/jwt": "4.1.5", "lexik/form-filter-bundle": "^7.0.3", "mgargano/simplehtmldom": "^1.5", "mnapoli/piwik-twig-extension": "^3.0", diff --git a/composer.lock b/composer.lock index c2a61423b..4de0c259d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c8e57d1a42415287fe16f3417d0c1b01", + "content-hash": "313f6b39034c27c58a102bfadb5ae30f", "packages": [ { "name": "babdev/pagerfanta-bundle", @@ -5551,16 +5551,16 @@ }, { "name": "lcobucci/jwt", - "version": "4.3.0", + "version": "4.1.5", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4" + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4", - "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", "shasum": "" }, "require": { @@ -5569,19 +5569,19 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "lcobucci/clock": "^2.0 || ^3.0", + "lcobucci/clock": "^2.0", "php": "^7.4 || ^8.0" }, "require-dev": { "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.2", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, @@ -5609,7 +5609,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.3.0" + "source": "https://github.com/lcobucci/jwt/tree/4.1.5" }, "funding": [ { @@ -5621,7 +5621,7 @@ "type": "patreon" } ], - "time": "2023-01-02T13:28:00+00:00" + "time": "2021-09-28T19:34:56+00:00" }, { "name": "lexik/form-filter-bundle", From 898890c3715fb486076df1c5e4e1c050592dd2b2 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 15 Jul 2024 13:11:18 +0200 Subject: [PATCH 3/3] Fix tests --- .../Controller/EntryControllerTest.php | 12 ++++++------ .../Controller/FirefoxControllerTest.php | 17 ----------------- .../fixtures/firefox-bookmarks.json | 4 ++-- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index db5555cda..35d6e8f90 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -17,9 +17,9 @@ use Wallabag\UserBundle\Entity\User; class EntryControllerTest extends WallabagCoreTestCase { - public const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; + public const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment'; public $downloadImagesEnabled = false; - public $url = 'https://www.lemonde.fr/pixels/article/2019/06/18/ce-qu-il-faut-savoir-sur-le-libra-la-cryptomonnaie-de-facebook_5477887_4408996.html'; + public $url = 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment'; private $entryDataTestAttribute = '[data-test="entry"]'; /** @@ -175,9 +175,9 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertInstanceOf(Entry::class, $content); $this->assertSame($this->url, $content->getUrl()); - $this->assertStringContainsString('la cryptomonnaie de Facebook', $content->getTitle()); + $this->assertStringContainsString('Comment Hidalgo', $content->getTitle()); $this->assertSame('fr', $content->getLanguage()); - $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); + $this->assertArrayHasKey('cache-control', $content->getHeaders()); $client->getContainer()->get(Config::class)->set('store_article_headers', 0); } @@ -1218,7 +1218,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertInstanceOf(Entry::class, $entry); $this->assertSame($url, $entry->getUrl()); - $this->assertStringContainsString('Judo', $entry->getTitle()); + $this->assertStringContainsString('Comment Hidalgo', $entry->getTitle()); // instead of checking for the filename (which might change) check that the image is now local $this->assertStringContainsString(rtrim($client->getContainer()->getParameter('domain_name'), '/') . '/assets/images/', $entry->getContent()); @@ -1499,7 +1499,7 @@ class EntryControllerTest extends WallabagCoreTestCase 'zh_CN', ], 'pt_BR' => [ - 'https://esportes.r7.com/lance/futebol/victor-hugo-e-matheus-franca-devem-desfalcar-flamengo-no-carioca-22112022', + 'https://esportes.r7.com/lance/futebol/victor-hugo-e-matheus-franca-devem-desfalcar-flamengo-no-carioca-22112022/', 'pt_BR', ], 'es-ES' => [ diff --git a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php index 1c30d6b0a..f6dfff4c8 100644 --- a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php @@ -127,23 +127,6 @@ class FirefoxControllerTest extends WallabagCoreTestCase $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok'); $this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.fr is ok'); $this->assertCount(3, $content->getTags()); - - $content = $client->getContainer() - ->get(EntityManagerInterface::class) - ->getRepository(Entry::class) - ->findByUrlAndUserId( - 'https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html', - $this->getLoggedInUserId() - ); - - $this->assertInstanceOf(Entry::class, $content); - $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.lemonde.fr is ok'); - - $createdAt = $content->getCreatedAt(); - $this->assertSame('2013', $createdAt->format('Y')); - $this->assertSame('12', $createdAt->format('m')); } public function testImportWallabagWithEmptyFile() diff --git a/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json b/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json index 2491ea978..49fed169a 100644 --- a/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json +++ b/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json @@ -39,13 +39,13 @@ }, { "guid": "E385l9vZ_LVn", - "title": "Le journaliste et cinéaste Claude Lanzmann est mort", + "title": "JO Paris 2024 : Où courir dans la capitale maintenant que les quais sont fermés ?", "index": 1, "dateAdded": 1388166091544000, "lastModified": 1388166091545000, "id": 5, "type": "text/x-moz-place", - "uri": "https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html" + "uri": "https://www.20minutes.fr/paris/4100740-20240715-jo-paris-2024-courir-capitale-maintenant-quais-fermes" } ] },