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

chore(deps): update dependency nextras/orm-phpstan to v2 #712

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"nette/tester": "~2.5",
"mockery/mockery": ">=1.5.1",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "1.12.12",
"phpstan/phpstan-deprecation-rules": "1.2.1",
"phpstan/phpstan-nette": "1.3.8",
"phpstan/phpstan-mockery": "1.1.3",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpstan/phpstan": "2.0.4",
"phpstan/phpstan-deprecation-rules": "2.0.1",
"phpstan/phpstan-nette": "2.0.1",
"phpstan/phpstan-mockery": "2.0.0",
"phpstan/phpstan-strict-rules": "2.0.1",
"nextras/multi-query-parser": "~1.0",
"nextras/orm-phpstan": "^1.0.1",
"nextras/orm-phpstan": "^2.0.0",
"tracy/tracy": "~2.3"
},
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions tests/cases/unit/Collection/ArrayCollectionTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class ArrayCollectionTest extends TestCase
$this->e(Book::class, ['title' => 'd', 'printedAt' => new DateTime('2017-01-01 10:00:00')]),
];

/** @var Book[]|ArrayCollection<Book> */
/** @var ArrayCollection<Book> */
$collection = new ArrayCollection($books, $this->orm->books);
$collection = $collection->orderBy('printedAt', ICollection::DESC_NULLS_LAST);

Expand Down Expand Up @@ -208,7 +208,7 @@ class ArrayCollectionTest extends TestCase


/**
* @return array{ICollection<Author>|Author[], Author[], Book[]}
* @return array{ICollection<Author>, Author[], Book[]}
*/
private function createCollection(): array
{
Expand All @@ -225,7 +225,7 @@ class ArrayCollectionTest extends TestCase
$this->e(Book::class, ['title' => 'Valyria 3', 'author' => $authors[2]]),
];

/** @var ICollection<Author>|Author[] $collection */
/** @var ICollection<Author> $collection */
$collection = new ArrayCollection($authors, $this->orm->authors);
return [$collection, $authors, $books];
}
Expand Down
7 changes: 6 additions & 1 deletion tests/cases/unit/Entity/AbstractEntity.is_modified.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ use Tester\Assert;
require_once __DIR__ . '/../../../bootstrap.php';


/**
* @property int $id {primary}
* @property string $name
* @property int $age
*/
class DataEntityFragmentIsModifiedTest extends AbstractEntity
{
public function __construct(EntityMetadata $metadata)
Expand Down Expand Up @@ -88,7 +93,7 @@ class AbstractEntityIsModifiedTest extends TestCase
Assert::false($entity->isModified());
Assert::false($entity->isModified('age'));

$entity->setValue('age', 20);
$entity->setValue('age', 20); // @phpstan-ignore nextrasOrm.propertyNotFound

Assert::true($entity->isModified());
Assert::true($entity->isModified('age'));
Expand Down
3 changes: 1 addition & 2 deletions tests/inc/model/book/BooksMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
*/
final class BooksMapper extends DbalMapper
{
/** @return Book[]|ICollection<Book> */
/** @return ICollection<Book> */
public function findBooksWithEvenId(): ICollection
{
return $this->toCollection($this->builder()->where('id % 2 = 0'));
}


/** @return Book|null */
public function findFirstBook(): ?Book
{
return $this->toEntity($this->builder()->where('id = 1'));
Expand Down
2 changes: 1 addition & 1 deletion tests/inc/model/timeSeries/TimeSeriesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


/**
* @extends Repository<Log>
* @extends Repository<TimeSeries>
*/
final class TimeSeriesRepository extends Repository
{
Expand Down
Loading