Skip to content

Commit

Permalink
Merge pull request #46 from kiwilan/develop
Browse files Browse the repository at this point in the history
v2.1.01
  • Loading branch information
ewilan-riviere authored Aug 29, 2023
2 parents e1d0fa4 + e33b389 commit 9068cb8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 0 additions & 5 deletions src/Ebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 1 addition & 2 deletions tests/EpubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9068cb8

Please sign in to comment.