Extend Drupal\fluent\Collection to Support whereInstanceOf Method

Created on 22 October 2023, 8 months ago
Updated 16 January 2024, 6 months ago

Integrate the whereInstanceOf method into the Drupal\fluent\Collection class.
Interface correctly with ContentEntityInterface instances.
Implement tests to validate its behavior with collections of paragraphs or nodes.

πŸ“Œ Task
Status

Active

Version

10.1

Component

Code

Created by

πŸ‡²πŸ‡½Mexico dmouse Mexico City

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dmouse
  • πŸ‡²πŸ‡½Mexico dmouse Mexico City
  • First commit to issue fork.
  • πŸ‡¦πŸ‡·Argentina tguerineau

    Hi,

    I've been working on the issue described here and have made progress in implementing the feature. Below is a brief overview of the changes and updates made:

    1. Implementation Details: whereInstanceOf method added in the src/Collection.php file.

    2. Manual testing that I made (using Devel module):

    • Conducted tests with collections of nodes, ensuring that the method works as expected, particularly for fields within nodes.
    • Verified the functionality with non-entity items to ensure broad applicability.
    • Tests included various scenarios, including fields with simple values and more complex structures like paragraphs.
    • All tests indicate that the method behaves correctly.

    3. Automated Tests: Unfortunately, I am currently facing issues with my test environment, which has prevented me from creating automated tests for these changes.

    4. Merge Request: I have created a Merge Request (MR) with the code for the implemented method.

    Thank you for considering these updates, and I look forward to your feedback.

Production build 0.69.0 2024