nikosdion / joomla_com_upgrader Goto Github PK
View Code? Open in Web Editor NEWRector rules to easily upgrade Joomla 3 components to Joomla 4 MVC
License: GNU General Public License v2.0
Rector rules to easily upgrade Joomla 3 components to Joomla 4 MVC
License: GNU General Public License v2.0
Hi Nicholas,
thank you very much for this great contribution!!!
I am testing it and I have one suggestion for the composer.json update and one issue I found in a couple of components.
For the composer.json suggestion, after adding your settings and executing composer update --dev, composer complaint about minimum stability, so I had to add the following line to my settings:
"minimum-stability": "dev",
After that, everything was correctly installed, and I could execute the PHP command (after creating the rector.php file).
When executing, I got a couple of PHP exceptions:
PHP Fatal error: Uncaught Error: Call to undefined method Rector\Naming\Rector\FileWithoutNamespace\JoomlaLegacyMVCToJ4Rector::getFile() in ./vendor/nikosdion/joomla_com_upgrader/rules/Naming/Rector/FileWithoutNamespace/JoomlaNamespaceHandlingTrait.php:69
And also:
./vendor/nikosdion/joomla_com_upgrader/rules/Naming/Rector/FileWithoutNamespace/JoomlaNamespaceHandlingTrait.php(153): Rector\Naming\Rector\FileWithoutNamespace\JoomlaLegacyMVCToJ4Rector->getApplicationSide()
Not sure whether these have to do with my configuration or they are generic issues.
Thank you very much again!! This is a great tool that will help lots of developers to update their extensions.
Hi Nicholas
I've tried using com_upgrader on both windows and linux and get the same error, i've also tried both php7.4 and 8.1
I run composer update --dev and it goes through
then
/opt/remi/php74/root/bin/php ./vendor/bin/rector --dry-run --clear-cache
which results in
PHP Fatal error: Uncaught Error: Class 'RectorPrefix202208\Webmozart\Assert\Assert' not found in /home/lscouk/public_html/marktest/vendor/nikosdion/joomla_com_upgrader/rules/Naming/Rector/FileWithoutNamespace/JoomlaLegacyMVCToJ4Rector.php:102
I tried updating composer.json to add
"webmozart/assert" : "*",
in require-dev which does download it to vendor but still get the same error.
I'm probably doing something wrong in the configuration but if not thought I'd raise an issue just in case.
Thanks
Mark
Hi, testing now, get problems in Symfony library:
212/1075 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░] 19%PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in phar:///opt/lampp/htdocs/rector/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:440
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.