diff --git a/resources/php-epub-meta/composer.json b/resources/php-epub-meta/composer.json index 83a1d711a..d56878cd2 100644 --- a/resources/php-epub-meta/composer.json +++ b/resources/php-epub-meta/composer.json @@ -20,9 +20,10 @@ ], "license": "MIT", "require": { + "ext-dom": "*", "ext-xml": "*", "ext-zip": "*", - "seblucas/tbszip": "~2.16.0" + "seblucas/tbszip": "~2.16.1" }, "require-dev": { "phpunit/phpunit": "9.*" diff --git a/resources/php-epub-meta/composer.lock b/resources/php-epub-meta/composer.lock index ce8cc5bae..888ee1d97 100644 --- a/resources/php-epub-meta/composer.lock +++ b/resources/php-epub-meta/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "19ed89d1bc9d4901ffc817cd6eb6434b", + "content-hash": "4277e962da8ebff636eac1799d4c524f", "packages": [ { "name": "seblucas/tbszip", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.5", + "version": "9.6.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5" + "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86e761949019ae83f49240b2f2123fb5ab3b2fc5", - "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b65d59a059d3004a040c16a82e07bbdf6cfdd115", + "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115", "shasum": "" }, "require": { @@ -762,7 +762,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.5" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.6" }, "funding": [ { @@ -778,7 +779,7 @@ "type": "tidelift" } ], - "time": "2023-03-09T06:34:10+00:00" + "time": "2023-03-27T11:43:46+00:00" }, { "name": "sebastian/cli-parser", @@ -1801,6 +1802,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { + "ext-dom": "*", "ext-xml": "*", "ext-zip": "*" }, diff --git a/resources/php-epub-meta/lib/EPub.php b/resources/php-epub-meta/lib/EPub.php index 7f0042459..c5b02a219 100644 --- a/resources/php-epub-meta/lib/EPub.php +++ b/resources/php-epub-meta/lib/EPub.php @@ -6,10 +6,9 @@ * @author Sébastien Lucas */ -define('METADATA_FILE', 'META-INF/container.xml'); - class EPub { + public const METADATA_FILE = 'META-INF/container.xml'; public $xml; //FIXME: change to protected, later public $toc; protected $xpath; @@ -38,11 +37,11 @@ public function __construct($file, $zipClass = 'clsTbsZip') } // read container data - if (!$this->zip->FileExists(METADATA_FILE)) { + if (!$this->zip->FileExists(self::METADATA_FILE)) { throw new Exception('Unable to find metadata.xml'); } - $data = $this->zip->FileRead(METADATA_FILE); + $data = $this->zip->FileRead(self::METADATA_FILE); if ($data == false) { throw new Exception('Failed to access epub container data'); }