Skip to content

Conversation

@sstok
Copy link
Member

@sstok sstok commented May 19, 2025

Q A
Bug fix? no
New feature? yes
BC breaks? yes/no
Deprecations? yes
Tickets Fix #326
License MIT

Todo:

  • Update upgrade instructions
  • Test in real application

protected static function newClient(array $options = [], array $server = []): KernelBrowser
{
// XXX Do we really need to boot the kernel multiple times?
static::$booted = false;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed as the tests were failing, and needs a separate pr.

@sstok sstok force-pushed the feature/doctrine-orm-3.0 branch from 1ffa430 to 28b47b3 Compare May 22, 2025 19:59
@sstok
Copy link
Member Author

sstok commented May 22, 2025

I can't fix the Elastica failures for the ApiPlatform at this moment.


Some predictions failed:
Double\Doctrine\ORM\QueryBuilder\P4:
  No calls have been made that match:
      Double\Doctrine\ORM\QueryBuilder\P4->setParameter(exact("ids"), exact([3, 1, 5]))
    but expected at least one.
    Recorded `setParameter(...)` calls:
      - setParameter("ids", []) @ lib/ApiPlatform/Elasticsearch/Extension/SearchExtension.php:149
  No calls have been made that match:
      Double\Doctrine\ORM\QueryBuilder\P4->setParameter(exact("id0"), exact(3))
    but expected at least one.
    Recorded `setParameter(...)` calls:
      - setParameter("ids", []) @ lib/ApiPlatform/Elasticsearch/Extension/SearchExtension.php:149
  No calls have been made that match:
      Double\Doctrine\ORM\QueryBuilder\P4->setParameter(exact("id1"), exact(1))
    but expected at least one.
    Recorded `setParameter(...)` calls:
      - setParameter("ids", []) @ lib/ApiPlatform/Elasticsearch/Extension/SearchExtension.php:149
  No calls have been made that match:
      Double\Doctrine\ORM\QueryBuilder\P4->setParameter(exact("id2"), exact(5))
    but expected at least one.
    Recorded `setParameter(...)` calls:
      - setParameter("ids", []) @ lib/ApiPlatform/Elasticsearch/Extension/SearchExtension.php:149
  No calls have been made that match:
      Double\Doctrine\ORM\QueryBuilder\P4->orderBy(exact("order_by"), exact("ASC"))
    but expected at least one.
Double\Elastica\Client\P8:
  No calls expected that match:
      Double\Elastica\Client\P8->request(* [, ...])
    but 1 was made:
      - request("/_search", "POST", ["query" => ["bool" => ["must" => "foo"]], "from" => 1], []) @ vendor/ruflin/elastica/src/Search.php:352
  No calls have been made that match:
      Double\Elastica\Client\P8->request(exact("/_search"), [POST, GET], exact(["query" => ["bool" => ["must" => "foo"]]]), exact([]))
    but expected at least one.
    Recorded `request(...)` calls:
      - request("/_search", "POST", ["query" => ["bool" => ["must" => "foo"]], "from" => 1], []) @ vendor/ruflin/elastica/src/Search.php:352

@sstok
Copy link
Member Author

sstok commented May 23, 2025

Ah bingo, QueryBuilder::getFirstResult() no longer returns null, but must return an integer. And because of this setFrom() is called internally, which is different then the expected query.

@sstok sstok force-pushed the feature/doctrine-orm-3.0 branch 2 times, most recently from 8cc3727 to 6472ae9 Compare May 23, 2025 07:56
@sstok sstok force-pushed the feature/doctrine-orm-3.0 branch from 6472ae9 to bc4988c Compare May 23, 2025 07:59
@sstok sstok merged commit e213cf1 into rollerworks:main May 23, 2025
6 checks passed
@sstok sstok deleted the feature/doctrine-orm-3.0 branch May 23, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Orm] support for doctrine/orm v3.0 is planned for stable v2.0 ?

1 participant