flow-development-collection icon indicating copy to clipboard operation
flow-development-collection copied to clipboard

BUG: Union types in annotations are not handled correctly

Open mficzel opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

Before Neos Flow 8.3.13:

  • Only the first type of a union type with spaces is used in annotations
  • Namespaces in Union Types are not expanded in annotations

Sice Neos Flow 8.3.13:

  • Namespaces in Union Types are not expanded in annotations
  • Union types with spaces are detected as mixed in annotations

Expected Behavior

The union types in annotations should behave the same as in type hints.

Steps To Reproduce

No response

Environment

- Flow: 8.3.13
- PHP: 8+

Anything else?

This is the flow side of the Neos Bug here: https://github.com/neos/neos-development-collection/issues/5448

mficzel avatar Jan 23 '25 13:01 mficzel

+1 This is quite annoying! As even spaces after the type will break the property mapper.

/**
 * @param string $works
 * @param string  $doesntWork
 **/

dlubitz avatar May 15 '25 06:05 dlubitz

This is the PR which introduced this behavior: https://github.com/neos/flow-development-collection/pull/3424

dlubitz avatar May 15 '25 06:05 dlubitz