Releases: bakame-php/http-structured-fields
Releases · bakame-php/http-structured-fields
version 0.5.0
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 callsParameters::sanitize
.OrderedList::sanitize
ensure the list is without gaps and callsParameters::sanitize
.Dictionnary::sanitize
ensure the list is without gaps and callsParameters::sanitize
.Item::sanitize
callsParameters::sanitize
.autoload.php
script to allow non composer application to load the packageOrderedList
andInnerList
now implements the PHPArrayAccess
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 byInnerList::sanitize
to force re-indexation. - [BC Break]
OrdererList
no longer re-index its content replaced byInnerList::sanitize
to force re-indexation.
version 0.4.0
Added
Dictionary::mergeAssociative
andDictionary::mergePairs
to allow merging with associative structuresParameters::mergeAssociative
andParameters::mergePairs
to allow merging with key-value pairs structures
Fixed
- All containers
Dictionary
,InnerList
,OrderedList
,Parameters
modifying methods are made chainable. Parser
only returnsarray
's of items or bare items value.- All
Parameters
getters checks for bare items validity. ForbiddenStateError
extends SPLLogicException
instead ofUnexpectedValueException
Deprecated
- None
Removed
- [BC Break]
Dictionary::merge
replaced byDictionary::mergeAssociative
- [BC Break]
Parameters::merge
replaced byParameters::mergeAssociative
version 0.3.0
Added
InnerList::fromHttpValue
named constructor to make the public API consistent for all VOs
Fixed
- None
Deprecated
- None
Removed
- None
version 0.2.0
Added
Item::value
is a public readonly property that gives access to the item valueItem::parameters
is a public readonly property that gives access to the item parametersInnerList::parameters
is a public readonly property that gives access to the list parametersOrderedList::from
named constructor which accepts a variadic list of members itemsToken::fromString
named constructor which acceptsstring
andStringable
objectParameter::values
returns an array of all the values contained inside theParameters
instance- [BC Break]
ForbiddenStateError
to replaceSerializationError
- [BC Break]
InnerList::fromList
to replaceInnerList::fromMembers
- [BC Break]
OrderedList::fromList
to replaceOrderedList::fromMembers
- [BC Break]
Parameter::value
to replaceInnerList::parameter
andItem::parameter
Fixed
ByteSequence::fromDecoded
named constructor also accepts aStringable
objectByteSequence::fromEncoded
named constructor also accepts aStringable
objectDictionary::merge
accepts any iterable that can be accepted byDictionary::fromAssociative
as variadic parameterParameter::merge
accepts any iterable that can be accepted byParameter::fromAssociative
as variadic parameter- [BC Break]
OrderedList::__construct
is made private useOrderedList::from
instead - [BC Break]
InnerList::__construct
is made private useInnerList::fromList
instead - [BC Break]
Token::__construct
is made private useToken::fromString
instead - [BC Break]
Parameter::get
,Parameter::value
,Parameter::pair
will throwForbiddenStateError
if the BareItem is in invalid state.
Deprecated
- None
Removed
- [BC Break]
InnerList::fromMembers
replaced byInnerList::fromList
- [BC Break]
OrderedList::fromMembers
replaced byOrderedList::fromList
- [BC Break]
Item::parameter
replaced byParameter::value
- [BC Break]
InnerList::parameter
replaced byParameter::value
- [BC Break]
SupportsParameters
interface is removed without replacement - [BC Break]
Item::value()
replaced byItem::value
public readonly property - [BC Break]
Item::parameters()
replaced byItem::parameters
public readonly property - [BC Break]
InnerList::parameters()
replaced byInnerList::parameters
public readonly property - [BC Break]
InnerList::merge()
useInnerList::push()
orInnerList::unshift()
instead - [BC Break]
OrderedList::merge()
useOrderedList::push()
orOrderedList::unshift()
instead - [BC Break]
SerializationError
useForbiddenStateError
instead
version 0.1.0
Initial release!