| @@ -1,0 +1,34 @@ | ||
| 1 | +# Reprint Server | |
| 2 | + | |
| 3 | +Composer package for the Reprint streaming export engine — the HTTP endpoint | |
| 4 | +installed on the WordPress host that Reprint clients pull from and push to. | |
| 5 | + | |
| 6 | +This package was previously published as `wp-php-toolkit/reprint-exporter`. | |
| 7 | +It replaces that package (`replace: self.version`), so the two names cannot be | |
| 8 | +installed side by side. Consumers should require | |
| 9 | +`wp-php-toolkit/reprint-server` directly. | |
| 10 | + | |
| 11 | +## Loading it | |
| 12 | + | |
| 13 | +Composer's classmap covers every class in `src/`, so classes resolve after | |
| 14 | +requiring `vendor/autoload.php`. | |
| 15 | + | |
| 16 | +Reprint's entry points load their utility functions internally. `src/utils.php` | |
| 17 | +is an internal implementation file and is not a public autoload entry point. | |
| 18 | + | |
| 19 | +`src/export.php` never autoloads, and that is deliberate. It declares functions | |
| 20 | +rather than classes, so the classmap scan finds nothing in it to register. Keep | |
| 21 | +it that way: requiring the file starts an output buffer and installs error, | |
| 22 | +exception and shutdown handlers, all of which belong at dispatch time. | |
| 23 | +`Site_Export_HTTP_Server::serve()` requires it at the right moment. Adding a | |
| 24 | +class to `export.php` would make it autoloadable and break that. | |
| 25 | + | |
| 26 | +## Development | |
| 27 | + | |
| 28 | +This repository is a read-only Composer package split from the Reprint monorepo. It is published so Composer can install `wp-php-toolkit/reprint-server` directly. | |
| 29 | + | |
| 30 | +Do not propose changes in this package repository. Open issues and pull requests against the source repository instead: | |
| 31 | + | |
| 32 | +https://github.com/WordPress/reprint | |
| 33 | + | |
| 34 | +The package repository is overwritten from `packages/reprint-server` in the monorepo during releases, so direct changes here will be lost. | |