Compare commits

...

15 Commits

Author SHA1 Message Date
8cbbd8259c Convert 403 errors to 404 errors 2025-03-14 05:49:44 +01:00
1447c183a4 Merge pull request #8062 from wallabag/remove-rulerz-php-doctrine-orm
Remove rulerz-php/doctrine-orm
2025-03-14 05:46:17 +01:00
ed2ad4776b Remove rulerz-php/doctrine-orm 2025-03-14 05:40:15 +01:00
8542edc4f1 Merge pull request #8078 from wallabag/dependabot/composer/friendsofphp/php-cs-fixer-3.72.0
Bump friendsofphp/php-cs-fixer from 3.71.0 to 3.72.0
2025-03-14 05:27:04 +01:00
d5126c8a0e Bump friendsofphp/php-cs-fixer from 3.71.0 to 3.72.0
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.71.0 to 3.72.0.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.71.0...v3.72.0)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-14 04:20:53 +00:00
939e8cf8df Merge pull request #8063 from wallabag/drop-php-7.4-8.0-and-8.1
Drop PHP 7.4, 8.0 and 8.1
2025-03-14 05:19:50 +01:00
991f11cdf2 Remove legacy PHP-CS-Fixer rule configuration 2025-03-13 01:42:02 +01:00
4fa015bddf Bump dependencies 2025-03-13 01:42:02 +01:00
39c71dfdbf Update dependencies 2025-03-13 01:42:02 +01:00
3b68d3ff62 Fix migration 2025-03-13 01:42:02 +01:00
27d07be2b7 Avoid installation of PHP polyfills 2025-03-13 01:42:02 +01:00
206a04bc05 Remove PHP polyfills 2025-03-13 01:42:02 +01:00
78ab273dab Remove PHP platform overrides 2025-03-13 01:42:02 +01:00
530bc71924 Drop PHP 7.4 and 8.0 2025-03-13 01:42:02 +01:00
d082def664 Upgrade PHP Docker base image to 8.2 2025-03-13 01:42:02 +01:00
27 changed files with 798 additions and 1219 deletions

View File

@ -24,7 +24,7 @@ If you want to test using an other database than SQLite, uncomment the `postgres
### Using your own PHP server
- Ensure you are running PHP >= 7.4.
- Ensure you are running PHP >= 8.2.
- Clone the repository
- Launch `composer install`
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)

View File

@ -23,7 +23,7 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "7.4"
php-version: "8.2"
tools: cs2pr, pecl
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"

View File

@ -31,9 +31,6 @@ jobs:
fail-fast: false
matrix:
php:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"

View File

@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
php:
- "7.4"
- "8.2"
steps:
- name: "Checkout"

View File

@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
php:
- "7.4"
- "8.2"
steps:
- name: "Checkout"

View File

@ -37,17 +37,6 @@ return $config
// 'psr_autoloading' => true,
'strict_comparison' => true,
'strict_param' => true,
// We override next rule because of current @Symfony ruleSet
// 'parameters' element is breaking PHP 7.4
// https://cs.symfony.com/doc/rules/control_structure/trailing_comma_in_multiline.html
// TODO: remove this configuration after dropping support of PHP 7.4
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
'array_destructuring',
'match',
],
],
'concat_space' => [
'spacing' => 'one',
],

View File

@ -25,13 +25,13 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
### Target PHP version
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
If the PHP version used to generate the .lock isn't a widely available one (like PHP 8), a more common one should
If the PHP version used to generate the .lock isn't a widely available one (like latest PHP versions), a more common one should
be locally specified in `composer.lock`:
```json
"config": {
"platform": {
"php": "7.4.29",
"php": "8.2.27",
"ext-something": "4.0"
}
}

View File

@ -232,10 +232,6 @@ scheb_two_factor:
template: "Authentication/form.html.twig"
mailer: Wallabag\Mailer\AuthCodeMailer
rulerz:
targets:
doctrine: true
old_sound_rabbit_mq:
connections:
default:

View File

@ -230,18 +230,10 @@ services:
tags:
- { name: rulerz.operator, target: native, operator: matches }
Wallabag\Operator\Doctrine\Matches:
tags:
- { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
Wallabag\Operator\PHP\NotMatches:
tags:
- { name: rulerz.operator, target: native, operator: notmatches }
Wallabag\Operator\Doctrine\NotMatches:
tags:
- { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
Wallabag\Operator\PHP\PatternMatches:
tags:
- { name: rulerz.operator, target: native, operator: "~" }

View File

@ -37,7 +37,6 @@ $config
'phpstan/phpstan-symfony',
'psr/http-client',
'psr/http-factory',
'rulerz-php/doctrine-orm',
'scheb/2fa-qr-code',
'scheb/2fa-trusted-device',
'shipmonk/composer-dependency-analyser',
@ -66,8 +65,4 @@ $config
], [ErrorType::DEV_DEPENDENCY_IN_PROD])
;
if (\PHP_VERSION_ID >= 80000) {
$config->ignoreErrorsOnPackage('symfony/polyfill-php80', [ErrorType::UNUSED_DEPENDENCY]);
}
return $config;

View File

@ -38,7 +38,7 @@
"issues": "https://github.com/wallabag/wallabag/issues"
},
"require": {
"php": ">=7.4",
"php": ">=8.2",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
@ -61,131 +61,142 @@
"craue/config-bundle": "^2.7.0",
"defuse/php-encryption": "^2.4",
"doctrine/collections": "^1.8",
"doctrine/common": "^3.4.3",
"doctrine/dbal": "^3.8.2",
"doctrine/doctrine-bundle": "^2.11.3",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/common": "^3.5.0",
"doctrine/dbal": "^3.9.4",
"doctrine/doctrine-bundle": "^2.13.2",
"doctrine/doctrine-migrations-bundle": "^3.4.1",
"doctrine/event-manager": "^1.2",
"doctrine/migrations": "^3.5.5",
"doctrine/orm": "^2.18.1",
"doctrine/persistence": "^3.2",
"doctrine/migrations": "^3.8.2",
"doctrine/orm": "^2.20.2",
"doctrine/persistence": "^3.4",
"egulias/email-validator": "^3.2.6",
"enshrined/svg-sanitize": "^0.21",
"friendsofsymfony/jsrouting-bundle": "^2.8",
"friendsofsymfony/oauth-server-bundle": "dev-master#dc8ff343363cf794d30eb1a123610d186a43f162",
"friendsofsymfony/rest-bundle": "^3.6",
"friendsofsymfony/user-bundle": "^3.2.1",
"guzzlehttp/psr7": "^2.6.2",
"html2text/html2text": "^4.3.1",
"friendsofsymfony/rest-bundle": "^3.8",
"friendsofsymfony/user-bundle": "^3.4.0",
"guzzlehttp/psr7": "^2.7.0",
"html2text/html2text": "^4.3.2",
"incenteev/composer-parameter-handler": "^2.2",
"j0k3r/graby": "^2.4.5",
"j0k3r/graby-site-config": "^1.0",
"j0k3r/graby": "^2.4.6",
"j0k3r/graby-site-config": "^1.0.197",
"javibravo/simpleue": "^2.1",
"jms/serializer": "^3.29.1",
"jms/serializer-bundle": "^5.4",
"laminas/laminas-code": "^4.7.1",
"jms/serializer": "^3.32.3",
"jms/serializer-bundle": "^5.5.1",
"laminas/laminas-code": "^4.16",
"lcobucci/jwt": "^4.3",
"league/html-to-markdown": "^5.1",
"league/html-to-markdown": "^5.1.1",
"mgargano/simplehtmldom": "^1.5",
"mnapoli/piwik-twig-extension": "^3.0",
"monolog/monolog": "^2.9",
"nelmio/api-doc-bundle": "^4.20.0",
"nelmio/cors-bundle": "^2.4",
"monolog/monolog": "^2.10",
"nelmio/api-doc-bundle": "^4.38.1",
"nelmio/cors-bundle": "^2.5",
"ocramius/proxy-manager": "^2.1.1",
"pagerfanta/core": "^3.8",
"pagerfanta/doctrine-orm-adapter": "^3.8",
"pagerfanta/twig": "^3.8",
"php-amqplib/php-amqplib": "^3.6.1",
"php-amqplib/rabbitmq-bundle": "^2.14.0",
"php-amqplib/php-amqplib": "^3.7.3",
"php-amqplib/rabbitmq-bundle": "^2.17.3",
"pragmarx/recovery": "^0.2.1",
"predis/predis": "^2.2.2",
"predis/predis": "^2.3.0",
"psr/http-client": "^1.0.3",
"psr/http-factory": "^1.0.2",
"psr/http-factory": "^1.1.0",
"psr/http-message": "^2.0",
"psr/log": "^1.1.4",
"rulerz-php/doctrine-orm": "dev-master",
"scheb/2fa-backup-code": "^5.13.2",
"scheb/2fa-bundle": "^5.13.2",
"scheb/2fa-email": "^5.13.2",
"scheb/2fa-google-authenticator": "^5.13.2",
"scheb/2fa-qr-code": "^5.13.2",
"scheb/2fa-trusted-device": "^5.13.2",
"scssphp/scssphp": "^1.12.1",
"scssphp/scssphp": "^1.13.0",
"sensio/framework-extra-bundle": "^6.2.10",
"sentry/sentry-symfony": "^5.0.1",
"spiriitlabs/form-filter-bundle": "^10.0",
"stof/doctrine-extensions-bundle": "^1.11.0",
"symfony/asset": "^5.4.35",
"symfony/browser-kit": "^5.4.35",
"symfony/config": "^5.4.35",
"symfony/console": "^5.4.35",
"symfony/dependency-injection": "^5.4.35",
"symfony/doctrine-bridge": "^5.4.35",
"symfony/dom-crawler": "^5.4.35",
"symfony/error-handler": "^5.4.35",
"symfony/event-dispatcher": "^5.4.35",
"symfony/event-dispatcher-contracts": "^2.5.2",
"symfony/expression-language": "^5.4.35",
"symfony/filesystem": "^5.4",
"symfony/finder": "^5.4.35",
"symfony/form": "^5.4.35",
"symfony/framework-bundle": "^5.4.35",
"symfony/google-mailer": "^5.4.35",
"symfony/http-client": "^5.4.35",
"symfony/http-client-contracts": "^2.5",
"symfony/http-foundation": "^5.4.35",
"symfony/http-kernel": "^5.4.35",
"symfony/intl": "^5.4.35",
"symfony/mailer": "^5.4.35",
"symfony/mime": "^5.4.35",
"sentry/sentry-symfony": "^5.2.0",
"spiriitlabs/form-filter-bundle": "^10.0.2",
"stof/doctrine-extensions-bundle": "^1.13.0",
"symfony/asset": "^5.4.45",
"symfony/browser-kit": "^5.4.45",
"symfony/config": "^5.4.46",
"symfony/console": "^5.4.47",
"symfony/dependency-injection": "^5.4.48",
"symfony/doctrine-bridge": "^5.4.48",
"symfony/dom-crawler": "^5.4.48",
"symfony/error-handler": "^5.4.46",
"symfony/event-dispatcher": "^5.4.45",
"symfony/event-dispatcher-contracts": "^2.5.4",
"symfony/expression-language": "^5.4.45",
"symfony/filesystem": "^5.4.45",
"symfony/finder": "^5.4.45",
"symfony/form": "^5.4.45",
"symfony/framework-bundle": "^5.4.45",
"symfony/google-mailer": "^5.4.45",
"symfony/http-client": "^5.4.49",
"symfony/http-client-contracts": "^2.5.5",
"symfony/http-foundation": "^5.4.48",
"symfony/http-kernel": "^5.4.48",
"symfony/intl": "^5.4.47",
"symfony/mailer": "^5.4.45",
"symfony/mime": "^5.4.45",
"symfony/monolog-bundle": "^3.10",
"symfony/options-resolver": "^5.4.21",
"symfony/polyfill-php80": "^1.29",
"symfony/proxy-manager-bridge": "^5.4.21",
"symfony/routing": "^5.4.35",
"symfony/security-bundle": "^5.4.35",
"symfony/security-core": "^5.4.35",
"symfony/security-http": "^5.4.35",
"symfony/templating": "^5.4.35",
"symfony/translation-contracts": "^2.5.2",
"symfony/twig-bundle": "^5.4.35",
"symfony/validator": "^5.4.35",
"symfony/webpack-encore-bundle": "^1.17",
"tecnickcom/tcpdf": "^6.6.5",
"twig/extra-bundle": "^3.8",
"twig/string-extra": "^3.8",
"twig/twig": "^3.8.0",
"symfony/options-resolver": "^5.4.45",
"symfony/proxy-manager-bridge": "^5.4.45",
"symfony/routing": "^5.4.48",
"symfony/security-bundle": "^5.4.45",
"symfony/security-core": "^5.4.48",
"symfony/security-http": "^5.4.47",
"symfony/templating": "^5.4.45",
"symfony/translation-contracts": "^2.5.4",
"symfony/twig-bundle": "^5.4.45",
"symfony/validator": "^5.4.48",
"symfony/webpack-encore-bundle": "^1.17.2",
"tecnickcom/tcpdf": "^6.8.2",
"twig/extra-bundle": "^3.20",
"twig/string-extra": "^3.20",
"twig/twig": "^3.20.0",
"wallabag/phpepub": "^4.0.10",
"wallabag/rulerz": "dev-master",
"wallabag/rulerz-bundle": "dev-master",
"willdurand/hateoas": "^3.10",
"willdurand/hateoas-bundle": "^2.6"
"willdurand/hateoas": "^3.12",
"willdurand/hateoas-bundle": "^2.7"
},
"require-dev": {
"dama/doctrine-test-bundle": "^8.0.2",
"doctrine/data-fixtures": "^1.7",
"doctrine/doctrine-fixtures-bundle": "^3.5.1",
"ergebnis/composer-normalize": "^2.42.0",
"friendsofphp/php-cs-fixer": "^3.49",
"friendsoftwig/twigcs": "^6.1",
"dama/doctrine-test-bundle": "^8.2.2",
"doctrine/data-fixtures": "^1.8.1",
"doctrine/doctrine-fixtures-bundle": "^3.7.1",
"ergebnis/composer-normalize": "^2.45.0",
"friendsofphp/php-cs-fixer": "^3.70.2",
"friendsoftwig/twigcs": "^6.5",
"m6web/redis-mock": "^5.6",
"php-http/mock-client": "^1.6",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.59",
"phpstan/phpstan-doctrine": "^1.3.62",
"phpstan/phpstan-phpunit": "^1.3.16",
"phpstan/phpstan-symfony": "^1.3.7",
"phpunit/phpunit": "^9.6.17",
"shipmonk/composer-dependency-analyser": "^1.7",
"symfony/css-selector": "^5.4.35",
"symfony/debug-bundle": "^5.4.35",
"symfony/maker-bundle": "^1.43",
"symfony/phpunit-bridge": "^7.0.3",
"symfony/process": "^5.4",
"symfony/var-dumper": "^5.4.35",
"symfony/web-profiler-bundle": "^5.4.35",
"php-http/mock-client": "^1.6.1",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^1.12.20",
"phpstan/phpstan-doctrine": "^1.5.7",
"phpstan/phpstan-phpunit": "^1.4.2",
"phpstan/phpstan-symfony": "^1.4.13",
"phpunit/phpunit": "^9.6.22",
"shipmonk/composer-dependency-analyser": "^1.8.2",
"symfony/css-selector": "^5.4.45",
"symfony/debug-bundle": "^5.4.45",
"symfony/maker-bundle": "^1.50",
"symfony/phpunit-bridge": "^7.2.0",
"symfony/process": "^5.4.47",
"symfony/var-dumper": "^5.4.48",
"symfony/web-profiler-bundle": "^5.4.48",
"symfony/web-server-bundle": "^4.4.44"
},
"replace": {
"symfony/polyfill-php54": "*",
"symfony/polyfill-php55": "*",
"symfony/polyfill-php56": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*"
},
"suggest": {
"ext-imagick": "To keep GIF animation when downloading image is enabled"
},
@ -216,9 +227,6 @@
"phpstan/extension-installer": true
},
"bin-dir": "bin",
"platform": {
"php": "7.4.29"
},
"sort-packages": true
},
"extra": {

1642
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
FROM php:8.1-fpm AS rootless
FROM php:8.2-fpm AS rootless
ARG DEBIAN_FRONTEND=noninteractive
ARG NODE_VERSION=20
@ -50,14 +50,13 @@ RUN docker-php-ext-install -j "$(nproc)" \
tidy \
zip
RUN pecl install redis; \
pecl install imagick; \
pecl install xdebug-3.1.6; \
docker-php-ext-enable \
RUN pecl install redis-6.1.0 \
&& pecl install imagick-3.7.0 \
&& pecl install xdebug-3.4.1 \
&& docker-php-ext-enable \
redis \
imagick \
xdebug \
;
xdebug
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \

View File

@ -50,7 +50,7 @@ final class Version20190826204730 extends WallabagMigration
->fetchOne('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
if (false === $previous_rule) {
$this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
$this->connection->executeQuery('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
}
}
}

View File

@ -64,7 +64,7 @@ class ImportCommand extends Command
ElcuratorImport $elcuratorImport,
ShaarliImport $shaarliImport,
PocketHtmlImport $pocketHtmlImport,
OmnivoreImport $omnivoreImport
OmnivoreImport $omnivoreImport,
) {
$this->entityManager = $entityManager;
$this->tokenStorage = $tokenStorage;

View File

@ -37,7 +37,7 @@ class RabbitMQConsumerTotalProxy
Consumer $elcuratorConsumer,
Consumer $shaarliConsumer,
Consumer $pocketHtmlConsumer,
Consumer $omnivoreConsumer
Consumer $omnivoreConsumer,
) {
$this->pocketConsumer = $pocketConsumer;
$this->readabilityConsumer = $readabilityConsumer;

View File

@ -724,7 +724,7 @@ class EntryRestController extends WallabagRestController
LoggerInterface $logger,
TagsAssigner $tagsAssigner,
EventDispatcherInterface $eventDispatcher,
ValidatorInterface $validator
ValidatorInterface $validator,
) {
$this->validateAuthentication();

View File

@ -61,7 +61,7 @@ class ConfigController extends AbstractController
AnnotationRepository $annotationRepository,
ConfigRepository $configRepository,
EventDispatcherInterface $eventDispatcher,
Redirect $redirectHelper
Redirect $redirectHelper,
) {
$this->entityManager = $entityManager;
$this->userManager = $userManager;

View File

@ -0,0 +1,29 @@
<?php
namespace Wallabag\Event\Subscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
class AccessDeniedToNotFoundSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
KernelEvents::EXCEPTION => 'onKernelException',
];
}
public function onKernelException(ExceptionEvent $event): void
{
$exception = $event->getThrowable();
if ($exception instanceof AccessDeniedHttpException) {
$notFoundException = new NotFoundHttpException('', $exception);
$event->setThrowable($notFoundException);
}
}
}

View File

@ -1,25 +0,0 @@
<?php
namespace Wallabag\Operator\Doctrine;
/**
* Provides a "matches" operator used for tagging rules.
*
* It asserts that a given pattern is contained in a subject, in a
* case-insensitive way.
*
* This operator will be used to compile tagging rules in DQL, usable
* by Doctrine ORM.
* It's registered in RulerZ using a service;
*/
class Matches
{
public function __invoke($subject, $pattern)
{
if ("'" === $pattern[0]) {
$pattern = \sprintf("'%%%s%%'", substr($pattern, 1, -1));
}
return \sprintf('UPPER(%s) LIKE UPPER(%s)', $subject, $pattern);
}
}

View File

@ -1,25 +0,0 @@
<?php
namespace Wallabag\Operator\Doctrine;
/**
* Provides a "notmatches" operator used for tagging rules.
*
* It asserts that a given pattern is not contained in a subject, in a
* case-insensitive way.
*
* This operator will be used to compile tagging rules in DQL, usable
* by Doctrine ORM.
* It's registered in RulerZ using a service;
*/
class NotMatches
{
public function __invoke($subject, $pattern)
{
if ("'" === $pattern[0]) {
$pattern = \sprintf("'%%%s%%'", substr($pattern, 1, -1));
}
return \sprintf('UPPER(%s) NOT LIKE UPPER(%s)', $subject, $pattern);
}
}

View File

@ -105,7 +105,7 @@ class DeveloperControllerTest extends WallabagTestCase
$this->logInAs('bob');
$client->request('POST', '/developer/client/delete/' . $adminApiClient->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
// Try to remove the admin's client with the good user
$this->logInAs('admin');

View File

@ -110,7 +110,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
$this->client->request('GET', '/api/entries/' . $entry->getId() . '.json');
$this->assertSame(403, $this->client->getResponse()->getStatusCode());
$this->assertSame(404, $this->client->getResponse()->getStatusCode());
}
public function testGetEntries()
@ -1260,14 +1260,14 @@ class EntryRestControllerTest extends WallabagApiTestCase
{
$this->client->request('GET', '/api/entries/exists?url=');
$this->assertSame(403, $this->client->getResponse()->getStatusCode());
$this->assertSame(404, $this->client->getResponse()->getStatusCode());
}
public function testGetEntriesExistsWithNoHashedUrl()
{
$this->client->request('GET', '/api/entries/exists?hashed_url=');
$this->assertSame(403, $this->client->getResponse()->getStatusCode());
$this->assertSame(404, $this->client->getResponse()->getStatusCode());
}
public function testReloadEntryErrorWhileFetching()

View File

@ -577,9 +577,9 @@ class ConfigControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/tagging-rule/delete/' . $rule->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertStringContainsString('You can not access this rule', $body[0]);
$this->assertStringContainsString('404: Not Found', $body[0]);
}
public function testEditingTaggingRuleFromAnOtherUser()
@ -593,9 +593,9 @@ class ConfigControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/tagging-rule/edit/' . $rule->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertStringContainsString('You can not access this rule', $body[0]);
$this->assertStringContainsString('404: Not Found', $body[0]);
}
public function testIgnoreOriginRuleCreation()
@ -714,9 +714,9 @@ class ConfigControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/ignore-origin-user-rule/edit/' . $rule->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertStringContainsString('You can not access this rule', $body[0]);
$this->assertStringContainsString('404: Not Found', $body[0]);
}
public function testEditingIgnoreOriginRuleFromAnOtherUser()
@ -730,9 +730,9 @@ class ConfigControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/ignore-origin-user-rule/edit/' . $rule->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertStringContainsString('You can not access this rule', $body[0]);
$this->assertStringContainsString('404: Not Found', $body[0]);
}
public function testDeleteUserButtonVisibility()
@ -767,7 +767,7 @@ class ConfigControllerTest extends WallabagTestCase
$this->assertStringNotContainsString('config.form_user.delete.button', $body[0]);
$client->request('POST', '/account/delete');
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$user = $em
->getRepository(User::class)

View File

@ -781,7 +781,7 @@ class EntryControllerTest extends WallabagTestCase
$client->request('GET', '/view/' . $content->getId());
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
public function testFilterOnReadingTime()

View File

@ -27,6 +27,6 @@ class SettingsControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/settings');
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
}

View File

@ -114,7 +114,7 @@ class SiteCredentialControllerTest extends WallabagTestCase
$client->request('GET', '/site-credentials/' . $credential->getId() . '/edit');
$this->assertSame(403, $client->getResponse()->getStatusCode());
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
public function testDeleteSiteCredential()