Navigation Menu

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

Unrecognized option "xml" under "jms_serializer.visitors" #698

Closed
matias-pg opened this issue Nov 18, 2018 · 17 comments
Closed

Unrecognized option "xml" under "jms_serializer.visitors" #698

matias-pg opened this issue Nov 18, 2018 · 17 comments
Assignees

Comments

@matias-pg
Copy link

Hi,

I just created a Symfony Skeleton project and when I installed JMSSerializerBundle it gives me the error Unrecognized option "xml" under "jms_serializer.visitors".

I ran the following commands:

  • composer create-project symfony/skeleton test
  • cd test
  • composer require jms/serializer-bundle -> Here is the error

I tried then installing the Symfony serializer first but that way the error is thrown too.

@goetas
Copy link
Collaborator

goetas commented Nov 19, 2018

This is a issue of the jms recipe for symfony flex

@goetas goetas self-assigned this Nov 19, 2018
@puissanceweb
Copy link

on wamp with php 7.24 / and unders versions
same issue with website-skeleton (SF4) means all defaults bundle
composer create-project symfony/website-skeleton mysite
cd mysite
composer require jms/serializer-bundle

Error
Unrecognized option "xml" under "jms_serializer.visitors"

@ahmadmayahi
Copy link

ahmadmayahi commented Nov 22, 2018

Same issue here, any suggestions?
screenshot 2018-11-22 at 08 48 59

@goetas
Copy link
Collaborator

goetas commented Nov 22, 2018

Here a PR to fix it symfony/recipes-contrib#559

@goetas
Copy link
Collaborator

goetas commented Nov 26, 2018

symfony/recipes-contrib#559 was merged

@goetas goetas closed this as completed Nov 26, 2018
@PurushothamanKrishnamoorthy

Hi @goetas ,

Issue is still reproducible in Symfony version 4.2, which has been recently released.
Error log:

Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ArrayNode.php line 331:
!!
!! Unrecognized option "xml_serialization" under "jms_serializer.visitors". Av
!! ailable options are "json", "xml".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

@goetas
Copy link
Collaborator

goetas commented Dec 10, 2018

Can you post the contents of your jms_serializer.yml file?

@PurushothamanKrishnamoorthy

@goetas Thanks for quick reply.

Please find https://pastebin.com/d02Kh7cc

While updating/installing composer, manifest.json was not available

@goetas
Copy link
Collaborator

goetas commented Dec 10, 2018

Which version of the jms serializer bundle do you have installed?

@PurushothamanKrishnamoorthy

Jms/serializer-bundle": "^3.0
Symofny version 4.2
PHP version 7.2

@goetas goetas reopened this Dec 10, 2018
@goetas
Copy link
Collaborator

goetas commented Dec 12, 2018

@PurushothamanKrishnamoorthy the error you are reporting is different from the initial one in this issue.
From the error message, it look that you are using v3.x configs with a v2.x bundle

@goetas
Copy link
Collaborator

goetas commented Dec 12, 2018

@matias-pizarro is your issue solved?

@PurushothamanKrishnamoorthy

@goetas I have tried to install to jms/serializer-bundle 3.0 in symfony 4.1 but I'm still getting the same error. I have used below command to install jms_serializer . Issues happens only with 3.0 and it works fine for version 2.4
composer require jms/serializer-bundle

it look that you are using v3.x configs with a v2.x bundle -

I have used fresh install jms serializer bundle of version 3.0. Could you please let me know, what I'm doing wrong here.

@goetas
Copy link
Collaborator

goetas commented Dec 12, 2018

can you run composer info and post the output?

@PurushothamanKrishnamoorthy

composer info: https://pastebin.com/FAnRysmx
composer json snippet:
"require": { "php": "^7.1.3", "ext-ctype": "*", "ext-iconv": "*", "friendsofsymfony/rest-bundle": "^2.4", "jms/serializer-bundle": "^3.0", "symfony/console": "^4.1", "symfony/flex": "^1.0", "symfony/framework-bundle": "^4.1", "symfony/lts": "^4@dev", "symfony/yaml": "^4.1" },

@PurushothamanKrishnamoorthy

@goetas any updates for the issue.

@goetas
Copy link
Collaborator

goetas commented Dec 14, 2018

@PurushothamanKrishnamoorthy

Running on php 7.2

composer create-project symfony/skeleton test
cd test
composer require jms/serializer-bundle
bin/console cache:clear

No errors.

If you have a different issue, please open a new ticket and explain how to reproduce it

@goetas goetas closed this as completed Dec 14, 2018
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

5 participants