[PR #555] [CLOSED] Failing test case for iterable ObjectHydrator #8365

Open
opened 2026-01-22 15:59:34 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/555
Author: @everzet
Created: 1/25/2013
Status: Closed

Base: masterHead: bug/object-scalar-iteration


📝 Commits (1)

  • 0fc5aba Add failing test case for iterable ObjectHydrator

📊 Changes

1 file changed (+40 additions, -0 deletions)

View changed files

📝 tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php (+40 -0)

📄 Description

Here's the deal, whether you're using ObjectHydrator::iterate() on query with scalars, on each consequent iteration scalars go into advanced subarray. In terms of failing test case, we're getting:

- iteration #1
  array(1) {
    [0]=> array(2) {
      ["id"]=> string(1) "1"
      ["name"]=> string(6) "romanb"
    }
  }
- iteration #2
  array(1) {
    [1]=> array(2) {
      ["id"]=> string(1) "2"
      ["name"]=> string(5) "jwage"
    }
  }
- iteration #3
  array(1) {
    [2]=> array(2) {
      ["id"]=> string(1) "3"
      ["name"]=> string(7) "everzet"
    }
  }

Where in reality we expect:

- iteration #1
  array(1) {
    [0]=> array(2) {
      ["id"]=> string(1) "1"
      ["name"]=> string(6) "romanb"
    }
  }
- iteration #2
  array(1) {
    [0]=> array(2) {
      ["id"]=> string(1) "2"
      ["name"]=> string(5) "jwage"
    }
  }
- iteration #3
  array(1) {
    [0]=> array(2) {
      ["id"]=> string(1) "3"
      ["name"]=> string(7) "everzet"
    }
  }

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/555 **Author:** [@everzet](https://github.com/everzet) **Created:** 1/25/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `bug/object-scalar-iteration` --- ### 📝 Commits (1) - [`0fc5aba`](https://github.com/doctrine/orm/commit/0fc5aba70428ed7038339b3184b41f08a073c389) Add failing test case for iterable ObjectHydrator ### 📊 Changes **1 file changed** (+40 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php` (+40 -0) </details> ### 📄 Description Here's the deal, whether you're using `ObjectHydrator::iterate()` on query with scalars, on each consequent iteration scalars go into advanced subarray. In terms of failing test case, we're getting: ``` - iteration #1 array(1) { [0]=> array(2) { ["id"]=> string(1) "1" ["name"]=> string(6) "romanb" } } - iteration #2 array(1) { [1]=> array(2) { ["id"]=> string(1) "2" ["name"]=> string(5) "jwage" } } - iteration #3 array(1) { [2]=> array(2) { ["id"]=> string(1) "3" ["name"]=> string(7) "everzet" } } ``` Where in reality we expect: ``` - iteration #1 array(1) { [0]=> array(2) { ["id"]=> string(1) "1" ["name"]=> string(6) "romanb" } } - iteration #2 array(1) { [0]=> array(2) { ["id"]=> string(1) "2" ["name"]=> string(5) "jwage" } } - iteration #3 array(1) { [0]=> array(2) { ["id"]=> string(1) "3" ["name"]=> string(7) "everzet" } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:59:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8365