Skip to content
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

Fix type hint on OrderBy attribute #11780

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Mapping/OrderBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Collections\Order;

/**
* @Annotation
Expand All @@ -16,13 +17,13 @@
final class OrderBy implements MappingAttribute
{
/**
* @var array<string>
* @var array<string, string|Order>
* @readonly
*/
public $value;

Check failure on line 23 in src/Mapping/OrderBy.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (default, 2.5)

Property Doctrine\ORM\Mapping\OrderBy::$value has unknown class Doctrine\Common\Collections\Order as its type.

/** @param array<string> $value */
/** @param array<string, string|Order> $value */
public function __construct(array $value)

Check failure on line 26 in src/Mapping/OrderBy.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (default, 2.5)

Parameter $value of method Doctrine\ORM\Mapping\OrderBy::__construct() has invalid type Doctrine\Common\Collections\Order.
{
$this->value = $value;
}
Expand Down
Loading