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

Merge 2.5.x into 2.6.x #2519

Closed
wants to merge 11 commits into from
Closed

Merge 2.5.x into 2.6.x #2519

wants to merge 11 commits into from

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Mar 29, 2023

Should've done this before creating new pipeline stages, that would've helped avoid a nasty conflict resolution. Oh well 🤷‍♂️

franmomu and others added 8 commits March 3, 2023 10:28
…ta_providers

Remove occurrences of "$this" in data providers
When calling UnitOfWork::clear() without argument
* Use static data providers

* Update phpunit.xml.dist

Co-authored-by: Claudio Zizza <[email protected]>

---------

Co-authored-by: Claudio Zizza <[email protected]>
* 2.5.x:
  Use static data providers (doctrine#2512)
  Avoid triggering deprecation (doctrine#2511)
  Remove occurrences of "$this" in data providers
  Rename abstract test classes to *TestCase (doctrine#2507)
  Update branch metadata (doctrine#2508)
@alcaeus
Copy link
Member Author

alcaeus commented Mar 30, 2023

Not sure I understand the psalm failures, @franmomu could you please take a look?

@alcaeus alcaeus requested a review from franmomu March 30, 2023 13:47
@franmomu franmomu force-pushed the merge-2.5.x branch 2 times, most recently from d843c1a to 4a62792 Compare March 31, 2023 07:27
@franmomu
Copy link
Contributor

The thing about Builder::getPipeline() is that it returns PipelineExpression

* @psalm-return PipelineExpression

which is list<StageExpression>:

* @psalm-type PipelineExpression = list<StageExpression>

and StageExpression:

* @psalm-type StageExpression = non-empty-array<non-empty-string, mixed>|object

so in Builder::getPipeline()

$pipeline = array_map(
static fn (Stage $stage) => $stage->getExpression(),
$this->stages,
);

$stage->getExpression() should return StageExpression or non-empty-array<non-empty-string, mixed>, if that's the case, in

public function getExpression(): array
{
return $this->query->getQuery();
}

should return a non-empty-array, but Expr::getExpression() returns array<string, mixed>

/** @return array<string, mixed> */
public function getExpression(): array
{
return $this->expr;
}

@franmomu franmomu mentioned this pull request Apr 5, 2023
* Fix return type

* Fix psalm build

These new errors are because a bug in psalm with get_class
see vimeo/psalm#9607, they will be
gone once we use ::class
@alcaeus
Copy link
Member Author

alcaeus commented Apr 11, 2023

Closing in favour of #2527 where I've also fixed the issue above. Thanks for your help @franmomu!

@alcaeus alcaeus closed this Apr 11, 2023
@alcaeus alcaeus deleted the merge-2.5.x branch April 11, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants