sulu / sulu-rector

Rector for Sulu CMS.
MIT License
14 stars 2 forks source link

XML Template Update #16

Open alexander-schranz opened 1 year ago

alexander-schranz commented 1 year ago

Add possibility to update xml templates. Via some rector processor.

-<controller>Sulu\Bundle\ArticleBundle\Controller\WebsiteArticleController:indexAction</controller>
+<controller>Sulu\Bundle\ArticleBundle\Controller\WebsiteArticleController::indexAction</controller>
sabbelasichon commented 1 year ago

@alexander-schranz I think that can be accomplished with a custom FileProcessor for xml files. Have a look at: https://github.com/sabbelasichon/typo3-rector/blob/main/src/FileProcessor/FlexForms/FlexFormsProcessor.php

alexander-schranz commented 1 year ago

@sabbelasichon thx for the response and your insights how you handle this in Typo3. Looks like this is just a file visitor then?
Do you know if there is there any AST based fileprocessor for yaml, xml already available?

alexander-schranz commented 10 months ago

If I understand rector 0.18 release correctly non PHP Files rectors are not longer supported now: https://getrector.com/blog/rector-018-refocus-on-php. @TomasVotruba deprecated them in https://github.com/rectorphp/rector-src/pull/4761.

Not sure if there will be still a hook where we could upgrade other files or if we need for every file format binary doing the upgrade.

@sabbelasichon what are your plans here with the upgrade path for such files?

sabbelasichon commented 2 months ago

@alexander-schranz I am a bit late in responding. Sorry for that. We are currently developing a new tool to handle changes of non php files (https://github.com/andreaswolf/fractor). It is still under active development but we are expecting to have something ready end of June.