- UrlValidator ping use checkdnsrr
- Fixed in building docker environment
- Changed return values of rename methods of Collection
- Added method to rename collection
- Add $elemMatch to projection argument of
Cursor CursormethodsfindOne,findAll,findRandomdeprecated, useone,allandrandomrespectively;- Allow pass filter to docker tests
- Document's
afterConstructevent triggered with document instance
- Cache now compatible with PSR-16;
- Cache setters now return bool instead of exceptions to be compatible with PSR-16;
- Cache::setNeverExpired and Cache::setDueDate now deprecated. Use Cache::set instead;
- Fix searching documents with regex #148
- Fix collection creation with empty options
- Allow specify validator while create collection
- Fixed mispell in method name BatchInsert::isValidationEbabled
- Fixed usage of validation flag in BatchInsert
Document::beforeConstructmoved toStructure::beforeConstructso embedded documents may configure some logic thereCollection::batchDelete()now has required argument- Now may be configured batch limit in
Cursor::copyToCollectionandCursor::moveToCollection - Methods of
\Iteratorinterface currently not recommended to use directly inCursorandPaginator. But if used, nowrewindMUST be calls beforecurrent. - Remove debug logger calls
- Implemented support of new ext-mongodb and, as a result, PHP7 and HHVM through compatibility layer "alcaeus/mongo-php-adapter", which implement API from old ext-mongo extension;
- Cursor::findOne() throws internal
CursorExceptionexception instead of related to mongo extension. Exception from extension may be obtained from internal exception; - Document::save() throws internal
WriteExceptionexception instead of related to mongo extension. Exception from extension may be obtained from internal exception; - Docker tests now check PHP 7 code
- Structure::apply() now protected
- Fix bug in Document::addToSet
- Docker config improvements
- Fix bug #132 in Document::push
- Configure document pool status in collection's mapping;
Collection::_mongoCollectionis deprecated. UseCollection::getMongoCollection()instead;Collection::ensureIndex()is deprecated, useCollection::createIndex();Cursor::toArray()removed, useCursor::getMongoQuery();Document::belongsToCollection()removed, useCollection::hasDocument();Document::FIELD_TYPE_*constants removed, useFieldTypeenumCollection::_databaseremoved, use Collection::getDatabase() instead;
- Docker tests
- Support of DBRefs
Client::$_mappingset private.Use Client::map()- Configure document class if collection class also configured by class prefix #128
- Fixed aggregation pipeline setter
- Allow set embedded document and validate it;
\Sokil\Mongo\Structure\Arrayablemoves to\Sokil\Mongo\ArrayableInterface;Structure::$_modifiedFieldsandStructure::$_originalDataset private;- Document::_data is now deprecated, and replaced with protected property Document::schema;
- Documents not allowed to be cloned;
- Removed 'validator' suffix from names of validation errors in array of validation errors obtained from Document::getErrors();
- Update version of Event Dispatcher
- Allow delete indexes
- Removed
Collection::createPipeline(). UseCollection::createAggregator; - Aggregator options may be passed as arguments of
Collection::aggregate($pipelines, $options)or configured through methods ofPipeline; - Experimental feature: aggregation returns Cursor, if third parameter passed
Collection::aggregate($pipelines, $options, $asCursor); Collection::explainAggregate()is deprecated. UsePipeline::explain();- Added debug mode to
Client;
- Fulltext search
- Fixed bug #121 - Getting relation when document pool disabled
- Added $addToSet operator
- Add support of batch operations
- Support of $unwind pipeline in aggregation
- Fix getting HAS_ONE and BELONGS relation when related object not found;
- Cache detected db version
- Cursor autocomplete improves
- Use
MongoWriteBatchclasses when using unit of work
- Added support of cursor timeouts
- Added
Database::getLastError()
- Optimistic locking
- Refactoring of mapping configs.
- Default argument removed from
Collection::getOption(). - Removed deprecated method
Collection::saveDocument(). - Removed deprecated method
Client::setConnection(). Use Client::setMongoClient(). - Removed deprecated method
Client::getConnection(). Use Client::getMongoClient(). - Removed
Document::pushFromArray(). UseDocument::pushEach(). - Removed
Paginator::setQueryBuilder()’. UsePaginator::setCursor()`. - Removed
Document::fromArray(). UseDocument::merge()instead. - Removed
Structure::load(). UsemergeormergeUnmidifiedinstead. - Revision methods moved to
RevisionManager. Call them fromDocumentinstance directly is deprecated. UseDocument::getRevisionManager()instead. - Mark Document::_scenario as private.
- Define relations in mapping.
Operator::getAll()is deprecated. UseOperator::toArray().- Protected access of property Structure::_modifiedFields is deprecated. Use self::getModifiedFields().
- Protected access of property Structure::_originalData is deprecated. Use self::getOriginalData().
- Removed classes QueryBuilder and GridFSQueryBuilder. Hydration logic improved
- Refactor document saving
- Collection::deleteDocument() is deprecated. Use Document::delete()
- Collection::isVersioningEnabled() and Collection::enableVersioning() are deprecated. Use 'vrsioning' in mapping.
- Collection properties 'documentClass', 'versioning', '_index' and '_queryExpressionClass' are deprecated. Use mapping declarations instead.
- Method 'Validator::validate()' marked as final
- Refactoring or document relations
Document::belongsToCollection()now deprecated. Use Collection::hasDocument()- Refactor document events
- Define cursor's batch size
- Accept expression array and callable when call
Collection::getDistinct()
- Fix update when expression defined as callable
- Fix deleting documents when expression specified as callable
- If callable in
Dollection::getDocument()specified, document always loaded directly omitting document pool. - Fixed 'in' validator when custom error message specified
- Dependency from major version number of Symfony Event Dispatcher
- Fixed bug with naming of validator in errors array. Removed suffix 'validator'.
- Behavior refactoring.
- Old validator name is kept for back compatibility and will be removed in next versions
Operatorrefactoring and bugfixes- Fix Collection::update when update data set as array
- Set
Structureto document as embedded document
- Apply chain of functions over result set
- Bug with passing behaviors, configured in mapping, to documents
- Refactor document validation exceptions. Exception
\Sokil\Mongo\Document\Exception\Validatedeprecated. Use\Sokil\Mongo\Document\InvalidDocumentException. - Allow to get matched params on regex mapping.
- Configure cursor when get document by id to slice embedded documents or other reason
- Add
Collection::update()method that allow to define different update options - Refactoring and bugfixes
- Allow unset field end check for empty value by php functions
unsetandisset - Attach behaviors in mapping
- Bugfixes
- Fixed bug with default values of collection options
- Happy New Year
AggragetePipelinesclass renamed toPipeline. If you in some reason use it directly, use factory methodCollection::greateAggregator()instead- Added some aggregation group accumulators and expressions
- Query builder's expression may be configured in mapping
Client::setConnection()deprecated sice 1.8.0. UseClient::setMongoClient()Client::getConnection()deprecated sice 1.8.0. UseClient::getMongoClient()- Overloading of query builder through
Collection::$_queryBuilderClassis deprecated and will be marked as private. Overload expressionCollection::$_queryExpressionClassinstead Collection::saveDocument()deprecated since v.1.8.0. UseDocument::save()method- Collection::createPipeline() deprecated since 1.10.10, use
Collection::createAggregator()or callable inCollection::aggregate() Document::fromArray()deprecated useDocument::merge()insteadDocument::pushFromArray()deprecated since 1.6.0 useDocument::pushEach()insteadPaginator::setQueryBuilder()deprecated since 1.2.0 usePaginator:::setCursor()Structure::load()deprecated since 1.8.1 and will be removed in next versions. Use concrete merge methods
- Initial functionality