Skip to content

BUG: Union types in annotations are not handled correctly #3440

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

Open
1 task done
mficzel opened this issue Jan 23, 2025 · 2 comments
Open
1 task done

BUG: Union types in annotations are not handled correctly #3440

mficzel opened this issue Jan 23, 2025 · 2 comments
Labels

Comments

@mficzel
Copy link
Member

mficzel commented Jan 23, 2025

Is there an existing issue for this?

  • 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: neos/neos-development-collection#5448

@dlubitz
Copy link
Contributor

dlubitz commented May 15, 2025

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

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

@dlubitz
Copy link
Contributor

dlubitz commented May 15, 2025

This is the PR which introduced this behavior: #3424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants