Skip to content

[String] snake() method changes in 7.1.2 breaks symfony/ux-translator #57612

@jmsche

Description

@jmsche

Symfony version(s) affected

7.1.2

Description

After upgrading to Symfony 7.1.2 this morning, Symfony UX Translator won't compile anymore with Webpack.

Here is part of the error:

Syntax Error: Missing initializer in const declaration. (1:39)

> 1 | export const THIS_VALUE_SHOULD_BE_FALSE. = {"id":"This value should be false.","translations":{"validators":{"en":"This value should be false.","fr":"Cette valeur doit \u00eatre fausse.","nl":"Deze waarde moet onwaar zijn."}}};

Downgrading symfony/string to 7.1.1 solves the issue.

How to reproduce

echo (new UnicodeString('This value should be false.'))->snake()->toString();
// symfony/string 7.1.1: this_value_should_be_false
// symfony/string 7.1.2: this_value_should_be_false.

Possible Solution

The bug has been introduced with this PR: #57497
Reverting this solves the issue.

I guess it is a BC break?

Additional Context

No response

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy