-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Syntax error, unexpected XYZ #8083
Comments
Hi, thanks for reporting. The provided demo link passes well 👍 Could you update it to fail? |
Hello- I removed all the comment lines and the file decreased to 940 lines of code; notwithstanding, the online rector bombed out again stating that I should decrease by 100 lines of code(again!). I got fifty(50) similar errors on my side before rector bombs out on me and probably I will try again the online rector sometime during the weekend. Feel free to close this issue as I do not know what's going on -- as seen in the attached file. Best regards. |
There is a limit of 100 lines max for the demo website, to keep test fixtures low. The origin of bugs is usually 2-3 lines of code and single Rector rule. We're unable to handle the issue without the code causing it, so we have to close this one. |
Upgraded to Rector 0.18.10. Given the fact that Rector does not seem to scale well, I have fed it a few problematic php files, i.e., showstoppers when I run the PHP application: This function here:
from: produces error when the PHP application is run locally, in development machine: I have ran that function through your demo: which leaves the function untouched. Obviously, Rector is not upgrading the PHP 7.4 application code to (at least) PHP 8.0 . P.S. I have inherited (forked) this PHP application from developers who should have fixed the code when it was PHP 7.4 as since then it was showing a warning to that effect. Notwithstanding, PHP 8.0 will not output a warning but will produce a failure, as shown above. |
Bug Report
vendor/bin/rector --version
)Applied ECS coding rules, one by one,
SetList::SPACES,
SetList::ARRAY,
SetList::DOCBLOCK,
SetList::NAMESPACES
SetList::COMMENTS,
SetList::PSR_12,
to essentially PHP App source b2evolution. Subsequently, I used rector to attempt upgrade to PHP 8.0
Minimal PHP Code Causing Issue
https://github.com/b2evolution/b2evolution/blob/master/inc/_ext/phpwhois/whois.eu.php
`require_once('whois.parser.php');
if (!defined('EU_HANDLER')) {
define('EU_HANDLER', 1);
}
class eu_handler
{
public function parse($data, $query)
{
$r = [];
$items = [
'domain.name' => 'Domain:',
'domain.status' => 'Status:',
'domain.nserver' => 'Name servers:',
'domain.created' => 'Registered:',
'domain.registrar' => 'Registrar:',
'tech' => 'Registrar Technical Contacts:',
'owner' => 'Registrant:',
'' => 'Please visit',
];
];
}
`
Nothing is output at:
rector-error-fragment.txt
https://getrector.com/demo/9ae5cd57-4ed0-41cb-927e-f40649217bf7
Expected Behaviour
Upgrade to PHP 8.0 should be smooth.
I am guessing issues are in rector...
The text was updated successfully, but these errors were encountered: