Releases: bakame-php/http-structured-fields
Releases · bakame-php/http-structured-fields
version 0.6.0
Added
- The
Container,MemberList,MemberOrderedMap,ParameterAccessinterfaces. OrderedListandInnerListimplement theMemberListinterface.ParametersandDictionnaryimplement theMemberOrderedMapinterface.- The
InvalidArgumentexception. Token::valueis a readonly property.Item::valuemethod returns the decoded value of an Item (returns value can befloat|int|string|bool).Item::fromToken,Item::fromDecodedByteSequence,Item::fromEncodedByteSequenceto easeItemcreation.Item::withValueto easeItemvalue update.Parsermethods also acceptsStringableobjects.
Fixed
- None.
Deprecated
- None
Removed
- [BC Break]
__set_stateimplementation in all objects. - [BC Break]
Tokenno longer implements theStructuredFieldinterface. - [BC Break]
Token::toHttpValueis removed; use theItemclass to serialize aToken. - [BC Break]
Token::toStringis removed use its readonly property insteadToken::value. - [BC Break]
ByteSequenceno longer implements theStructuredFieldinterface. - [BC Break]
ByteSequence::toHttpValueis removed; use theItemclass to serialize aByteSequence. - [BC Break]
::sanitizemethod is removed useParameters::clearmethod instead if needed. - [BC Break]
isEmptymethod is removed usehasMembersmethod instead. - [BC Break]
Parameters::valueuseItem::valuemethod instead. - [BC Break]
Parameters::valuesuseParameters::getIteratorinstead. - [BC Break]
Item::valuepublic readonly property useItem::valuemethod instead. - [BC Break]
Item::parameterspublic readonly property useItem::parametersmethod instead. - [BC Break]
InnerList::parameterspublic readonly property useInnerList::parametersmethod instead.
version 0.5.0
Added
Item::fromPairnamed constructor to create a new instance from a pair expressed as an array list with two values.Parameters::sanitizeensure the container always contains only Bare Items.InnerList::sanitizeensure the list is without gaps and callsParameters::sanitize.OrderedList::sanitizeensure the list is without gaps and callsParameters::sanitize.Dictionnary::sanitizeensure the list is without gaps and callsParameters::sanitize.Item::sanitizecallsParameters::sanitize.autoload.phpscript to allow non composer application to load the packageOrderedListandInnerListnow implements the PHPArrayAccessinterface.
Fixed
InnerList::fromHttpValueaccepts Optional White Spaces at the start of its textual representation.Parameters::fromHttpValueaccepts Optional White Spaces at the start of its textual representation.Item::fromHttpValuebugfix parsing Token data type.
Deprecated
- None
Removed
- [BC Break]
InnerListno longer re-index its content replaced byInnerList::sanitizeto force re-indexation. - [BC Break]
OrdererListno longer re-index its content replaced byInnerList::sanitizeto force re-indexation.
version 0.4.0
Added
Dictionary::mergeAssociativeandDictionary::mergePairsto allow merging with associative structuresParameters::mergeAssociativeandParameters::mergePairsto allow merging with key-value pairs structures
Fixed
- All containers
Dictionary,InnerList,OrderedList,Parametersmodifying methods are made chainable. Parseronly returnsarray's of items or bare items value.- All
Parametersgetters checks for bare items validity. ForbiddenStateErrorextends SPLLogicExceptioninstead ofUnexpectedValueException
Deprecated
- None
Removed
- [BC Break]
Dictionary::mergereplaced byDictionary::mergeAssociative - [BC Break]
Parameters::mergereplaced byParameters::mergeAssociative
version 0.3.0
Added
InnerList::fromHttpValuenamed constructor to make the public API consistent for all VOs
Fixed
- None
Deprecated
- None
Removed
- None
version 0.2.0
Added
Item::valueis a public readonly property that gives access to the item valueItem::parametersis a public readonly property that gives access to the item parametersInnerList::parametersis a public readonly property that gives access to the list parametersOrderedList::fromnamed constructor which accepts a variadic list of members itemsToken::fromStringnamed constructor which acceptsstringandStringableobjectParameter::valuesreturns an array of all the values contained inside theParametersinstance- [BC Break]
ForbiddenStateErrorto replaceSerializationError - [BC Break]
InnerList::fromListto replaceInnerList::fromMembers - [BC Break]
OrderedList::fromListto replaceOrderedList::fromMembers - [BC Break]
Parameter::valueto replaceInnerList::parameterandItem::parameter
Fixed
ByteSequence::fromDecodednamed constructor also accepts aStringableobjectByteSequence::fromEncodednamed constructor also accepts aStringableobjectDictionary::mergeaccepts any iterable that can be accepted byDictionary::fromAssociativeas variadic parameterParameter::mergeaccepts any iterable that can be accepted byParameter::fromAssociativeas variadic parameter- [BC Break]
OrderedList::__constructis made private useOrderedList::frominstead - [BC Break]
InnerList::__constructis made private useInnerList::fromListinstead - [BC Break]
Token::__constructis made private useToken::fromStringinstead - [BC Break]
Parameter::get,Parameter::value,Parameter::pairwill throwForbiddenStateErrorif the BareItem is in invalid state.
Deprecated
- None
Removed
- [BC Break]
InnerList::fromMembersreplaced byInnerList::fromList - [BC Break]
OrderedList::fromMembersreplaced byOrderedList::fromList - [BC Break]
Item::parameterreplaced byParameter::value - [BC Break]
InnerList::parameterreplaced byParameter::value - [BC Break]
SupportsParametersinterface is removed without replacement - [BC Break]
Item::value()replaced byItem::valuepublic readonly property - [BC Break]
Item::parameters()replaced byItem::parameterspublic readonly property - [BC Break]
InnerList::parameters()replaced byInnerList::parameterspublic readonly property - [BC Break]
InnerList::merge()useInnerList::push()orInnerList::unshift()instead - [BC Break]
OrderedList::merge()useOrderedList::push()orOrderedList::unshift()instead - [BC Break]
SerializationErroruseForbiddenStateErrorinstead
version 0.1.0
Initial release!