Browse Source

Update dev dependencies (#4993)

Related to https://github.com/FreshRSS/FreshRSS/pull/4991
Required a few changes in code to pass the tests
Alexandre Alapetite 3 years ago
parent
commit
1d9d4e3e3c

+ 5 - 5
.github/workflows/tests.yml

@@ -55,7 +55,7 @@ jobs:
       uses: actions/setup-node@v3
       uses: actions/setup-node@v3
       with:
       with:
         # https://nodejs.org/en/about/releases/
         # https://nodejs.org/en/about/releases/
-        node-version: '16'
+        node-version: '18'
         cache: 'npm'
         cache: 'npm'
 
 
     - run: npm ci
     - run: npm ci
@@ -79,14 +79,14 @@ jobs:
       uses: actions/cache@v3
       uses: actions/cache@v3
       with:
       with:
         path: bin
         path: bin
-        key: ${{ runner.os }}-bin-shfmt@v3.5.1-hadolint@v2.10.0-typos@v1.10.1
+        key: ${{ runner.os }}-bin-shfmt@v3.6.0-hadolint@v2.12.0-typos@v1.13.6
 
 
     - name: Add ./bin/ to $PATH
     - name: Add ./bin/ to $PATH
       run: mkdir -p bin/ && echo "${PWD}/bin" >> $GITHUB_PATH
       run: mkdir -p bin/ && echo "${PWD}/bin" >> $GITHUB_PATH
 
 
     - name: Install shfmt
     - name: Install shfmt
       if: steps.shell-cache.outputs.cache-hit != 'true'
       if: steps.shell-cache.outputs.cache-hit != 'true'
-      run: GOBIN=${PWD}/bin/ go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.1
+      run: GOBIN=${PWD}/bin/ go install mvdan.cc/sh/v3/cmd/shfmt@v3.6.0
 
 
     - name: Check shell script syntax
     - name: Check shell script syntax
       # shellcheck is pre-installed https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
       # shellcheck is pre-installed https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
@@ -94,7 +94,7 @@ jobs:
 
 
     - name: Install hadolint
     - name: Install hadolint
       if: steps.shell-cache.outputs.cache-hit != 'true'
       if: steps.shell-cache.outputs.cache-hit != 'true'
-      run: curl -sL -o ./bin/hadolint "https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ./bin/hadolint
+      run: curl -sL -o ./bin/hadolint "https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ./bin/hadolint
 
 
     - name: Check Dockerfile syntax
     - name: Check Dockerfile syntax
       run: find . -name 'Dockerfile*' -print0 | xargs -0 -n1 ./bin/hadolint --failure-threshold warning
       run: find . -name 'Dockerfile*' -print0 | xargs -0 -n1 ./bin/hadolint --failure-threshold warning
@@ -103,7 +103,7 @@ jobs:
       if: steps.shell-cache.outputs.cache-hit != 'true'
       if: steps.shell-cache.outputs.cache-hit != 'true'
       run: |
       run: |
         cd bin ;
         cd bin ;
-        wget -q 'https://github.com/crate-ci/typos/releases/download/v1.10.1/typos-v1.10.1-x86_64-unknown-linux-musl.tar.gz' &&
+        wget -q 'https://github.com/crate-ci/typos/releases/download/v1.13.6/typos-v1.13.6-x86_64-unknown-linux-musl.tar.gz' &&
         tar -xvf *.tar.gz './typos' &&
         tar -xvf *.tar.gz './typos' &&
         chmod +x typos &&
         chmod +x typos &&
         rm *.tar.gz ;
         rm *.tar.gz ;

+ 2 - 1
.typos.toml

@@ -3,7 +3,7 @@ ot = "ot"
 Ths2 = "Ths2"
 Ths2 = "Ths2"
 
 
 [default.extend-words]
 [default.extend-words]
-ba = "ba"
+referer = "referer"
 
 
 [files]
 [files]
 extend-exclude = [
 extend-exclude = [
@@ -33,6 +33,7 @@ extend-exclude = [
 	"app/i18n/zh-cn/",
 	"app/i18n/zh-cn/",
 	"bin/",
 	"bin/",
 	"CHANGELOG-old.md",
 	"CHANGELOG-old.md",
+	"composer.lock",
 	"data/",
 	"data/",
 	"docs/fr/",
 	"docs/fr/",
 	"lib/phpgt/",
 	"lib/phpgt/",

+ 22 - 22
Makefile

@@ -60,40 +60,37 @@ stop: ## Stop FreshRSS container if any
 ## Tests and linter ##
 ## Tests and linter ##
 ######################
 ######################
 .PHONY: test
 .PHONY: test
-test: bin/phpunit ## Run the test suite
-	$(PHP) ./bin/phpunit --bootstrap ./tests/bootstrap.php ./tests
+test: vendor/bin/phpunit ## Run the test suite
+	$(PHP) vendor/bin/phpunit --bootstrap ./tests/bootstrap.php ./tests
 
 
 .PHONY: lint
 .PHONY: lint
-lint: bin/phpcs ## Run the linter on the PHP files
-	$(PHP) ./bin/phpcs . -p -s
+lint: vendor/bin/phpcs ## Run the linter on the PHP files
+	$(PHP) vendor/bin/phpcs . -p -s
 
 
 .PHONY: lint-fix
 .PHONY: lint-fix
-lint-fix: bin/phpcbf ## Fix the errors detected by the linter
-	$(PHP) ./bin/phpcbf . -p -s
+lint-fix: vendor/bin/phpcbf ## Fix the errors detected by the linter
+	$(PHP) vendor/bin/phpcbf . -p -s
 
 
 bin/composer:
 bin/composer:
 	mkdir -p bin/
 	mkdir -p bin/
-	wget 'https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer' -O - -q | php -- --quiet --install-dir='./bin/' --filename='composer'
+	wget 'https://raw.githubusercontent.com/composer/getcomposer.org/b5dbe5ebdec95ce71b3128b359bd5a85cb0a722d/web/installer' -O - -q | php -- --quiet --install-dir='./bin/' --filename='composer'
 
 
-bin/phpunit:
-	mkdir -p bin/
-	wget -O bin/phpunit 'https://phar.phpunit.de/phpunit-9.5.20.phar'
-	echo '6becad2da5c37f5ad101cc665ef05a2f1a6a45d2427c8edcc74f72c92fb1e05a bin/phpunit' | sha256sum -c - || rm bin/phpunit
+vendor/bin/phpunit: bin/composer
+	bin/composer install --prefer-dist --no-progress
+	ln -s ../vendor/bin/phpunit bin/phpunit
 
 
-bin/phpcs:
-	mkdir -p bin/
-	wget -O bin/phpcs 'https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.7.1/phpcs.phar'
-	echo '7a14323a14af9f58302d15442492ee1076a8cd72c018a816cb44965bf3a9b015 bin/phpcs' | sha256sum -c - || rm bin/phpcs
+vendor/bin/phpcs: bin/composer
+	bin/composer install --prefer-dist --no-progress
+	ln -s ../vendor/bin/phpcs bin/phpcs
 
 
-bin/phpcbf:
-	mkdir -p bin/
-	wget -O bin/phpcbf 'https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.7.1/phpcbf.phar'
-	echo 'c93c0e83cbda21c21f849ccf0f4b42979d20004a5a6172ed0ea270eca7ae6fa8 bin/phpcbf' | sha256sum -c - || rm bin/phpcbf
+vendor/bin/phpcbf: bin/composer
+	bin/composer install --prefer-dist --no-progress
+	ln -s ../vendor/bin/phpcbf bin/phpcbf
 
 
 bin/typos:
 bin/typos:
 	mkdir -p bin/
 	mkdir -p bin/
 	cd bin ; \
 	cd bin ; \
-	wget -q 'https://github.com/crate-ci/typos/releases/download/v1.10.1/typos-v1.10.1-x86_64-unknown-linux-musl.tar.gz' && \
+	wget -q 'https://github.com/crate-ci/typos/releases/download/v1.13.6/typos-v1.13.6-x86_64-unknown-linux-musl.tar.gz' && \
 	tar -xvf *.tar.gz './typos' && \
 	tar -xvf *.tar.gz './typos' && \
 	chmod +x typos && \
 	chmod +x typos && \
 	rm *.tar.gz ; \
 	rm *.tar.gz ; \
@@ -102,6 +99,9 @@ bin/typos:
 node_modules/.bin/eslint:
 node_modules/.bin/eslint:
 	npm install
 	npm install
 
 
+node_modules/.bin/rtlcss:
+	npm install
+
 vendor/bin/phpstan: bin/composer
 vendor/bin/phpstan: bin/composer
 	bin/composer install --prefer-dist --no-progress
 	bin/composer install --prefer-dist --no-progress
 
 
@@ -181,8 +181,8 @@ endif
 ## TOOLS ##
 ## TOOLS ##
 ###########
 ###########
 .PHONY: rtl
 .PHONY: rtl
-rtl: ## Generate RTL CSS files
-	rtlcss -d p/themes/ && find p/themes/ -type f -name '*.rtl.rtl.css' -delete
+rtl: node_modules/.bin/rtlcss ## Generate RTL CSS files
+	npm run-script rtlcss
 
 
 .PHONY: pot
 .PHONY: pot
 pot: ## Generate POT templates for docs
 pot: ## Generate POT templates for docs

+ 3 - 3
app/Controllers/updateController.php

@@ -23,7 +23,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
 		if ($return != 0) {
 		if ($return != 0) {
 			throw new Exception($errorMessage);
 			throw new Exception($errorMessage);
 		}
 		}
-		$line = is_array($output) ? implode('', $output) : $output;
+		$line = implode('', $output);
 		if ($line !== 'master' && $line !== 'dev') {
 		if ($line !== 'master' && $line !== 'dev') {
 			return true;	// not on master or dev, nothing to do
 			return true;	// not on master or dev, nothing to do
 		}
 		}
@@ -54,14 +54,14 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
 				$output = [];
 				$output = [];
 				exec('git status -sb --porcelain remote', $output, $return);
 				exec('git status -sb --porcelain remote', $output, $return);
 			} else {
 			} else {
-				$line = is_array($output) ? implode('; ', $output) : $output;
+				$line = implode('; ', $output);
 				Minz_Log::warning('git fetch warning: ' . $line);
 				Minz_Log::warning('git fetch warning: ' . $line);
 			}
 			}
 		} catch (Exception $e) {
 		} catch (Exception $e) {
 			Minz_Log::warning('git fetch error: ' . $e->getMessage());
 			Minz_Log::warning('git fetch error: ' . $e->getMessage());
 		}
 		}
 		chdir($cwd);
 		chdir($cwd);
-		$line = is_array($output) ? implode('; ', $output) : $output;
+		$line = implode('; ', $output);
 		return $line == '' ||
 		return $line == '' ||
 			strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false || strpos($line, '[gone') !== false;
 			strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false || strpos($line, '[gone') !== false;
 	}
 	}

+ 1 - 1
app/Models/Entry.php

@@ -76,7 +76,7 @@ class FreshRSS_Entry extends Minz_Model {
 			$dao['guid'] ?? '',
 			$dao['guid'] ?? '',
 			$dao['title'] ?? '',
 			$dao['title'] ?? '',
 			$dao['author'] ?? '',
 			$dao['author'] ?? '',
-			$dao['content'] ?? '',
+			$dao['content'],
 			$dao['link'] ?? '',
 			$dao['link'] ?? '',
 			$dao['date'] ?? 0,
 			$dao['date'] ?? 0,
 			$dao['is_read'] ?? false,
 			$dao['is_read'] ?? false,

+ 4 - 0
app/Models/Searchable.php

@@ -2,5 +2,9 @@
 
 
 interface FreshRSS_Searchable {
 interface FreshRSS_Searchable {
 
 
+	/**
+	 * @param int|string $id
+	 * @return Minz_Model
+	 */
 	public function searchById($id);
 	public function searchById($id);
 }
 }

+ 13 - 14
app/Models/UserQuery.php

@@ -18,16 +18,17 @@ class FreshRSS_UserQuery {
 	private $search;
 	private $search;
 	private $state;
 	private $state;
 	private $url;
 	private $url;
+	/** @var FreshRSS_FeedDAO */
 	private $feed_dao;
 	private $feed_dao;
+	/** @var FreshRSS_CategoryDAO */
 	private $category_dao;
 	private $category_dao;
+	/** @var FreshRSS_TagDAO */
 	private $tag_dao;
 	private $tag_dao;
 
 
 	/**
 	/**
 	 * @param array<string,string> $query
 	 * @param array<string,string> $query
-	 * @param FreshRSS_Searchable $feed_dao
-	 * @param FreshRSS_Searchable $category_dao
 	 */
 	 */
-	public function __construct($query, FreshRSS_Searchable $feed_dao = null, FreshRSS_Searchable $category_dao = null, FreshRSS_Searchable $tag_dao = null) {
+	public function __construct($query, FreshRSS_FeedDAO $feed_dao = null, FreshRSS_CategoryDAO $category_dao = null, FreshRSS_TagDAO $tag_dao = null) {
 		$this->category_dao = $category_dao;
 		$this->category_dao = $category_dao;
 		$this->feed_dao = $feed_dao;
 		$this->feed_dao = $feed_dao;
 		$this->tag_dao = $tag_dao;
 		$this->tag_dao = $tag_dao;
@@ -83,21 +84,22 @@ class FreshRSS_UserQuery {
 	private function parseGet($get) {
 	private function parseGet($get) {
 		$this->get = $get;
 		$this->get = $get;
 		if (preg_match('/(?P<type>[acfst])(_(?P<id>\d+))?/', $get, $matches)) {
 		if (preg_match('/(?P<type>[acfst])(_(?P<id>\d+))?/', $get, $matches)) {
+			$id = intval($matches['id'] ?? '0');
 			switch ($matches['type']) {
 			switch ($matches['type']) {
 				case 'a':
 				case 'a':
 					$this->parseAll();
 					$this->parseAll();
 					break;
 					break;
 				case 'c':
 				case 'c':
-					$this->parseCategory($matches['id']);
+					$this->parseCategory($id);
 					break;
 					break;
 				case 'f':
 				case 'f':
-					$this->parseFeed($matches['id']);
+					$this->parseFeed($id);
 					break;
 					break;
 				case 's':
 				case 's':
 					$this->parseFavorite();
 					$this->parseFavorite();
 					break;
 					break;
 				case 't':
 				case 't':
-					$this->parseTag($matches['id']);
+					$this->parseTag($id);
 					break;
 					break;
 			}
 			}
 		}
 		}
@@ -114,11 +116,10 @@ class FreshRSS_UserQuery {
 	/**
 	/**
 	 * Parse the query string when it is a "category" query
 	 * Parse the query string when it is a "category" query
 	 *
 	 *
-	 * @param integer $id
 	 * @throws FreshRSS_DAO_Exception
 	 * @throws FreshRSS_DAO_Exception
 	 */
 	 */
-	private function parseCategory($id) {
-		if (is_null($this->category_dao)) {
+	private function parseCategory(int $id) {
+		if ($this->category_dao === null) {
 			throw new FreshRSS_DAO_Exception('Category DAO is not loaded in UserQuery');
 			throw new FreshRSS_DAO_Exception('Category DAO is not loaded in UserQuery');
 		}
 		}
 		$category = $this->category_dao->searchById($id);
 		$category = $this->category_dao->searchById($id);
@@ -133,11 +134,10 @@ class FreshRSS_UserQuery {
 	/**
 	/**
 	 * Parse the query string when it is a "feed" query
 	 * Parse the query string when it is a "feed" query
 	 *
 	 *
-	 * @param integer $id
 	 * @throws FreshRSS_DAO_Exception
 	 * @throws FreshRSS_DAO_Exception
 	 */
 	 */
-	private function parseFeed($id) {
-		if (is_null($this->feed_dao)) {
+	private function parseFeed(int $id) {
+		if ($this->feed_dao === null) {
 			throw new FreshRSS_DAO_Exception('Feed DAO is not loaded in UserQuery');
 			throw new FreshRSS_DAO_Exception('Feed DAO is not loaded in UserQuery');
 		}
 		}
 		$feed = $this->feed_dao->searchById($id);
 		$feed = $this->feed_dao->searchById($id);
@@ -152,10 +152,9 @@ class FreshRSS_UserQuery {
 	/**
 	/**
 	 * Parse the query string when it is a "tag" query
 	 * Parse the query string when it is a "tag" query
 	 *
 	 *
-	 * @param integer $id
 	 * @throws FreshRSS_DAO_Exception
 	 * @throws FreshRSS_DAO_Exception
 	 */
 	 */
-	private function parseTag($id) {
+	private function parseTag(int $id) {
 		if ($this->tag_dao == null) {
 		if ($this->tag_dao == null) {
 			throw new FreshRSS_DAO_Exception('Tag DAO is not loaded in UserQuery');
 			throw new FreshRSS_DAO_Exception('Tag DAO is not loaded in UserQuery');
 		}
 		}

+ 1 - 1
composer.json

@@ -47,7 +47,7 @@
         "ext-phar": "*",
         "ext-phar": "*",
         "ext-tokenizer": "*",
         "ext-tokenizer": "*",
         "ext-xmlwriter": "*",
         "ext-xmlwriter": "*",
-        "phpstan/phpstan": "~1.7.14",
+        "phpstan/phpstan": "~1.9.7",
         "phpunit/phpunit": "^9",
         "phpunit/phpunit": "^9",
         "squizlabs/php_codesniffer": "^3.7"
         "squizlabs/php_codesniffer": "^3.7"
     },
     },

+ 31 - 31
composer.lock

@@ -4,35 +4,35 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
         "This file is @generated automatically"
     ],
     ],
-    "content-hash": "a177c11dee892e1293efc7331465081b",
+    "content-hash": "d8f96ca83672be5007207d38e14e1c29",
     "packages": [],
     "packages": [],
     "packages-dev": [
     "packages-dev": [
         {
         {
             "name": "doctrine/instantiator",
             "name": "doctrine/instantiator",
-            "version": "1.4.1",
+            "version": "1.5.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/doctrine/instantiator.git",
                 "url": "https://github.com/doctrine/instantiator.git",
-                "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
+                "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
-                "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
+                "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "php": "^7.1 || ^8.0"
                 "php": "^7.1 || ^8.0"
             },
             },
             "require-dev": {
             "require-dev": {
-                "doctrine/coding-standard": "^9",
+                "doctrine/coding-standard": "^9 || ^11",
                 "ext-pdo": "*",
                 "ext-pdo": "*",
                 "ext-phar": "*",
                 "ext-phar": "*",
                 "phpbench/phpbench": "^0.16 || ^1",
                 "phpbench/phpbench": "^0.16 || ^1",
                 "phpstan/phpstan": "^1.4",
                 "phpstan/phpstan": "^1.4",
                 "phpstan/phpstan-phpunit": "^1",
                 "phpstan/phpstan-phpunit": "^1",
                 "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
                 "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
-                "vimeo/psalm": "^4.22"
+                "vimeo/psalm": "^4.30 || ^5.4"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -59,7 +59,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/doctrine/instantiator/issues",
                 "issues": "https://github.com/doctrine/instantiator/issues",
-                "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
+                "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -75,7 +75,7 @@
                     "type": "tidelift"
                     "type": "tidelift"
                 }
                 }
             ],
             ],
-            "time": "2022-03-03T08:28:38+00:00"
+            "time": "2022-12-30T00:15:36+00:00"
         },
         },
         {
         {
             "name": "myclabs/deep-copy",
             "name": "myclabs/deep-copy",
@@ -305,16 +305,16 @@
         },
         },
         {
         {
             "name": "phpstan/phpstan",
             "name": "phpstan/phpstan",
-            "version": "1.7.15",
+            "version": "1.9.7",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a"
+                "reference": "0501435cd342eac7664bd62155b1ef907fc60b6f"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a",
-                "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0501435cd342eac7664bd62155b1ef907fc60b6f",
+                "reference": "0501435cd342eac7664bd62155b1ef907fc60b6f",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -338,9 +338,13 @@
                 "MIT"
                 "MIT"
             ],
             ],
             "description": "PHPStan - PHP Static Analysis Tool",
             "description": "PHPStan - PHP Static Analysis Tool",
+            "keywords": [
+                "dev",
+                "static analysis"
+            ],
             "support": {
             "support": {
                 "issues": "https://github.com/phpstan/phpstan/issues",
                 "issues": "https://github.com/phpstan/phpstan/issues",
-                "source": "https://github.com/phpstan/phpstan/tree/1.7.15"
+                "source": "https://github.com/phpstan/phpstan/tree/1.9.7"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -351,29 +355,25 @@
                     "url": "https://github.com/phpstan",
                     "url": "https://github.com/phpstan",
                     "type": "github"
                     "type": "github"
                 },
                 },
-                {
-                    "url": "https://www.patreon.com/phpstan",
-                    "type": "patreon"
-                },
                 {
                 {
                     "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
                     "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
                     "type": "tidelift"
                     "type": "tidelift"
                 }
                 }
             ],
             ],
-            "time": "2022-06-20T08:29:01+00:00"
+            "time": "2023-01-04T21:59:57+00:00"
         },
         },
         {
         {
             "name": "phpunit/php-code-coverage",
             "name": "phpunit/php-code-coverage",
-            "version": "9.2.18",
+            "version": "9.2.23",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a"
+                "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/12fddc491826940cf9b7e88ad9664cf51f0f6d0a",
-                "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
+                "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -429,7 +429,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
-                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.18"
+                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -437,7 +437,7 @@
                     "type": "github"
                     "type": "github"
                 }
                 }
             ],
             ],
-            "time": "2022-10-27T13:35:33+00:00"
+            "time": "2022-12-28T12:41:10+00:00"
         },
         },
         {
         {
             "name": "phpunit/php-file-iterator",
             "name": "phpunit/php-file-iterator",
@@ -682,16 +682,16 @@
         },
         },
         {
         {
             "name": "phpunit/phpunit",
             "name": "phpunit/phpunit",
-            "version": "9.5.26",
+            "version": "9.5.27",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
+                "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
-                "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
+                "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -764,7 +764,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -780,7 +780,7 @@
                     "type": "tidelift"
                     "type": "tidelift"
                 }
                 }
             ],
             ],
-            "time": "2022-10-28T06:00:21+00:00"
+            "time": "2022-12-09T07:31:23+00:00"
         },
         },
         {
         {
             "name": "sebastian/cli-parser",
             "name": "sebastian/cli-parser",

+ 1 - 1
docs/en/admins/05_Configuring_email_validation.md

@@ -68,7 +68,7 @@ Once you’re done, don’t forget to reconfigure your environment to `productio
 
 
 ## Access the validation URL during development
 ## Access the validation URL during development
 
 
-You might find painful to configure a SMTP server when you’re developping and
+You might find painful to configure a SMTP server when you’re developing and
 `mail` function will not work on your local machine. For the moment, there is
 `mail` function will not work on your local machine. For the moment, there is
 no easy way to access the validation URL unless forging it. You’ll need to
 no easy way to access the validation URL unless forging it. You’ll need to
 information:
 information:

+ 1 - 1
docs/en/developers/02_Github.md

@@ -53,7 +53,7 @@ Now you can create a PR based on your branch.
 
 
 ## How to write a commit message
 ## How to write a commit message
 
 
-A commit message should succintly describe the changes on the first line. For example:
+A commit message should succinctly describe the changes on the first line. For example:
 
 
 > Fix broken icon
 > Fix broken icon
 
 

+ 1 - 1
docs/en/internationalization.md

@@ -86,7 +86,7 @@ This command adds an IGNORE comment on the translation so the key can be conside
 
 
 ## Add/remove/update a key
 ## Add/remove/update a key
 
 
-If you’re developping a new part of the application, you might want to declare a new translation key. Your first impulse would be to add the key to each file manually: don’t do that, it’s very painful. We provide another command:
+If you’re developing a new part of the application, you might want to declare a new translation key. Your first impulse would be to add the key to each file manually: don’t do that, it’s very painful. We provide another command:
 
 
 ```sh
 ```sh
 make i18n-add-key key=the.key.to.add value='Your string in English'
 make i18n-add-key key=the.key.to.add value='Your string in English'

+ 1 - 1
lib/http-conditional.php

@@ -7,7 +7,7 @@
  - Possibility to control cache for client and proxies (public or private policy, life time).
  - Possibility to control cache for client and proxies (public or private policy, life time).
  - When $feedMode is set to true, in the case of a RSS/ATOM feed,
  - When $feedMode is set to true, in the case of a RSS/ATOM feed,
    it puts a timestamp in the global variable $clientCacheDate to allow the sending of only the articles newer than the client's cache.
    it puts a timestamp in the global variable $clientCacheDate to allow the sending of only the articles newer than the client's cache.
- - When $compression is set to true, compress the data before sending it to the client and persitent connections are allowed.
+ - When $compression is set to true, compress the data before sending it to the client and persistent connections are allowed.
  - When $session is set to true, automatically checks if $_SESSION has been modified during the last generation the document.
  - When $session is set to true, automatically checks if $_SESSION has been modified during the last generation the document.
 
 
  Interface:
  Interface:

+ 0 - 1
p/ext.php

@@ -60,7 +60,6 @@ function is_valid_path_extension($path, $extensionPath, $isStatic = true) {
 
 
 	// Static files to serve must be under a `ext_dir/static/` directory.
 	// Static files to serve must be under a `ext_dir/static/` directory.
 	$path_relative_to_ext = substr($path, strlen($real_ext_path) + 1);
 	$path_relative_to_ext = substr($path, strlen($real_ext_path) + 1);
-	// @phpstan-ignore-next-line
 	list(,$static,$file) = sscanf($path_relative_to_ext, '%[^/]/%[^/]/%s');
 	list(,$static,$file) = sscanf($path_relative_to_ext, '%[^/]/%[^/]/%s');
 	if (null === $file || 'static' !== $static) {
 	if (null === $file || 'static' !== $static) {
 		return false;
 		return false;

File diff suppressed because it is too large
+ 331 - 248
package-lock.json


+ 10 - 7
package.json

@@ -18,6 +18,9 @@
     "url": "https://github.com/FreshRSS/FreshRSS.git"
     "url": "https://github.com/FreshRSS/FreshRSS.git"
   },
   },
   "license": "AGPL-3.0",
   "license": "AGPL-3.0",
+  "engines" : {
+    "node" : ">=12"
+  },
   "scripts": {
   "scripts": {
     "eslint": "eslint --ext .js .",
     "eslint": "eslint --ext .js .",
     "eslint_fix": "eslint --fix --ext .js .",
     "eslint_fix": "eslint --fix --ext .js .",
@@ -30,16 +33,16 @@
     "fix": "npm run rtlcss && npm run stylelint_fix && npm run eslint_fix && npm run markdownlint_fix"
     "fix": "npm run rtlcss && npm run stylelint_fix && npm run eslint_fix && npm run markdownlint_fix"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "eslint": "^8.10.0",
+    "eslint": "^8.31.0",
     "eslint-config-standard": "^17.0.0",
     "eslint-config-standard": "^17.0.0",
     "eslint-plugin-import": "^2.26.0",
     "eslint-plugin-import": "^2.26.0",
-    "eslint-plugin-n": "^15.2.3",
-    "eslint-plugin-promise": "^6.0.0",
+    "eslint-plugin-n": "^15.6.0",
+    "eslint-plugin-promise": "^6.1.1",
     "markdownlint-cli": "^0.31.1",
     "markdownlint-cli": "^0.31.1",
-    "rtlcss": "^3.5.0",
-    "sass": "^1.52.3",
-    "stylelint": "^14.9.0",
-    "stylelint-config-recommended-scss": "^6.0.0",
+    "rtlcss": "^4.0.0",
+    "sass": "^1.57.0",
+    "stylelint": "^14.16.1",
+    "stylelint-config-recommended-scss": "^8.0.0",
     "stylelint-order": "^5.0.0"
     "stylelint-order": "^5.0.0"
   },
   },
   "rtlcssConfig": {}
   "rtlcssConfig": {}

+ 6 - 6
tests/app/Models/UserQueryTest.php

@@ -34,7 +34,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 			->method('name')
 			->method('name')
 			->withAnyParameters()
 			->withAnyParameters()
 			->willReturn($category_name);
 			->willReturn($category_name);
-		$cat_dao = $this->createMock('FreshRSS_Searchable');
+		$cat_dao = $this->createMock('FreshRSS_CategoryDAO');
 		$cat_dao->expects($this->atLeastOnce())
 		$cat_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()
@@ -60,7 +60,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 			->method('name')
 			->method('name')
 			->withAnyParameters()
 			->withAnyParameters()
 			->willReturn($feed_name);
 			->willReturn($feed_name);
-		$feed_dao = $this->createMock('FreshRSS_Searchable');
+		$feed_dao = $this->createMock('FreshRSS_FeedDAO');
 		$feed_dao->expects($this->atLeastOnce())
 		$feed_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()
@@ -160,7 +160,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 
 
 	public function testIsDeprecated_whenCategoryExists_returnFalse() {
 	public function testIsDeprecated_whenCategoryExists_returnFalse() {
 		$cat = $this->createMock('FreshRSS_Category');
 		$cat = $this->createMock('FreshRSS_Category');
-		$cat_dao = $this->createMock('FreshRSS_Searchable');
+		$cat_dao = $this->createMock('FreshRSS_CategoryDAO');
 		$cat_dao->expects($this->atLeastOnce())
 		$cat_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()
@@ -171,7 +171,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 	}
 	}
 
 
 	public function testIsDeprecated_whenCategoryDoesNotExist_returnTrue() {
 	public function testIsDeprecated_whenCategoryDoesNotExist_returnTrue() {
-		$cat_dao = $this->createMock('FreshRSS_Searchable');
+		$cat_dao = $this->createMock('FreshRSS_CategoryDAO');
 		$cat_dao->expects($this->atLeastOnce())
 		$cat_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()
@@ -183,7 +183,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 
 
 	public function testIsDeprecated_whenFeedExists_returnFalse() {
 	public function testIsDeprecated_whenFeedExists_returnFalse() {
 		$feed = $this->createMock('FreshRSS_Feed', array(), array('', false));
 		$feed = $this->createMock('FreshRSS_Feed', array(), array('', false));
-		$feed_dao = $this->createMock('FreshRSS_Searchable');
+		$feed_dao = $this->createMock('FreshRSS_FeedDAO');
 		$feed_dao->expects($this->atLeastOnce())
 		$feed_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()
@@ -194,7 +194,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
 	}
 	}
 
 
 	public function testIsDeprecated_whenFeedDoesNotExist_returnTrue() {
 	public function testIsDeprecated_whenFeedDoesNotExist_returnTrue() {
-		$feed_dao = $this->createMock('FreshRSS_Searchable');
+		$feed_dao = $this->createMock('FreshRSS_FeedDAO');
 		$feed_dao->expects($this->atLeastOnce())
 		$feed_dao->expects($this->atLeastOnce())
 			->method('searchById')
 			->method('searchById')
 			->withAnyParameters()
 			->withAnyParameters()

Some files were not shown because too many files changed in this diff