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

Fix incorrect Annotation::fetchAll() return structure for single Examples attribute #6752

Open
wants to merge 2 commits into
base: 5.1
Choose a base branch
from

Conversation

xEdelweiss
Copy link

I had an issue similar to #6726, caused by how Annotation::fetchAll() handles the single #[Examples] attribute.

Here are comparison of fetchAll() return structures:

# Multiple Example attributes:
array (
  0 => array (
    0 => 'example 1',
  ),
  1 => array (
    0 => 'example 2',
  ),
)

# ❌ Single Example attribute (actual):
array (
  0 => 'example 1', 
)

# ✔️ Single Example attribute (expected):
array (
  0 => array (
    0 => 'example 1',
  ),
)

This PR includes a fix and unit-tests update for this issue. It also has a test for the #[Given] attribute to show that the changes do not break it.

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.

None yet

1 participant