diff --git a/README.md b/README.md index 8c50b9e..d7d01f5 100644 --- a/README.md +++ b/README.md @@ -17,23 +17,6 @@ _Supports Linux, macOS and Windows._ > > This package favors eBooks in open formats such as `.epub` or `.cbz` and which be parsed with native PHP, so for the best possible experience we recommend converting the eBooks you use. If you want to know more about eBook ecosystem, you can read [documentation](https://github.com/kiwilan/php-ebook/blob/main/docs/README.md). -## Table of Contents - -- [About](#about) -- [Requirements](#requirements) -- [Features](#features) - - [Roadmap](#roadmap) -- [Installation](#installation) -- [Usage](#usage) - - [Main](#main) - - [Metadata](#metadata) - - [MetaTitle](#metatitle) - - [Cover](#cover) -- [Testing](#testing) -- [Changelog](#changelog) -- [Credits](#credits) -- [License](#license) - ## About This package was built for [`bookshelves-project/bookshelves`](https://github.com/bookshelves-project/bookshelves), a web app to handle eBooks. diff --git a/composer.json b/composer.json index 08cf58b..4088803 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiwilan/php-ebook", "description": "PHP package to read metadata and extract covers from eBooks (.epub, .cbz, .cbr, .cb7, .cbt, .pdf) and audiobooks (.mp3, .m4a, .m4b, .flac, .ogg).", - "version": "2.1.0", + "version": "2.1.01", "keywords": [ "php", "ebook", diff --git a/src/Ebook.php b/src/Ebook.php index 385f616..c731a5c 100755 --- a/src/Ebook.php +++ b/src/Ebook.php @@ -468,11 +468,6 @@ public function getExtension(): string */ public function getArchive(): ?BaseArchive { - // if (! $this->archive) { - // error_log("{$this->path} can't be read as archive."); - // throw new \Exception("{$this->path} can't be read as archive."); - // } - return $this->archive; } diff --git a/tests/EpubTest.php b/tests/EpubTest.php index 198462e..5924b51 100644 --- a/tests/EpubTest.php +++ b/tests/EpubTest.php @@ -166,8 +166,7 @@ expect(Ebook::isValid(EPUB_BAD_FILE))->toBeFalse(); expect($ebook->hasMetadata())->toBeFalse(); expect($ebook->isBadFile())->toBeTrue(); - // expect(fn () => $ebook->getArchive())->toThrow(Exception::class); - expect(fn () => $ebook->getArchive()?->filter('opf'))->not()->toThrow(Exception::class); + expect(fn () => $ebook->getArchive()->filter('opf'))->not()->toThrow(Exception::class); }); it('can handle bad epub', function (string $epub) {