Skip to content

Error with composer install --optimize-autoloader #117

@chosroes

Description

@chosroes

As reported here : FriendsOfSymfony/FOSRestBundle#1637

When I try to clear/warm cache on production after composer install --optimize-autoloader I get this error :

Type error: Argument 1 passed to FOS\RestBundle\Request\ParamReader::getParamsFromAnnotationArray() must be of the type
array, null given, called in /var/www/infoflora/symfony/vendor/friendsofsymfony/rest-bundle/Request/ParamReader.php on
line 60

The problem come with annotations like that :

@QueryParam(map=true, name="sort", requirements=@sort, allowBlank=false, default={Sort::DEFAULT_FIELD : Sort::DEFAULT_ORDER})

But everything is OK when I do not use the optimize option. Or when I use the full namespace in the annotation despite the use in the top of the class...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions