This changelog references the relevant changes done in 3.x versions.
- Require php
>=8.1
- Fix issue with use of static variables in functions for flyweight classes. https://wiki.php.net/rfc/static_variable_inheritance
- Add return types to squash php8.1 warnings.
- In
AbstractMessage
ensure decoded values are properly unset whenever array-like field values are changed.
- Add capability to ignore a field in MappingBuilder.
- Cast strings to floats in
GeoPoint::fromString
.
- Uses
"brick/math": "^0.9"
.
- In
TimeUuidIdentifier
use regex test as fallback as ramsey may be usingLazyUuidFromString
.
- Fix bug in
AbstractMessage::removeFromSet
that doesn't stringify value before doing strlen check.
- Use fget on
AbstractMessage::getNestedMessages
for better performance. - Use
static::MAX_PATH_DEPTH
onGdbots\Pbj\Marshaler\Elastica\MappingBuilder
to allow extended classes to customize the depth.
BREAKING CHANGES
- Require php
>=7.4
- Uses php7 type hinting throughout with
declare(strict_types=1);
- Uses
"ramsey/uuid": "^4.0"
- Replaces
moontoast/math
withbrick/math
- Moves
Gdbots\Pbj\WellKnown\MessageRef
toGdbots\Pbj\WellKnown\MessageRef
- Removes
Gdbots\Pbj\WellKnown\BigNumber
, we are just usingBigInt
direct frombrick/math
now. - Removes
Mixin
andAbstractMixin
since thegdbots/pbjc
no longer uses them. - Changes
MessageResolver::findOneUsingMixin
andMessageResolver::findAllUsingMixin
to use a curie (string) for resolution and instead of returning the schema it just returns curies (strings) of the messages using the mixin. - Removes
Gdbots\Pbj\Exception\HasEndUserMessage
. - Changes
MessageResolver::register
to accept a map of curie to classname since mixin resolution uses separate manifests. - Simplifies
Schema
so the mixins are just the curies in string form, not objects. - Adds
Gdbots\Pbj\WellKnown\NodeRef
andGdbots\Pbj\Type\NodeRefType
. - Removes use of
gdbots/common
lib as those classes moved toGdbots\Pbj\Util\*Util
. - Removes use of
Gdbots\Common\FromArray
andGdbots\Common\ToArray
interfaces as it wasn't really needed. - Adds
Gdbots\Pbj\Enum
which replacesGdbots\Common\Enum
. - Adds
Codec::skipValidation
which allows an optimized process for encoding/decoding that uses native php scalars/arrays where possible instead of objects. This should only be used when data is very trusted and highest performance possible is required. - Replaces
Gdbots\Pbj\Marshaler\Elastica\MappingFactory
withGdbots\Pbj\Marshaler\Elastica\MappingBuilder
which produces a single mapping (for 7.x) from one or more schemas since elasticsearch no longer uses types.