- Support PHP 8.1
- Bump minimum PHP version to
^7.1
. - Support PHP 8.
This release fixes an issue when the display_errors
configuration of PHP is turned on.
Events have landed ! Check out the documentation for more informations.
- The protected property
parameters
of theXenus\Collection
class has been renamed toconfiguration
. - The
Xenus\CollectionParameters
class has been renamed toXenus\CollectionConfiguration
. - A collection can now be resolved by relationships using an implementation of the
Xenus\CollectionResolver
interface.
- The
Xenus\Collection
class now takes aXenus\Connection
as its first argument. Read https://abellion.github.io/xenus/#/?id=first-steps to know more. - The
Xenus\Document
class now contains a__sleep()
method.
- The
Xenus\Concerns\HasRelationships
build
method is now protected. - The
Xenus\Support\Transform::collection()
method now preserves the given collection's keys.
- Added a
count()
method tohasMany
andbelongsToMany
relationships.
- Added a
findOne()
method tohasMany
andbelongsToMany
relationships. - Added a
distinct()
method tohasMany
andbelongsToMany
relationships.
- The
Xenus\Collection
constant propertiesNAME
andDOCUMENT
became protected properties. - The way relationships are loaded can be customized via the
resolve()
method of theXenus\Collection
class.
This release fixes a bug on case sensitive filesystems.
Relationships have landed ! Check out the documentation for more informations.
- The
Xenus\Collection
protected propertiesname
anddocument
became constant properties. - The
Xenus\Collection
class is no longerabstract
. You can instantiate it by giving an array of options as a second argument. - All of the
Xenus\Collection
methods returning a MongoDB Cursor now return aXenus\Cursor
having the same methods as the original cursor. - The
Xenus\Document
now provides accessors for an_id
property.
- The
Xenus\Document::embed()
method has been removed. Use theXenus\Support\Embed
utility instead. - The
Xenus\Support\Embed
utility has been added. - The
Xenus\Support\Transform
utility has been added.
- The
Xenus\Collection
class now ineriths from theMongoDB\Collection
class. - The
Xenus\Collection\CRUDMethods
has been removed and its methods have moved into theXenus\Collection
class. - The
Xenus\Collection::findOne()
,Xenus\Collection::updateOne()
,Xenus\Collection::deleteOne()
andXenus\Collection::replaceOne()
methods can take aMongoDB\BSON\ObjectID
as a filter argument. - The
Xenus\Document
type hint has been removed from theXenus\Collection::insert()
,Xenus\Collection::update()
andXenus\Collection::delete()
methods.
- The
Xenus\Document::get()
method can take as a second argument the default value to give in case the given key doesn't exist within the document.
- The
Xenus\Document::with()
no longer includes the_id
field by default. - The
Xenus\Document::without()
no longer includes the_id
field by default.
- The
Xenus\Document::with()
method now returns the higher document's instance. - The
Xenus\Document::without()
method now returns the higher document's instance.
- The
Xenus\Document
has two new methods :with()
andwithout()
. - The
Xenus\Collection::select()
method has been renamed tofind()
.
This release add documentation blocks on top of the library methods.
- The
Xenus\Document
has a newmerge()
method, used to fill the document's values.
- The
Xenus/Document/Serializers/HttpSerializer
methods have been removed. - The
Xenus/Document/Serializers/DefaultSerializer
methods have been removed. - The
Xenus\Document::toArray()
is the preferred way to serialize a document's properties.