New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpstorm meta #7676
base: old-prototype-3.x
Are you sure you want to change the base?
phpstorm meta #7676
Conversation
I'm against putting IDE-specific files in Doctrine repositories… have you considered creating a plugin instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agree with @greg0ire.
I'm mostly for these changes (for some of these APIs), but I'd first need to know whether these meta files are actually used when located in a subpath: as far as I know, they need to live in your project root directory. |
@Ocramius https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
|
And only one of these, or multiple ones? |
From the same page:
So you can have several files, but they probably will have to be in the same directory. |
@Ocramius |
I'd like to respawn this: I've successfully integrated this in sebastianbergmann/phpunit#3708, and it is a net gain for all downstream consumers, with no negative impact (as far as I know). What I'd rather say is that we should keep it minimal: less constants, only cover (very) commonly used API, remove enums. The important bits are certainly |
We're doing some housekeeping on the 3.0.0 milestone. Since nobody seems to be actively working on this topic I'm removing this PR from the 3.0.0 milestone. I you want to pick up the work, please target the ORM's next feature release (currently 2.13.0) instead. |
Supports only few methods:
Parameter enums
Doctrine\ORM\EntityManager::find(X)
Doctrine\ORM\EntityManagerInterface::lock(_,_,X)
Doctrine\ORM\EntityManagerInterface::newHydrator(X)
Doctrine\ORM\AbstractQuery::getResult(X)
Doctrine\ORM\AbstractQuery::execute(X)
Doctrine\ORM\AbstractQuery::setParameter(_,_,X)
Doctrine\ORM\AbstractQuery::setFetchMode(,,X)
Doctrine\ORM\AbstractQuery::setHydrationMode()
Doctrine\ORM\QueryBuilder::getDQLPart(X)
Doctrine\ORM\QueryBuilder::resetDQLPart(X)
Doctrine\ORM\QueryBuilder::setCacheMode(X)
Doctrine\ORM\QueryBuilder::add(X)
Doctrine\ORM\Query::setCacheMode(X)
Return enums
Doctrine\ORM\QueryBuilder::getType()
Doctrine\ORM\QueryBuilder::getCacheMode()
Doctrine\ORM\QueryBuilder::getState()
Doctrine\ORM\Query::getCacheMode()
Doctrine\ORM\AbstractQuery::getHydrationMode()
Return types
Doctrine\Common\Persistence\ObjectManager::find(X)
Doctrine\ORM\EntityManagerInterface::copy(X)
Doctrine\ORM\EntityManagerInterface::getReference(X)
Doctrine\ORM\EntityManagerInterface::getPartialReference(X)
Doctrine\ORM\EntityManagerInterface::merge(X)
Preview