From 5928cafac0778c1db7e1921268e3d123b5d55d5f Mon Sep 17 00:00:00 2001 From: Thomas Schulz Date: Wed, 20 Mar 2019 02:01:27 +0100 Subject: [PATCH] Added meta for Doctrine ORM --- composer.json | 3 +- dbal/.phpstorm.meta.php | 20 ++++++++- orm/.phpstorm.meta.php | 99 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 orm/.phpstorm.meta.php diff --git a/composer.json b/composer.json index b03746f..dd5411f 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "require-dev": { "doctrine/annotations": "^1.6", "doctrine/collections": "^1.5", - "doctrine/dbal": "^2.9" + "doctrine/dbal": "^2.9", + "doctrine/orm": "^2.6" } } diff --git a/dbal/.phpstorm.meta.php b/dbal/.phpstorm.meta.php index f3cbf4b..e57f9e8 100644 --- a/dbal/.phpstorm.meta.php +++ b/dbal/.phpstorm.meta.php @@ -227,6 +227,9 @@ \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE ); expectedArguments(\Doctrine\DBAL\Platforms\AbstractPlatform::appendLockHint(), 1, argumentsSet('doctrine_lock_modes')); + expectedArguments(\Doctrine\ORM\Query::setLockMode(), 0, argumentsSet('doctrine_lock_modes')); + expectedReturnValues(\Doctrine\ORM\Query::getLockMode(), argumentsSet('doctrine_lock_modes')); + expectedArguments(\Doctrine\ORM\EntityManagerInterface::lock(), 1, argumentsSet('doctrine_lock_modes')); registerArgumentsSet('doctrine_transaction_isolation_levels', \Doctrine\DBAL\TransactionIsolationLevel::READ_UNCOMMITTED, @@ -287,7 +290,22 @@ \Doctrine\DBAL\Events::onSchemaAlterTableChangeColumn, \Doctrine\DBAL\Events::onSchemaAlterTableRenameColumn, \Doctrine\DBAL\Events::onSchemaColumnDefinition, - \Doctrine\DBAL\Events::onSchemaIndexDefinition + \Doctrine\DBAL\Events::onSchemaIndexDefinition, + \Doctrine\ORM\Events::prePersist, + \Doctrine\ORM\Events::postPersist, + \Doctrine\ORM\Events::preUpdate, + \Doctrine\ORM\Events::postUpdate, + \Doctrine\ORM\Events::preRemove, + \Doctrine\ORM\Events::postRemove, + \Doctrine\ORM\Events::postLoad, + \Doctrine\ORM\Events::loadClassMetadata, + \Doctrine\ORM\Events::onClassMetadataNotFound, + \Doctrine\ORM\Events::preFlush, + \Doctrine\ORM\Events::onFlush, + \Doctrine\ORM\Events::postFlush, + \Doctrine\ORM\Events::onClear, + \Doctrine\ORM\Tools\ToolEvents::postGenerateSchemaTable, + \Doctrine\ORM\Tools\ToolEvents::postGenerateSchema ); expectedArguments(\Doctrine\Common\EventManager::dispatchEvent(), 0, argumentsSet('doctrine_events')); expectedArguments(\Doctrine\Common\EventManager::getListeners(), 0, argumentsSet('doctrine_events')); diff --git a/orm/.phpstorm.meta.php b/orm/.phpstorm.meta.php new file mode 100644 index 0000000..0ab97ca --- /dev/null +++ b/orm/.phpstorm.meta.php @@ -0,0 +1,99 @@ +