This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 8 replies, has 2 voices.

Last updated by Andrés 6 months, 3 weeks ago.

Assigned support staff: Andrés.

Author Posts
March 26, 2019 at 11:15 am #3461841

harroH

I am trying to:
Install/update wpml

Link to a page where the issue can be seen:
n/a

I expected to see:
composer friendly install

Instead, I got:
errors

-----
Because the use of composer's generated vendor directory within the plugin it is conflicting with other packages. Can you provider the composer.json that is used to generate the vendor directory.

March 26, 2019 at 2:42 pm #3463635

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

Hello there,

Welcome to WPML support forum.

I've in contact with our developers about your report, however I would like to have more information about it. Could you please describe me in a detailed way what you are trying to achieve and the conflict this is creating?

Thank you for your help.

Best regards,
Andrés

March 26, 2019 at 3:25 pm #3464153

harroH

Hi Andres,

The vendor directory in the root of the plugin is generated with composer (hidden link). The vendor directory is included in the project which is not a normal procedure outside the wordpress community. Our project is using Twig and WPML is also using Twig. Composer generates the vendor directory using a composer.json file

Can you provide us this file?

March 26, 2019 at 4:23 pm #3464497

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

Thanks for your comments. Unfortunately I can't share this file with you as it has sensitive information. :/

Could you please indicate the error you are getting and the steps needed to generate it?

Regards

March 27, 2019 at 9:37 am #3469105

harroH

The error I get is:

`Cannot declare class Twig_Environment, because the name is already in use in <b>/app/vendor/twig/twig/src/Environment.php</b> on line <b>1001</b><br />`

March 27, 2019 at 9:50 am #3469199

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

Thanks for sharing the error. Could you please tell me when it pops up?
Regards

March 27, 2019 at 10:02 am #3469307

harroH

Every page that is using WPML and Twig.

March 27, 2019 at 12:27 pm #3470947

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

I'm discussing this situation with our devs, but we really need to your help in order to understand the situation. Could you please indicate me how to reproduce it from the scratch?

March 27, 2019 at 2:28 pm #3471967

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

So far, the only thing I can recommend you is not to load an additional Twig library and use ours or bypass ours. We are using “twig/twig”: “~1.32.0” (for PHP comparability purposes) and you may be using a newer one.

Regards