Skip to content

Releases: ThomasWeinert/FluentDOM

8.0.0

18 Apr 18:17
22ee563
Compare
Choose a tag to compare
  • [!BC] Minimum PHP Version 7.2.0
  • [!BC] \FluentDOM\Loadable::load() now always returns
    \FluentDOM\Loader\Result instance (or NULL)
  • [!BC] Define Return Type For \FluentDOM\Loadable::load()
  • [!BC] Define Return Type For \FluentDOM\Loadable::loadFragment()
  • [!BC] Define Appendable::appendTo() Return Value
    as "void"
  • [!BC] Change Method Signatures Of DOM L3 Methods To Match PHP
  • [!BC] Declare FluentDOM::setLoader() Argument As A Nullable
    Of Loadable
  • [FEATURE] #90 Throw Exception If File Can Not Be Loaded
  • [REFACTOR] Define Argument And Return Types
  • [REFACTOR] Reference Loaders By Class Constants
  • [REFACTOR] Cleanup Unit Tests

7.4.0

28 Sep 12:22
bb9f9ee
Compare
Choose a tag to compare
  • [DOC] Add XMLWriter Append Example
  • [FEATURE] #87 Add FluentDOM\Query::unwrap()

7.3.0

29 Jul 19:26
5379904
Compare
Choose a tag to compare
  • [FEATURE] Add PRESERVE_WHITESPACE option to XML loaders

7.2.0

25 May 15:48
1620d38
Compare
Choose a tag to compare
  • Set class files to strict types

  • Implement #78: ParentNode::$childElementCount

  • Implement #80: allow to remove namespace attributes

  • Add inheritance to Node interfaces

  • DocumentFragment implements the ParentNode interface

  • DOM Element::setAttribute() has not return value (in W3C standard)

  • Add Clark Notation to elements: FluentDOM\Element::clarkNotation

  • Add Clark Notation to attributes: FluentDOM\DOM\Attribute::clarkNotation()

  • Fix cdata section support for BadgerFish serializer

  • Let \FluentDOM\Exception interface extend \Throwable

  • Rename DOM\ChildNode::replace() to replaceWith() (DOM LS standard), keep replace for BC but mark as deprecated

  • DOMCDATASection implements DOMText change condition order to fix handling in XMLWriter::collapse().

  • Add constraint for node classes, FluentDOM\Utility\Constraints::assertNodeClass()

  • Add: JsonDOM example with mapping array node name

  • Fix phpdoc annotations

  • Cleanup code and fix inspections

  • Add missing unit tests

Thanks to @thewilkybarkid for his contributions.

7.1.0

11 Nov 14:19
9103871
Compare
Choose a tag to compare
  • Add: FluentDOM\DOM\Implementation extended DOMImplementation
  • Add: FluentDOM\DOM\Document::createDocumentType()
  • Add: XMLWriter filter example
  • Update: PHP 7.3 added to CI
  • Test: loading html fragment using option Loader\Html::IS_FRAGMENT
  • Fix inspection messages, function call optimization and return types
  • Refactor: array_merge() to array_push()
  • Fix: recursion handling in FluentDOM\Loader\Json\JsonDOM and FluentDOM\Loader\PHP\PDO

7.0.0

01 Oct 10:44
Compare
Choose a tag to compare
  • Changed: minimum PHP version is now 7.0
  • Changed: Added type hints and return types
  • Changed: Moved extended DOM classes to FluentDOM\DOM\*
  • Changed: FluentDOM\Nodes\Creator to FluentDOM\Creator
  • Changed: Moved internal classes into FluentDOM\Utility
  • Removed: Document::find() and Element::find()
  • Fixed #70: FluentDOM\Query::get($position) should return a node
  • Fixed #73, FluentDOM\Creator forgets namespaces
  • Added #73: FluentDOM\XMLWriter::collapse() collapse DOM nodes
  • Added #74: FluentDOM\XMLReader::attachStream() attach stream to read from

6.2.0

30 Jul 12:13
Compare
Choose a tag to compare
  • Fixed #73: Creator forgot namespaces
  • Added: $filter argument (callable) to XMLReader::next() and XMLReader::read()
  • Added: FluentDOM\XMLReader\Iterator
  • Added: FluentDOM\XMLReader\SiblingIterator

6.1.0

01 Jul 13:38
Compare
Choose a tag to compare
  • Added #58: FluentDOM\Nodes\Creator::$optimizeNamespaces (default TRUE) optimizes
    namespace definitions on the created document.
  • Added: FluentDOM\NamespaceResolver interface
  • Added: FluentDOM\Namespaces namespace resolver implementation
  • Refactored: FluentDOM\Document::namespaces() now returns a FluentDOM\Namespaces instance
  • Removed: FluentDOM\Document::getNamespace() - use FluentDOM\Document::namespaces() object
  • Added #62: FluentDOM\XMLReader extend XMLReader with namespace registration
  • Added #63: FluentDOM\XMLWriter extend XMLWriter with namespace registration,
    workaround for repeated namespace definitions
  • Added: FluentDOM\XMLReader::read() supports optional $namespaceUri parameter
  • Added: FluentDOM\XMLReader::next() supports optional $name and $namespaceUri parameters
  • Fixed #66: Improved Multibyte handling for HTML loader/serializer
  • Added #60: FluentDOM\EntityReference

6.0.1

24 Dec 19:11
Compare
Choose a tag to compare
  • Fixed #57: FluentDOM\Text::replaceWholeText() removed entity

6.0.0

23 Dec 15:28
Compare
Choose a tag to compare
  • Changed: minimum PHP version is now 5.6
  • Changed: you might now need to set an option to load files (security)
    • [\FluentDOM\Options\ALLOW_FILE => TRUE]
    • [\FluentDOM\Options\IS_FILE => TRUE]
  • Changed: major cleanup/overhaul of the examples
  • Refactored: Replace func_get_args() with variadics
  • Added: HTML loader now supports 'html-fragment' and 'text/html-fragment'
  • Added: XML/HTML loaders now support libxml options for the load methods
  • Added: JsonDOM loader supports a callback for mapping keys to tag names
    The callback can be set using an option or JsonDOM::onMapKey().
  • Changed: string arguments to methods like FluentDOM\Query::append() are now parsed as
    HTML fragments if the content type of the FluentDOM\Query instance is a HTML type.
  • Changed: NULL values can now be set using FluentDOM\Query::attr(), FluentDOM\Query::css()
    and FluentDOM\Query::data() methods.
  • Changed: FluentDOM\Nodes()/FluentDOM\Query() now keeps the content type used to load the
    document and use it for parsing fragments and serializing the document.
  • Added: FluentDOM\Loadable::loadFragment()
  • Added: FluentDOM\Text::replaceWholeText() and FluentDOM\CdataSection::replaceWholeText()
  • Added: FluentDOM::registerSerializerFactory(), register function/factory to create
    a serializer for a node.
  • Added: FluentDOM\Loader\Options generic options for loaders (source type)
  • Added: FluentDOM\Exceptions\LoadingError exception interface