Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing "lines" in a symfony project results in 'Attempted to load class "UnicodeString" from namespace' error #34

Open
c33s opened this issue Aug 22, 2023 · 3 comments

Comments

@c33s
Copy link

c33s commented Aug 22, 2023

as "lines" replaces symfony/string

....
    "replace": {
        "symfony/string": "*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-intl-grapheme": "*",
        "symfony/polyfill-mbstring": "*"
    },
...

but does not provide a real replacement, it results in an error if installed in a symfony project

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!
!!
!!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#4401
!!    #message: """
!!      Attempted to load class "UnicodeString" from namespace "Symfony\Component\String".\n
!!      Did you forget a "use" statement for another namespace?
!!      """
!!    #code: 0
!!    #file: "vendor\symfony\console\Helper\Helper.php"
!!    #line: 51
!!    trace: {
!!      vendor\symfony\console\Helper\Helper.php:51 { …}
!!      vendor\symfony\console\Application.php:874 { …}
!!      vendor\symfony\console\Application.php:845 { …}
!!      vendor\symfony\http-kernel\EventListener\DebugHandlersListener.php:83 { …}
!!      vendor\symfony\error-handler\ErrorHandler.php:537 { …}
!!      Symfony\Component\ErrorHandler\ErrorHandler->handleException() {}
!!    }
!!  }
!!
Script @auto-scripts was called via post-update-cmd
@TomasVotruba
Copy link
Owner

Thanks for reporting 👍

Could you try the 0.4.1.72 version? If that helps, I'll keep only the downgraded tagging

@c33s
Copy link
Author

c33s commented Aug 22, 2023

i can confirm version 0.4.1.72 works with symfony/skeleton

composer create-project symfony/skeleton:"6.3.*" my_project_directory

because if forgot to mention before: replacing polyfill-ctype also was a problem on dev-main.

  Problem 1
    - __root__ is present at version 1.0.0+no-version-set and cannot be modified by Composer
    - tomasvotruba/lines[dev-main] cannot be installed as that would require removing __root__[1.0.0+no-version-set]. They both replace symfony/polyfill-ctype and thus cannot coexist.
    - Root composer.json requires tomasvotruba/lines dev-main -> satisfiable by tomasvotruba/lines[dev-main].

@TomasVotruba
Copy link
Owner

I've just released 0.5 version that is downgraded without any weird suffix. Could you try it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants