Skip to content

Every deck the library writes is checked against the schema Microsoft's validator reads - #42

Closed
fabeat wants to merge 3 commits into
mainfrom
feature/ooxml-validator-gate
Closed

fabeat wants to merge 3 commits into
mainfrom
feature/ooxml-validator-gate

Conversation

@fabeat

@fabeat fabeat commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Two changes, one release.

The patch carries the chart series in the order the schema names them

The patch this package applies is the difference between PHPPresentation 1.2.0 and upstream's branch, and the branch has moved: a chart's series is now written in the order the schema names it — the shape properties right after the title rather than after the data points and the data labels, and the separator of the data labels of a doughnut before the leader lines rather than after them. PowerPoint repairs a chart written the other way round before it opens it.

So the patch is regenerated against the branch that carries the fix, and the commit it is pinned to in the manifest moves with it. Nothing this library draws changes: it writes no chart, and the patch is upstream's branch whole.

The patch itself is in markdown-office/PHPPresentation, on the branch the manifest has always named.

Every deck the library writes is checked against the schema Microsoft's validator reads

Nothing in the suite could see that a deck is outside the schema. The decks were checked against the parts they carry, and a deck whose XML is outside the schema passes every one of those checks and opens in PowerPoint as [Repaired].

The gate is Microsoft's own validator — the one the Open XML SDK Productivity Tool uses — run over every deck the library writes. It is a program in tools/ooxml-validator/ rather than a dependency: nothing that ships with the library needs it, and the suite runs without it.

A machine with no .NET SDK says what is missing and skips the test, because a green tick for a check that never ran is a check nobody made. The job that runs the gate installs the SDK and runs the suite with --fail-on-skipped, so the gate cannot skip itself there.

The decks are the ones the gallery is built from, and the plan of them is the file the script that writes them holds it in: examples/decks.php. A list of its own in the test would be a second answer to a question that already has one, and the two would drift — a deck the gallery no longer builds and the gate still checks, which is the worse of the two.

The suite is at 100% coverage and level 9 of static analysis, and stays there.

The patch this package applies is the difference between PHPPresentation 1.2.0 and
upstream's branch, and the branch has moved: a chart's series is now written in the
order the schema names it — the shape properties right after the title rather than
after the data points and the data labels, and the separator of the data labels of a
doughnut before the leader lines rather than after them. PowerPoint repairs a chart
written the other way round before it opens it.

So the patch is regenerated against the branch that carries the fix, and the commit it
is pinned to in the manifest moves with it. Nothing this library draws changes: it
writes no chart, and the patch is upstream's branch whole.
…'s validator reads

Nothing in the suite could see that a deck is outside the schema. The decks were
checked against the parts they carry, and a deck whose XML is outside the schema
passes every one of those checks and opens in PowerPoint as `[Repaired]`.

The gate is Microsoft's own validator — the one the Open XML SDK Productivity Tool
uses — run over every deck the library writes. It is a program in
`tools/ooxml-validator/` rather than a dependency: nothing that ships with the library
needs it, and the suite runs without it. A machine with no .NET SDK says what is
missing and skips the test, because a green tick for a check that never ran is a check
nobody made; the job that runs the gate installs the SDK, so it cannot skip itself
there.

The decks are the ones the gallery is built from, and the plan of them is the file the
script that writes them holds it in: `examples/decks.php`. A list of its own in the
test would be a second answer to a question that already has one, and the two would
drift — a deck the gallery no longer builds and the gate still checks, which is the
worse of the two.
@sonarqubecloud

Copy link
Copy Markdown

@fabeat

fabeat commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #43: the release branch was cut from this one, so both changes — the patch carrying the chart series and the OOXML gate — are in the release pull request, together with the release notes.

The last commit here went to release/0.3.1 as well: the gate's first shape skipped the whole test where the runner's Imagick cannot draw a vector, which made the job red, and the deck that carries a vector is a test of its own now.

@fabeat fabeat closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant