Skip to content

Document segmentation fault issue in tagged service iterator#21692

Open
homersimpsons wants to merge 1 commit intosymfony:7.3from
homersimpsons:patch-1
Open

Document segmentation fault issue in tagged service iterator#21692
homersimpsons wants to merge 1 commit intosymfony:7.3from
homersimpsons:patch-1

Conversation

@homersimpsons
Copy link
Contributor

Add hint about segmentation fault with iterator_to_array in __construct

This is documenting the non-symfony issue raised in symfony/symfony#48782

Add hint about segmentation fault with iterator_to_array in __construct
@carsonbot carsonbot added this to the 7.3 milestone Jan 8, 2026
@carsonbot carsonbot changed the title Document segmentation fault issue in tagged service iterator Document segmentation fault issue in tagged service iterator Jan 8, 2026
}
}

.. hint::
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this should be a hint, a note or something else.


.. hint::

A Segmentation fault with ``iterator_to_array`` in ``__construct`` happens if you have a dependency cycle.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally wanted to provide guidance on how to resolve the issue. But I cannot find a correct phrasing for that. The options are:

  • lazy service does not work
  • break the dependency cycle. Is there any reference on how to identify / break it? (on my side I did this manually but that may not be easy with some services / projects)
  • use the iterator_to_array in a function rather than in the __construct
  • other?

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.

2 participants