Browse Source

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.
arch
J. King 1 year ago
parent
commit
0d6f8d2921
  1. 1
      .gitignore
  2. 2
      arsse.php
  3. 6
      composer.json
  4. 21
      composer.lock
  5. 4
      lib/Conf.php
  6. 1
      lib/Db/SQLite3/Driver.php
  7. 2
      tests/cases/CLI/TestCLI.php
  8. 4
      tests/cases/Database/AbstractTest.php
  9. 2
      tests/cases/Database/SeriesArticle.php
  10. 2
      tests/cases/Database/SeriesFeed.php
  11. 2
      tests/cases/Database/SeriesLabel.php
  12. 3
      tests/cases/Database/SeriesTag.php
  13. 2
      tests/cases/Db/SQLite3/TestCreation.php
  14. 2
      tests/cases/Db/SQLite3PDO/TestCreation.php
  15. 2
      tests/cases/ImportExport/TestImportExport.php
  16. 1
      tests/cases/Service/TestDaemon.php
  17. 2
      tests/cases/User/TestUser.php
  18. 12
      vendor-bin/phpunit/composer.lock

1
.gitignore

@ -11,6 +11,7 @@
/arsse.db*
/config.php
/.php_cs.cache
/.php-cs-fixer.cache
/tests/.phpunit.result.cache
# Dependencies

2
arsse.php

@ -13,7 +13,7 @@ require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php";
ignore_user_abort(true);
ini_set("memory_limit", "-1");
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);
if (\PHP_SAPI === "cli") {

6
composer.json

@ -26,7 +26,7 @@
"ext-dom": "*",
"nicolus/picofeed": "dev-bugfix",
"hosteurope/password-generator": "1.*",
"docopt/docopt": "1.*",
"docopt/docopt": "dev-master",
"jkingweb/druuid": "3.*",
"guzzlehttp/psr7": "1.*",
"laminas/laminas-httphandlerrunner": "1.*"
@ -64,6 +64,10 @@
{
"type": "vcs",
"url": "https://github.com/rhukster/picoFeed"
},
{
"type": "vcs",
"url": "https://github.com/docopt/docopt.php"
}
]
}

21
composer.lock

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "21a116823c3335992910966f31861811",
"content-hash": "62bf2d6fdc0ccbeb090399f708928a02",
"packages": [
{
"name": "docopt/docopt",
"version": "1.0.4",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/docopt/docopt.php.git",
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f"
"reference": "5ad491cb9fc072e8bb0497061a09b0efcf25cbcf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/docopt/docopt.php/zipball/bf3683a16e09fa1665e493eb4d5a29469e132a4f",
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f",
"url": "https://api.github.com/repos/docopt/docopt.php/zipball/5ad491cb9fc072e8bb0497061a09b0efcf25cbcf",
"reference": "5ad491cb9fc072e8bb0497061a09b0efcf25cbcf",
"shasum": ""
},
"require": {
@ -26,13 +26,13 @@
"require-dev": {
"phpunit/phpunit": "4.1.*"
},
"default-branch": true,
"type": "library",
"autoload": {
"classmap": [
"src/docopt.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@ -51,10 +51,10 @@
"docs"
],
"support": {
"issues": "https://github.com/docopt/docopt.php/issues",
"source": "https://github.com/docopt/docopt.php/tree/1.0.4"
"source": "https://github.com/docopt/docopt.php/tree/master",
"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",
@ -1299,7 +1299,8 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"nicolus/picofeed": 20
"nicolus/picofeed": 20,
"docopt/docopt": 20
},
"prefer-stable": false,
"prefer-lowest": false,

4
lib/Conf.php

@ -7,13 +7,15 @@
declare(strict_types=1);
namespace JKingWeb\Arsse;
use AllowDynamicProperties;
use JKingWeb\Arsse\Misc\ValueInfo as Value;
/** 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.
* 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 */
public $lang = "en";

1
lib/Db/SQLite3/Driver.php

@ -20,6 +20,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
public const SQLITE_MISMATCH = 20;
protected $db;
protected $collator;
public function __construct() {
// check to make sure required extension is loaded

2
tests/cases/CLI/TestCLI.php

@ -21,6 +21,8 @@ use JKingWeb\Arsse\Service\Daemon;
/** @covers \JKingWeb\Arsse\CLI */
class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest {
protected $cli;
public function setUp(): void {
parent::setUp();
$this->cli = $this->partialMock(CLI::class);

4
tests/cases/Database/AbstractTest.php

@ -29,6 +29,10 @@ abstract class AbstractTest extends \JKingWeb\Arsse\Test\AbstractTest {
protected static $drv;
protected static $failureReason = "";
protected $primed = false;
protected $data;
protected $user;
protected $checkTables;
protected $series;
abstract protected function nextID(string $table): int;

2
tests/cases/Database/SeriesArticle.php

@ -15,6 +15,8 @@ use JKingWeb\Arsse\Misc\Date;
use JKingWeb\Arsse\Misc\ValueInfo;
trait SeriesArticle {
protected $fields;
protected function setUpSeriesArticle(): void {
$this->data = [
'arsse_users' => [

2
tests/cases/Database/SeriesFeed.php

@ -10,6 +10,8 @@ use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Test\Result;
trait SeriesFeed {
protected $matches;
protected function setUpSeriesFeed(): void {
// set up the test data
$past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute"));

2
tests/cases/Database/SeriesLabel.php

@ -11,6 +11,8 @@ use JKingWeb\Arsse\Database;
use JKingWeb\Arsse\Context\Context;
trait SeriesLabel {
protected $checkLabels;
protected function setUpSeriesLabel(): void {
$this->data = [
'arsse_users' => [

3
tests/cases/Database/SeriesTag.php

@ -10,6 +10,9 @@ use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Database;
trait SeriesTag {
protected $checkMembers;
protected $checkTags;
protected function setUpSeriesTag(): void {
$this->data = [
'arsse_users' => [

2
tests/cases/Db/SQLite3/TestCreation.php

@ -17,6 +17,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest {
protected $data;
protected $drv;
protected $ch;
protected $files;
protected $path;
public function setUp(): void {
if (!Driver::requirementsMet()) {

2
tests/cases/Db/SQLite3PDO/TestCreation.php

@ -19,6 +19,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest {
protected $data;
protected $drv;
protected $ch;
protected $files;
protected $path;
public function setUp(): void {
if (!Driver::requirementsMet()) {

2
tests/cases/ImportExport/TestImportExport.php

@ -15,6 +15,8 @@ use JKingWeb\Arsse\Test\Database;
class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest {
protected $drv;
protected $proc;
protected $data;
protected $primed;
protected $checkTables = [
'arsse_folders' => ["id", "owner", "parent", "name"],
'arsse_feeds' => ["id", "url", "title"],

1
tests/cases/Service/TestDaemon.php

@ -39,6 +39,7 @@ class TestDaemon extends \JKingWeb\Arsse\Test\AbstractTest {
'unwritable' => "", // this file will be chmodded by the test
],
];
protected $daemon;
public function setUp(): void {
parent::setUp();

2
tests/cases/User/TestUser.php

@ -17,6 +17,8 @@ use JKingWeb\Arsse\User\Driver;
/** @covers \JKingWeb\Arsse\User */
class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
protected $drv;
public function setUp(): void {
parent::setUp();
self::setConf();

12
vendor-bin/phpunit/composer.lock

@ -615,16 +615,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.23",
"version": "9.2.24",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
"shasum": ""
},
"require": {
@ -680,7 +680,7 @@
],
"support": {
"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": [
{
@ -688,7 +688,7 @@
"type": "github"
}
],
"time": "2022-12-28T12:41:10+00:00"
"time": "2023-01-26T08:26:55+00:00"
},
{
"name": "phpunit/php-file-iterator",

Loading…
Cancel
Save