Sfoglia il codice sorgente

Fix warnings for PHP 8.4+ (#6781)

Alexandre Alapetite 1 anno fa
parent
commit
0ea13253af
3 ha cambiato i file con 7 aggiunte e 6 eliminazioni
  1. 2 1
      CHANGELOG.md
  2. 1 1
      Makefile
  3. 4 4
      lib/Minz/Configuration.php

+ 2 - 1
CHANGELOG.md

@@ -13,7 +13,8 @@ See also [the FreshRSS releases](https://github.com/FreshRSS/FreshRSS/releases).
 	* Use curl to fetch extensions list (allows e.g. IPv6) [#6767](https://github.com/FreshRSS/FreshRSS/pull/6767)
 	* Use curl to fetch extensions list (allows e.g. IPv6) [#6767](https://github.com/FreshRSS/FreshRSS/pull/6767)
 * Compatibility
 * Compatibility
 	* Require PHP 8.1+ (drop PHP 7.4) [#6711](https://github.com/FreshRSS/FreshRSS/pull/6711)
 	* Require PHP 8.1+ (drop PHP 7.4) [#6711](https://github.com/FreshRSS/FreshRSS/pull/6711)
-	* Improved support of PHP 8.4+ [#6618](https://github.com/FreshRSS/FreshRSS/pull/6618), [PhpGt/CssXPath#227](https://github.com/PhpGt/CssXPath/pull/227)
+	* Improved support of PHP 8.4+ [#6618](https://github.com/FreshRSS/FreshRSS/pull/6618), [PhpGt/CssXPath#227](https://github.com/PhpGt/CssXPath/pull/227),
+		[#6781](https://github.com/FreshRSS/FreshRSS/pull/6781)
 	* Require PostgreSQL 10+ (drop PostgreSQL 9.5) [#6705](https://github.com/FreshRSS/FreshRSS/pull/6705)
 	* Require PostgreSQL 10+ (drop PostgreSQL 9.5) [#6705](https://github.com/FreshRSS/FreshRSS/pull/6705)
 	* Require MariaDB 10.0.5+ (drop MariaDB 5.5) [#6706](https://github.com/FreshRSS/FreshRSS/pull/6706)
 	* Require MariaDB 10.0.5+ (drop MariaDB 5.5) [#6706](https://github.com/FreshRSS/FreshRSS/pull/6706)
 	* Requiring MySQL 8+ (drop MySQL 5.5.3) [#6706](https://github.com/FreshRSS/FreshRSS/pull/6706)
 	* Requiring MySQL 8+ (drop MySQL 5.5.3) [#6706](https://github.com/FreshRSS/FreshRSS/pull/6706)

+ 1 - 1
Makefile

@@ -72,7 +72,7 @@ lint-fix: vendor/bin/phpcbf ## Fix the errors detected by the linter
 
 
 bin/composer:
 bin/composer:
 	mkdir -p bin/
 	mkdir -p bin/
-	wget 'https://raw.githubusercontent.com/composer/getcomposer.org/163a517dbb7eba0eb25633061c76e648392c6738/web/installer' -O - -q | php -- --quiet --install-dir='./bin/' --filename='composer'
+	wget 'https://raw.githubusercontent.com/composer/getcomposer.org/1a26c0dcb361332cb504e4861ed0f758281575aa/web/installer' -O - -q | php -- --quiet --install-dir='./bin/' --filename='composer'
 
 
 vendor/bin/phpunit: bin/composer
 vendor/bin/phpunit: bin/composer
 	bin/composer install --prefer-dist --no-progress
 	bin/composer install --prefer-dist --no-progress

+ 4 - 4
lib/Minz/Configuration.php

@@ -29,8 +29,8 @@ class Minz_Configuration {
 	 * @param Minz_ConfigurationSetterInterface $configuration_setter an optional helper to set values in configuration
 	 * @param Minz_ConfigurationSetterInterface $configuration_setter an optional helper to set values in configuration
 	 * @throws Minz_FileNotExistException
 	 * @throws Minz_FileNotExistException
 	 */
 	 */
-	public static function register(string $namespace, string $config_filename, string $default_filename = null,
-		Minz_ConfigurationSetterInterface $configuration_setter = null): void {
+	public static function register(string $namespace, string $config_filename, ?string $default_filename = null,
+		?Minz_ConfigurationSetterInterface $configuration_setter = null): void {
 		self::$config_list[$namespace] = new static(
 		self::$config_list[$namespace] = new static(
 			$namespace, $config_filename, $default_filename, $configuration_setter
 			$namespace, $config_filename, $default_filename, $configuration_setter
 		);
 		);
@@ -105,8 +105,8 @@ class Minz_Configuration {
 	 * @param Minz_ConfigurationSetterInterface $configuration_setter an optional helper to set values in configuration
 	 * @param Minz_ConfigurationSetterInterface $configuration_setter an optional helper to set values in configuration
 	 * @throws Minz_FileNotExistException
 	 * @throws Minz_FileNotExistException
 	 */
 	 */
-	final private function __construct(string $namespace, string $config_filename, string $default_filename = null,
-		Minz_ConfigurationSetterInterface $configuration_setter = null) {
+	final private function __construct(string $namespace, string $config_filename, ?string $default_filename = null,
+		?Minz_ConfigurationSetterInterface $configuration_setter = null) {
 		$this->namespace = $namespace;
 		$this->namespace = $namespace;
 		$this->config_filename = $config_filename;
 		$this->config_filename = $config_filename;
 		$this->default_filename = $default_filename;
 		$this->default_filename = $default_filename;