Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: malarzm <[email protected]>
  • Loading branch information
alcaeus and malarzm authored Apr 15, 2019
1 parent 7e64d4f commit d17df9c
Show file tree
Hide file tree
Showing 33 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DocumentNotFoundEventArgs extends LifecycleEventArgs
public function __construct($document, DocumentManager $dm, $identifier)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($document, $dm);
$this->identifier = $identifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LoadClassMetadataEventArgs extends BaseLoadClassMetadataEventArgs
public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($classMetadata, $objectManager);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OnClassMetadataNotFoundEventArgs extends ManagerEventArgs
public function __construct($className, DocumentManager $dm)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->className = (string) $className;

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/OnClearEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OnClearEventArgs extends BaseOnClearEventArgs
public function __construct($objectManager, $entityClass = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($objectManager, $entityClass);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/OnFlushEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OnFlushEventArgs extends ManagerEventArgs
public function __construct(ObjectManager $objectManager)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($objectManager);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PostCollectionLoadEventArgs extends ManagerEventArgs
public function __construct(PersistentCollectionInterface $collection, DocumentManager $dm)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($dm);
$this->collection = $collection;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/PostFlushEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PostFlushEventArgs extends ManagerEventArgs
public function __construct(ObjectManager $objectManager)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($objectManager);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/PreFlushEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PreFlushEventArgs extends ManagerEventArgs
public function __construct(ObjectManager $objectManager)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($objectManager);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/PreLoadEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PreLoadEventArgs extends LifecycleEventArgs
public function __construct($document, DocumentManager $dm, array &$data)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($document, $dm);
$this->data =& $data;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Event/PreUpdateEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PreUpdateEventArgs extends LifecycleEventArgs
public function __construct($document, DocumentManager $dm, array $changeSet)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($document, $dm);
$this->documentChangeSet = $changeSet;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Hydrator/HydratorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HydratorException extends MongoDBException
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Hydrator/HydratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class HydratorFactory
public function __construct(DocumentManager $dm, EventManager $evm, $hydratorDir, $hydratorNs, $autoGenerate)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
if ( ! $hydratorDir) {
throw HydratorException::hydratorDirectoryRequired();
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Id/AlnumGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AlnumGenerator extends IncrementGenerator
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Id/AutoGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AutoGenerator extends AbstractIdGenerator
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Id/IncrementGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class IncrementGenerator extends AbstractIdGenerator
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Id/UuidGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class UuidGenerator extends AbstractIdGenerator
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/LockException.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LockException extends MongoDBException
public function __construct($msg, $document = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($msg);
$this->document = $document;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MappingException extends BaseMappingException
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/PersistentCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PersistentCollection implements PersistentCollectionInterface
public function __construct(BaseCollection $coll, DocumentManager $dm, UnitOfWork $uow)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->coll = $coll;
$this->dm = $dm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PersistentCollectionException extends MongoDBException
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
parent::__construct($message, $code, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CollectionPersister
public function __construct(DocumentManager $dm, PersistenceBuilder $pb, UnitOfWork $uow)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->pb = $pb;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function __construct(
CriteriaMerger $cm = null
) {
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->pb = $pb;
$this->dm = $dm;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Persisters/PersistenceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PersistenceBuilder
public function __construct(DocumentManager $dm, UnitOfWork $uow)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->uow = $uow;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Query/CriteriaMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CriteriaMerger
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Query/FilterCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class FilterCollection
public function __construct(DocumentManager $dm, CriteriaMerger $cm = null)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->cm = $cm ?: new CriteriaMerger();
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Query extends \Doctrine\MongoDB\Query\Query
public function __construct(DocumentManager $dm, ClassMetadata $class, Collection $collection, array $query = array(), array $options = array(), $hydrate = true, $refresh = false, array $primers = array(), $requireIndexes = null, $readOnly = false)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}

$primers = array_filter($primers);
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Query/QueryExpressionVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class QueryExpressionVisitor extends ExpressionVisitor
public function __construct(Builder $builder)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->builder = $builder;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Query/ReferencePrimer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ReferencePrimer
public function __construct(DocumentManager $dm, UnitOfWork $uow)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}

$this->dm = $dm;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/SchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SchemaManager
public function __construct(DocumentManager $dm, ClassMetadataFactory $cmf)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->metadataFactory = $cmf;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class UnitOfWork implements PropertyChangedListener
public function __construct(DocumentManager $dm, EventManager $evm, HydratorFactory $hydratorFactory)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->evm = $evm;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Utility/CollectionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CollectionHelper
public function __construct()
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/MongoDB/Utility/LifecycleEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LifecycleEventManager
public function __construct(DocumentManager $dm, UnitOfWork $uow, EventManager $evm)
{
if (self::class !== static::class) {
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in 2.0.', static::class, self::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The class "%s" extends "%s" which will be final in MongoDB ODM 2.0.', static::class, self::class), E_USER_DEPRECATED);
}
$this->dm = $dm;
$this->evm = $evm;
Expand Down

0 comments on commit d17df9c

Please sign in to comment.