Skip to content

Introduction of Php.Gt's own CSS translator

Choose a tag to compare

@g105b g105b released this 14 Jun 15:33
· 130 commits to master since this release
a5419ea

The major change featured in this release is the introduction of PHP.Gt/CssXPath - our own CSS to XPath translator, meaning we can remove the huge dependency tree of Symfony Components and concentrate on a much more terse and efficient codebase.

All current v1 unit tests have been kept with the introduction of our own translator, so in theory there will not be any backwards-breaking changes, but theory is only ever as good as its latest observation. Please let us know using the issue tracker if this release affects your codebase (also, let us know if it has a positive effect - we'd love to hear from you).

Other notable changes in this release include:

  • All typehints are updated so that all LibXML functions that return native DOMDocument objects now know about the Gt/Dom extension objects (the same can be said with the PHP.Gt/DomTempalte repository too!)
  • In minimal HTML5 documents, a missing <body> tag will be automatically inferred, as is the same in web browsers
  • All element attributes can be set by using live properties, which was a missing feature in v1. A common example of this is setting the "href" attribute of a link: $link->href = "/page"; versus the longhand $link->setAttribute("href", "/page");
  • Following on from that point, special properties are now handled correctly, such as the way only a single radiobutton in the same group can have its checked property set to true.

Please feedback to the contributors how you find this release, either through the issue tracker, or drop a message to dom@php.gt

Have fun and stay productive!