mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Avoid most deprecation warnings
The Feed class sets dynamic properties on Picofeed classes; this will need to be completely rewritten. Version 1.2 of the Laminas XML class also uses a deprecated function, but upgrading it to 1.3 will require PHP 7.3.
This commit is contained in:
parent
92b1a840a1
commit
0d6f8d2921
18 changed files with 52 additions and 19 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@
|
||||||
/arsse.db*
|
/arsse.db*
|
||||||
/config.php
|
/config.php
|
||||||
/.php_cs.cache
|
/.php_cs.cache
|
||||||
|
/.php-cs-fixer.cache
|
||||||
/tests/.phpunit.result.cache
|
/tests/.phpunit.result.cache
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
|
@ -13,7 +13,7 @@ require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php";
|
||||||
ignore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
ini_set("memory_limit", "-1");
|
ini_set("memory_limit", "-1");
|
||||||
ini_set("max_execution_time", "0");
|
ini_set("max_execution_time", "0");
|
||||||
// FIXME: This is required because various dependencies have yet to adjust to PHP 8.1
|
// NOTE: While running in the wild we don't want to spew deprecation warnings if users are ahead of us in PHP versions
|
||||||
error_reporting(\E_ALL & ~\E_DEPRECATED);
|
error_reporting(\E_ALL & ~\E_DEPRECATED);
|
||||||
|
|
||||||
if (\PHP_SAPI === "cli") {
|
if (\PHP_SAPI === "cli") {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"ext-dom": "*",
|
"ext-dom": "*",
|
||||||
"nicolus/picofeed": "dev-bugfix",
|
"nicolus/picofeed": "dev-bugfix",
|
||||||
"hosteurope/password-generator": "1.*",
|
"hosteurope/password-generator": "1.*",
|
||||||
"docopt/docopt": "1.*",
|
"docopt/docopt": "dev-master",
|
||||||
"jkingweb/druuid": "3.*",
|
"jkingweb/druuid": "3.*",
|
||||||
"guzzlehttp/psr7": "1.*",
|
"guzzlehttp/psr7": "1.*",
|
||||||
"laminas/laminas-httphandlerrunner": "1.*"
|
"laminas/laminas-httphandlerrunner": "1.*"
|
||||||
|
@ -64,6 +64,10 @@
|
||||||
{
|
{
|
||||||
"type": "vcs",
|
"type": "vcs",
|
||||||
"url": "https://github.com/rhukster/picoFeed"
|
"url": "https://github.com/rhukster/picoFeed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://github.com/docopt/docopt.php"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
21
composer.lock
generated
21
composer.lock
generated
|
@ -4,20 +4,20 @@
|
||||||
"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": "21a116823c3335992910966f31861811",
|
"content-hash": "62bf2d6fdc0ccbeb090399f708928a02",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "docopt/docopt",
|
"name": "docopt/docopt",
|
||||||
"version": "1.0.4",
|
"version": "dev-master",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/docopt/docopt.php.git",
|
"url": "https://github.com/docopt/docopt.php.git",
|
||||||
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f"
|
"reference": "5ad491cb9fc072e8bb0497061a09b0efcf25cbcf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/docopt/docopt.php/zipball/bf3683a16e09fa1665e493eb4d5a29469e132a4f",
|
"url": "https://api.github.com/repos/docopt/docopt.php/zipball/5ad491cb9fc072e8bb0497061a09b0efcf25cbcf",
|
||||||
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f",
|
"reference": "5ad491cb9fc072e8bb0497061a09b0efcf25cbcf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -26,13 +26,13 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "4.1.*"
|
"phpunit/phpunit": "4.1.*"
|
||||||
},
|
},
|
||||||
|
"default-branch": true,
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"src/docopt.php"
|
"src/docopt.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
|
@ -51,10 +51,10 @@
|
||||||
"docs"
|
"docs"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/docopt/docopt.php/issues",
|
"source": "https://github.com/docopt/docopt.php/tree/master",
|
||||||
"source": "https://github.com/docopt/docopt.php/tree/1.0.4"
|
"issues": "https://github.com/docopt/docopt.php/issues"
|
||||||
},
|
},
|
||||||
"time": "2019-12-03T02:48:46+00:00"
|
"time": "2022-05-11T23:52:25+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
|
@ -1299,7 +1299,8 @@
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {
|
"stability-flags": {
|
||||||
"nicolus/picofeed": 20
|
"nicolus/picofeed": 20,
|
||||||
|
"docopt/docopt": 20
|
||||||
},
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
|
|
|
@ -7,13 +7,15 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace JKingWeb\Arsse;
|
namespace JKingWeb\Arsse;
|
||||||
|
|
||||||
|
use AllowDynamicProperties;
|
||||||
use JKingWeb\Arsse\Misc\ValueInfo as Value;
|
use JKingWeb\Arsse\Misc\ValueInfo as Value;
|
||||||
|
|
||||||
/** Class for loading, saving, and querying configuration
|
/** Class for loading, saving, and querying configuration
|
||||||
*
|
*
|
||||||
* The Conf class serves both as a means of importing and querying configuration information, as well as a source for default parameters when a configuration file does not specify a value.
|
* The Conf class serves both as a means of importing and querying configuration information, as well as a source for default parameters when a configuration file does not specify a value.
|
||||||
* All public properties are configuration parameters that may be set by the server administrator. */
|
* All public properties are configuration parameters that may be set by the server administrator. */
|
||||||
class Conf {
|
#[AllowDynamicProperties]
|
||||||
|
class Conf {
|
||||||
/** @var string Default language to use for logging and errors */
|
/** @var string Default language to use for logging and errors */
|
||||||
public $lang = "en";
|
public $lang = "en";
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
|
||||||
public const SQLITE_MISMATCH = 20;
|
public const SQLITE_MISMATCH = 20;
|
||||||
|
|
||||||
protected $db;
|
protected $db;
|
||||||
|
protected $collator;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
// check to make sure required extension is loaded
|
// check to make sure required extension is loaded
|
||||||
|
|
|
@ -21,6 +21,8 @@ use JKingWeb\Arsse\Service\Daemon;
|
||||||
|
|
||||||
/** @covers \JKingWeb\Arsse\CLI */
|
/** @covers \JKingWeb\Arsse\CLI */
|
||||||
class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest {
|
class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
|
protected $cli;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->cli = $this->partialMock(CLI::class);
|
$this->cli = $this->partialMock(CLI::class);
|
||||||
|
|
|
@ -29,6 +29,10 @@ abstract class AbstractTest extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
protected static $drv;
|
protected static $drv;
|
||||||
protected static $failureReason = "";
|
protected static $failureReason = "";
|
||||||
protected $primed = false;
|
protected $primed = false;
|
||||||
|
protected $data;
|
||||||
|
protected $user;
|
||||||
|
protected $checkTables;
|
||||||
|
protected $series;
|
||||||
|
|
||||||
abstract protected function nextID(string $table): int;
|
abstract protected function nextID(string $table): int;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ use JKingWeb\Arsse\Misc\Date;
|
||||||
use JKingWeb\Arsse\Misc\ValueInfo;
|
use JKingWeb\Arsse\Misc\ValueInfo;
|
||||||
|
|
||||||
trait SeriesArticle {
|
trait SeriesArticle {
|
||||||
|
protected $fields;
|
||||||
|
|
||||||
protected function setUpSeriesArticle(): void {
|
protected function setUpSeriesArticle(): void {
|
||||||
$this->data = [
|
$this->data = [
|
||||||
'arsse_users' => [
|
'arsse_users' => [
|
||||||
|
|
|
@ -10,6 +10,8 @@ use JKingWeb\Arsse\Arsse;
|
||||||
use JKingWeb\Arsse\Test\Result;
|
use JKingWeb\Arsse\Test\Result;
|
||||||
|
|
||||||
trait SeriesFeed {
|
trait SeriesFeed {
|
||||||
|
protected $matches;
|
||||||
|
|
||||||
protected function setUpSeriesFeed(): void {
|
protected function setUpSeriesFeed(): void {
|
||||||
// set up the test data
|
// set up the test data
|
||||||
$past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute"));
|
$past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute"));
|
||||||
|
|
|
@ -11,6 +11,8 @@ use JKingWeb\Arsse\Database;
|
||||||
use JKingWeb\Arsse\Context\Context;
|
use JKingWeb\Arsse\Context\Context;
|
||||||
|
|
||||||
trait SeriesLabel {
|
trait SeriesLabel {
|
||||||
|
protected $checkLabels;
|
||||||
|
|
||||||
protected function setUpSeriesLabel(): void {
|
protected function setUpSeriesLabel(): void {
|
||||||
$this->data = [
|
$this->data = [
|
||||||
'arsse_users' => [
|
'arsse_users' => [
|
||||||
|
|
|
@ -10,6 +10,9 @@ use JKingWeb\Arsse\Arsse;
|
||||||
use JKingWeb\Arsse\Database;
|
use JKingWeb\Arsse\Database;
|
||||||
|
|
||||||
trait SeriesTag {
|
trait SeriesTag {
|
||||||
|
protected $checkMembers;
|
||||||
|
protected $checkTags;
|
||||||
|
|
||||||
protected function setUpSeriesTag(): void {
|
protected function setUpSeriesTag(): void {
|
||||||
$this->data = [
|
$this->data = [
|
||||||
'arsse_users' => [
|
'arsse_users' => [
|
||||||
|
|
|
@ -17,6 +17,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
protected $data;
|
protected $data;
|
||||||
protected $drv;
|
protected $drv;
|
||||||
protected $ch;
|
protected $ch;
|
||||||
|
protected $files;
|
||||||
|
protected $path;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
if (!Driver::requirementsMet()) {
|
if (!Driver::requirementsMet()) {
|
||||||
|
|
|
@ -19,6 +19,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
protected $data;
|
protected $data;
|
||||||
protected $drv;
|
protected $drv;
|
||||||
protected $ch;
|
protected $ch;
|
||||||
|
protected $files;
|
||||||
|
protected $path;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
if (!Driver::requirementsMet()) {
|
if (!Driver::requirementsMet()) {
|
||||||
|
|
|
@ -15,6 +15,8 @@ use JKingWeb\Arsse\Test\Database;
|
||||||
class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest {
|
class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
protected $drv;
|
protected $drv;
|
||||||
protected $proc;
|
protected $proc;
|
||||||
|
protected $data;
|
||||||
|
protected $primed;
|
||||||
protected $checkTables = [
|
protected $checkTables = [
|
||||||
'arsse_folders' => ["id", "owner", "parent", "name"],
|
'arsse_folders' => ["id", "owner", "parent", "name"],
|
||||||
'arsse_feeds' => ["id", "url", "title"],
|
'arsse_feeds' => ["id", "url", "title"],
|
||||||
|
|
|
@ -39,6 +39,7 @@ class TestDaemon extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
'unwritable' => "", // this file will be chmodded by the test
|
'unwritable' => "", // this file will be chmodded by the test
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
protected $daemon;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
|
@ -17,6 +17,8 @@ use JKingWeb\Arsse\User\Driver;
|
||||||
|
|
||||||
/** @covers \JKingWeb\Arsse\User */
|
/** @covers \JKingWeb\Arsse\User */
|
||||||
class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
|
class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
|
protected $drv;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
self::setConf();
|
self::setConf();
|
||||||
|
|
12
vendor-bin/phpunit/composer.lock
generated
12
vendor-bin/phpunit/composer.lock
generated
|
@ -615,16 +615,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "9.2.23",
|
"version": "9.2.24",
|
||||||
"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": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
|
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
|
||||||
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
|
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -680,7 +680,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.23"
|
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -688,7 +688,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-12-28T12:41:10+00:00"
|
"time": "2023-01-26T08:26:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
|
|
Loading…
Reference in a new issue