gromnan / symfony-config-xml-to-php
Convert Symfony config files from XML to PHP
Installs: 111
Dependents: 0
Suggesters: 0
Security: 0
Stars: 29
Watchers: 4
Forks: 8
Open Issues: 6
pkg:composer/gromnan/symfony-config-xml-to-php
Requires
- php: >= 8.2
- ext-dom: *
- sebastian/diff: ^6.0 || ^7.0
- symfony/config: 7.4.*
- symfony/console: 7.4.*
- symfony/dependency-injection: 7.4.*
- symfony/expression-language: 7.4.*
- symfony/finder: 7.4.*
Requires (Dev)
- phpunit/phpunit: ^11.5 || ^12.5 || ^13.0@dev
README
XML configuration format is removed from Symfony 8.0. Bundles must convert their XML config files to PHP.
⚠️ This script is a best-effort tool and does not guarantee a perfect conversion. Manual review and adjustments may be necessary.
Installation
The best way to use this tool is as a standalone project in a separate directory.
mkdir xml-to-php-converter
cd xml-to-php-converter
composer init --type=project --require='gromnan/symfony-config-xml-to-php:*' --no-interaction
composer install
Usage
Run the script for a directory:
vendor/bin/convert ../src/Symfony/Bundle/Resources/config/
Or for a single file:
vendor/bin/convert ../src/Symfony/Bundle/Resources/config/services.xml
Contributing
Feel free to open issues or submit pull requests for improvements or bug fixes.
License
MIT License. See the LICENSE file for details.