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

BUG: @param annotation parsing fails due to additional spaces after data type - Could not convert target type "mixed"

Open gafnex opened this issue 10 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

No exception. Normal page rendering.

Expected Behavior

Could not convert target type "mixed": Could not find a suitable type converter for "mixed" because the class / interface "mixed" does not exist.
Exception Code	1297759968
Exception Type	Neos\Flow\Property\Exception
Log Reference	20250426202428637e1c
Thrown in File	Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Property_PropertyMapper.php
Line	129
Original File	Packages/Framework/Neos.Flow/Classes/Property/PropertyMapper.php

Nested Exception
Could not find a suitable type converter for "mixed" because the class / interface "mixed" does not exist.
Exception Code	1297948764
Exception Type	Neos\Flow\Property\Exception\InvalidTargetException
Log Reference	20250426202428b44eab
Thrown in File	Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Property_PropertyMapper.php
Line	273
Original File	Packages/Framework/Neos.Flow/Classes/Property/PropertyMapper.php

Steps To Reproduce

Controller with annotation that contains additional spaces after the data type.

use Neos\Flow\Mvc\Controller\ActionController;

class StandardController extends ActionController
{
    /**
     * @param string  $val
     * @return void
     */
    public function indexAction($val)
    {
    }
}

Request the controller action including the argument.

Environment

- Flow: 8.3.13
- PHP: 8.3

Anything else?

There is no issue with Flow 8.3.12. 8.3.14 has the same issue.

It's probably because of this change: https://github.com/neos/flow-development-collection/commit/fd1ddfb4f7f08ff0dcd5484651d74a94a1e1393e The explode() may return empty strings due to the additional spaces, which makes index 1 not necessarily the variable name.

gafnex avatar Apr 26 '25 18:04 gafnex

If I'm correct, this is a duplicate of #3440

dlubitz avatar Apr 26 '25 18:04 dlubitz