Skip to content

Serialization is not allowed #8

Open

Description

@syntheticsky

I have problem with file uploading. On save symfony get "Exception: Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed". I do all that written on docs.

Activity

  1. LouTerrailloune commented on Oct 4, 2013

    @LouTerrailloune

    Are you sure your entity is properly tagged ?

    @FileStore\Uploadable for the class itself

    and

    @FileStore\UploadableField(mapping="mapping_name") for the field.

  2. firestorm23 commented on Dec 22, 2015

    @firestorm23

    I've got same issue yesterday. It was bothering me and I had to get deeper in vendor code. I found that sometimes AnnotationDriver class don't correctly parse annotations in entity. I found that PROPERTY annotations was parsed well but CLASS annotation didn't made into loadedAnnotations - the array that doctrine forms when parses entity sources. This bug constantly occurred no matter of what entity I tried to make Uploadable. I tried it with totally new entities with clean CRUD and controllers. This bug mysteriously disappeared when I tried to add my annotations with empty rules. It worked and after that Uploadable annotation started to work again. It least I figured how to fix it, I think this is something to do with class cache or bootstrap cache. Next time I'll catch it I try to figure out what is concrete method to recreate this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions