Add Keynote reader and writer - #891
Open
yasumorishima wants to merge 1 commit into
Open
Conversation
yasumorishima
force-pushed
the
feature/keynote-reader-writer
branch
from
June 25, 2026 18:33
fc81da2 to
4e7e96b
Compare
Contributor
Author
|
A quick note on the currently red CI jobs — they are all unrelated to this change:
The new Keynote reader/writer is green on every job where the environment resolves correctly: PHPStan 7.1 / 7.4 / 8.0–8.3, PHPUnit 7.1 / 7.4 / 8.0 / 8.2 / 8.3 / 8.4, all Happy to adjust anything on request. |
yasumorishima
force-pushed
the
feature/keynote-reader-writer
branch
2 times, most recently
from
July 14, 2026 13:22
e4df1bd to
fa09911
Compare
yasumorishima
force-pushed
the
feature/keynote-reader-writer
branch
from
August 11, 2026 08:37
bfaeee7 to
2d24ff2
Compare
Contributor
Author
|
Rebased onto The two
The presentation diff is otherwise unchanged from the previous head. |
Add basic support for the Apple Keynote (.key) presentation format, targeting the legacy iWork '09 structure where the presentation is stored as an `index.apxl` XML document inside the `.key` package. The reader and writer cover slides, text placeholders (paragraphs and runs), shape geometry and speaker notes, and are validated with a round-trip test. The modern IWA binary format used by Keynote '13 and later is intentionally out of scope and is safely rejected by canRead(). Both classes follow the existing reader/writer conventions, are registered in IOFactory for automatic resolution, and are documented in the usage pages. Refs PHPOffice#48
yasumorishima
force-pushed
the
feature/keynote-reader-writer
branch
from
August 20, 2026 04:00
2d24ff2 to
35abce6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Adds a Reader and Writer for the Apple Keynote (
.key) presentation format.The implementation targets the legacy iWork '09 structure, where a Keynote
package is a Zip archive containing an
index.apxlXML document. Both classesfollow the existing reader/writer conventions (
ReaderInterface/AbstractWriter)and are registered in
IOFactoryfor automatic resolution.Supported in this first milestone:
Why
Resolves the long-standing request for Keynote support (#48). A previous attempt
(#860) targeted the modern IWA binary format and stalled; this PR deliberately
scopes to the XML-based iWork '09 structure so it can be implemented in pure PHP
(no new dependencies), stays compatible with the project's supported PHP versions
(7.4+), and is fully verifiable in CI.
Scope / limitations (intentional)
Protobuf) is out of scope and is safely rejected by
canRead()(no falsepositives).
directly in a current Keynote.app. Correctness is instead guaranteed by a
round-trip test (write → read → assert structure).
lines, tables, charts) and in-run line breaks — is silently skipped on
save; this is characterized by tests (see below).
follow-up work.
How it was tested
canRead()rejection of non-Keynote files, non-Zipfiles and directories, and
load()error cases (missing file, wrong format).runs and speaker notes; an empty presentation; Unicode and XML metacharacters
(
< > & " ', non-ASCII, emoji) surviving escaping unchanged; multiple textplaceholders per slide preserved in order; and non-representable content
(a line shape and an in-run line break) being skipped without data corruption.
phpunit,phpstan(level 6),php-cs-fixerandphpmdall pass; the fullexisting suite remains green (no regressions).
Notes
ext-xmlandext-zip(already required).docs/usage/readers.mdanddocs/usage/writers.md.Closes #48
/claim #48