メインコンテンツまでスキップ

Installation

composer require 2bo-velocity/mejiroepub

Requirements​

PHP8.3 or later, 64-bit
Extensionsmbstring, xmlwriter, zlib, hash (the last three ship with almost every PHP build)
Packagespsr/log — interfaces only; bring any PSR-3 logger, or none

Nothing else: no Java, no command-line tools, no temporary directory you have to configure. EPUBCheck is used by the library's own tests, not at run time.

The PHP version is checked at run time​

Composer refuses to install on PHP older than 8.3. If that check is bypassed (--ignore-platform-reqs), constructing a Document throws an exception with the required and the running version in its message, rather than failing later with a syntax error that says nothing useful.

Checking the installed version​

echo MejiroEPUB\Version::VERSION; // "0.1.1"
echo MejiroEPUB\Version::generator(); // "MejiroEPUB 0.1.1"

The generator string is also written into every EPUB, so a file can tell you which version made it.