Skip to content
New issue

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

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

Already on GitHub? # to your account

Add addXmlDeclaration parameter #216

Merged
merged 2 commits into from
May 11, 2023
Merged

Add addXmlDeclaration parameter #216

merged 2 commits into from
May 11, 2023

Conversation

silnex
Copy link
Contributor

@silnex silnex commented May 11, 2023

Improve usability of the addXmlDeclaration parameter 😄

before

<?php
$xml = (new ArrayToXml($arr))->dropXmlDeclaration()->toXml();

after

<?php
$xml = ArrayToXml::convert($arr, addXmlDeclaration: false);

@freekmurze freekmurze merged commit e210b98 into spatie:main May 11, 2023
@freekmurze
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants