Skip to content

[LiveComponent] ignored #[SerializedName(serializedName: 'p')] after 2.28 upgrade #2971

@adri

Description

@adri

After upgrading from 2.27 to 2.28.0, the URL mapping of a LiveComponent DTO using the serializer (useSerializerForHydration) is not taken into account anymore. I downgraded to fix it for now.

Potentially this could be related:

DTO example:

final class Something
{
    public function __construct(
        #[SerializedName(serializedName: 't')]
        public Test $test,
   ) {}
}

Usage:

    #[LiveProp(useSerializerForHydration: true, updateFromParent: true, url: new UrlMapping('e'))]
    public Something $something;

URL that gets updated in the browser (Javascript part).

Before:

/some/url?e%5Bt%5D%5B...

After

/some/url?e%5Btest%5D%5B

The problem is that when these new URLs are sent to someone else or if someone refreshes, no values can be found as the deserializer looks for t but the url has test.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions