Skip to content

[Live-Component] Composer cannot upgrade to 2.x of Twig and Live components #190

@benr77

Description

@benr77

I've just upgraded my app to Symfony 5.4. Immediately I can across an error:

Call to undefined method Symfony\UX\LiveComponent\Attribute\AsLiveComponent::attributeMethodsFor()

I then looked at the versions for symfony/ux-twig-component and symfony/ux-live-component.

Previously my composer version constraints were:

"symfony/ux-live-component": "@dev",
"symfony/ux-twig-component": "@dev",

I have then changes these to be:

"symfony/ux-live-component": "2.*-dev",
"symfony/ux-twig-component": "2.*-dev",

The version 2.x of the Twig component is needed to fix the error I encountered (the missing attributeMethodsFor()). However, composer cannot install these due to the live component 2.x branch still requiring twig-component 1.4 :

  Problem 1
    - Root composer.json requires symfony/ux-live-component 2.*-dev -> satisfiable by symfony/ux-live-component[2.x-dev].
    - symfony/ux-live-component 2.x-dev requires symfony/ux-twig-component ^1.4 -> found symfony/ux-twig-component[dev-main, 1.4.x-dev (alias of dev-main)] but it conflicts with your root composer.json require (2.*-dev).

Is it just that the minimum version of the Twig component needs to be bumped to 2.x ?

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