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

Error: String could not be parsed as XML #17

Closed
knallcharge opened this issue Jun 30, 2021 · 2 comments
Closed

Error: String could not be parsed as XML #17

knallcharge opened this issue Jun 30, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@knallcharge
Copy link

knallcharge commented Jun 30, 2021

The same deprecation error as in j-guyon's bundle happens here. See:
j-guyon#199

This has happened before (see j-guyon#179) which could be fixed with an entry in services.yml.

I wonder why it makes a difference to execute "command list --format=xml" through the CommandParser or via the shell (where the error doesn't show).

Using your version 3 with PHP 7.4.20 and symfony 5.3.3

@Chris53897 Chris53897 self-assigned this Jul 21, 2021
@Chris53897 Chris53897 added the bug Something isn't working label Jul 28, 2021
@Chris53897
Copy link
Collaborator

Hi. Thank you for reporting this issue. I do not know a solution yet. The problem is that a) the last minute changes of 5.3 produce a lot of deprecation warnings and b) that the deprecation messages and warning are displayed in the stream in the way it is actual used.

The ConsoleOutput differs between StandardOutput and ErrorOutput. But i got an BufferOverflow Error while i try to change the code from StreamOutput.

One solution could be to rewrite the code and use the same code symfony uses while running the command "list ....".
At the moment i am searching for an solution to disable/seperate the ErrotOutput.

@knallcharge
Copy link
Author

knallcharge commented Aug 4, 2021

I played around with the code a bit and found a workaround. Adding
Debug::enable(E_RECOVERABLE_ERROR & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED, false);
before the list-command is run in CommandParser.php (branch 3.x), will suppress the deprecation-warnings in the XML-output and get things working again.
I have created a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants