Skip to content

Licensing

Mikhail Deynekin edited this page Nov 1, 2026 · 2 revisions

Licensing

MIT β€” and now stated once. Every released version has been MIT, 5.0.0 included. Before 6.0.0 the repository contradicted itself: LICENSE, the root composer.json and the six READMEs had been switched to PolyForm Noncommercial 1.0.0, while the WordPress plugin header, the two edition manifests and this wiki still said MIT. That switch came after the v5.0.0 tag and never shipped in a release; 6.0.0 gives the question one answer, and CI keeps it.

What MIT allows

  • Commercial use. Run HTML.PHP in a business, an agency deliverable or a paid product.
  • Closed-source embedding. Ship it inside a proprietary application; you do not have to publish your own code.
  • Modification. Change anything β€” the engine, the bundles, the plugin β€” and keep the result private if you want.
  • Redistribution and sublicensing. Bundle it in a distribution, a Docker image or a shared-hosting stack.

The one condition

The copyright notice and the permission notice travel with the code. Concretely: keep LICENSE next to the copy you distribute, and keep the header of php83/html.php / php85/html.php intact. That is the whole obligation; there is no attribution requirement in a UI, no "powered by" notice, and no separate contributor agreement.

What it does not grant

  • No warranty. The software is provided "as is"; defects are not the author's liability. For a library that renders untrusted templates, read Security Model before trusting it with user input.
  • No trademark licence. The name "HTML.PHP" and the social preview in assets/ are not part of the MIT grant: a fork may use the code, not the identity.
  • No patent peace clause. MIT is silent on patents, unlike Apache-2.0. If your legal review requires an explicit patent grant, say so in an issue before you adopt the code.

What is covered

Artefact Files
PSR-4 sources src/, src-8.5/
Single-file editions php83/html.php, php85/html.php
WordPress plugin wordpress/html-php/
Documentation and examples docs/, examples/, this wiki

All of it is one work under one LICENSE file β€” a file copied out of the tree still says what it is, because the manifest and the version are checked against each other.

How the repository keeps it honest

tests/cases/16_release_contract.test.php runs in every CI leg and fails when:

  • LICENSE is not the MIT text;
  • any of the three composer.json manifests names another licence;
  • a README stops declaring MIT or stops linking LICENSE;
  • the version in src/Version.php, src-8.5/Version.php, the edition manifests, the six READMEs, the plugin header or wordpress/html-php/readme.txt drifts apart.

That test exists because the split described at the top of this page lived in the unreleased tree without anything failing β€” the licence of a library is exactly the kind of fact nobody re-reads until it matters.

If you saw the PolyForm wording

No released version carried those terms, so there is nothing to migrate: 6.0.0 is 5.0.0 with the licence stated in every manifest β€” composer update (or a new bundle download) and nothing else. If you read the repository in that window and stopped because of the noncommercial wording, the answer is MIT and always was in releases β€” Getting Started is the shortest path to a rendered page.

Related

  • Contributing β€” how changes are accepted, including the licence of your contribution
  • Security Model β€” what the library refuses to do with untrusted templates
  • ROADMAP β€” where the project goes next

Clone this wiki locally