We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Seems that psalm does not support locking arguments in code:
<?php namespace App\Helper; use App\Entity\Reseller; use Decimal\Decimal; use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityManagerInterface; class ResellerHelper { public function __construct( private readonly EntityManagerInterface $entityManager, ) { } public function addCredit(int $resellerId, int $amount): void { try { $this->entityManager->getConnection()->beginTransaction(); // suspend auto-commit try { $reseller = $this->entityManager->find(Reseller::class, $resellerId, LockMode::PESSIMISTIC_WRITE);
getting:
TooManyArguments: Too many arguments for method Doctrine\Persistence\ObjectManager::find - saw 3 (see https://psalm.dev/026)
However the code is totally valid as can be seen from the docs
The text was updated successfully, but these errors were encountered:
@michnovka thanks for the report but the issue is not related to this plugin. Make sure psalm-doctrine-plugin is up-to-date https://github.com/psalm/psalm-plugin-doctrine/blob/2.x/stubs/EntityManagerInterface.phpstub
Sorry, something went wrong.
No branches or pull requests
Seems that psalm does not support locking arguments in code:
getting:
However the code is totally valid as can be seen from the docs
The text was updated successfully, but these errors were encountered: