Skip to content

Releases: bakame-php/http-structured-fields

version 0.5.0

13 May 20:18
Compare
Choose a tag to compare

Added

  • Item::fromPair named constructor to create a new instance from a pair expressed as an array list with two values.
  • Parameters::sanitize ensure the container always contains only Bare Items.
  • InnerList::sanitize ensure the list is without gaps and calls Parameters::sanitize.
  • OrderedList::sanitize ensure the list is without gaps and calls Parameters::sanitize.
  • Dictionnary::sanitize ensure the list is without gaps and calls Parameters::sanitize.
  • Item::sanitize calls Parameters::sanitize.
  • autoload.php script to allow non composer application to load the package
  • OrderedList and InnerList now implements the PHP ArrayAccess interface.

Fixed

  • InnerList::fromHttpValue accepts Optional White Spaces at the start of its textual representation.
  • Parameters::fromHttpValue accepts Optional White Spaces at the start of its textual representation.
  • Item::fromHttpValue bugfix parsing Token data type.

Deprecated

  • None

Removed

  • [BC Break] InnerList no longer re-index its content replaced by InnerList::sanitize to force re-indexation.
  • [BC Break] OrdererList no longer re-index its content replaced by InnerList::sanitize to force re-indexation.

version 0.4.0

28 Mar 18:44
Compare
Choose a tag to compare

Added

  • Dictionary::mergeAssociative and Dictionary::mergePairs to allow merging with associative structures
  • Parameters::mergeAssociative and Parameters::mergePairs to allow merging with key-value pairs structures

Fixed

  • All containers Dictionary, InnerList, OrderedList, Parameters modifying methods are made chainable.
  • Parser only returns array's of items or bare items value.
  • All Parameters getters checks for bare items validity.
  • ForbiddenStateError extends SPL LogicException instead of UnexpectedValueException

Deprecated

  • None

Removed

  • [BC Break] Dictionary::merge replaced by Dictionary::mergeAssociative
  • [BC Break] Parameters::merge replaced by Parameters::mergeAssociative

version 0.3.0

21 Mar 11:42
Compare
Choose a tag to compare

Added

  • InnerList::fromHttpValue named constructor to make the public API consistent for all VOs

Fixed

  • None

Deprecated

  • None

Removed

  • None

version 0.2.0

20 Mar 22:17
Compare
Choose a tag to compare

Added

  • Item::value is a public readonly property that gives access to the item value
  • Item::parameters is a public readonly property that gives access to the item parameters
  • InnerList::parameters is a public readonly property that gives access to the list parameters
  • OrderedList::from named constructor which accepts a variadic list of members items
  • Token::fromString named constructor which accepts string and Stringable object
  • Parameter::values returns an array of all the values contained inside the Parameters instance
  • [BC Break] ForbiddenStateError to replace SerializationError
  • [BC Break] InnerList::fromList to replace InnerList::fromMembers
  • [BC Break] OrderedList::fromList to replace OrderedList::fromMembers
  • [BC Break] Parameter::value to replace InnerList::parameter and Item::parameter

Fixed

  • ByteSequence::fromDecoded named constructor also accepts a Stringable object
  • ByteSequence::fromEncoded named constructor also accepts a Stringable object
  • Dictionary::merge accepts any iterable that can be accepted by Dictionary::fromAssociative as variadic parameter
  • Parameter::merge accepts any iterable that can be accepted by Parameter::fromAssociative as variadic parameter
  • [BC Break] OrderedList::__construct is made private use OrderedList::from instead
  • [BC Break] InnerList::__construct is made private use InnerList::fromList instead
  • [BC Break] Token::__construct is made private use Token::fromString instead
  • [BC Break] Parameter::get, Parameter::value, Parameter::pair will throw ForbiddenStateError if the BareItem is in invalid state.

Deprecated

  • None

Removed

  • [BC Break] InnerList::fromMembers replaced by InnerList::fromList
  • [BC Break] OrderedList::fromMembers replaced by OrderedList::fromList
  • [BC Break] Item::parameter replaced by Parameter::value
  • [BC Break] InnerList::parameter replaced by Parameter::value
  • [BC Break] SupportsParameters interface is removed without replacement
  • [BC Break] Item::value() replaced by Item::value public readonly property
  • [BC Break] Item::parameters() replaced by Item::parameters public readonly property
  • [BC Break] InnerList::parameters() replaced by InnerList::parameters public readonly property
  • [BC Break] InnerList::merge() use InnerList::push() or InnerList::unshift() instead
  • [BC Break] OrderedList::merge() use OrderedList::push() or OrderedList::unshift() instead
  • [BC Break] SerializationError use ForbiddenStateError instead

version 0.1.0

18 Mar 12:30
Compare
Choose a tag to compare

Initial release!