Skip to content
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

PHP Fatal error: Uncaught Error: Typed static property RectorPrefix202312 #8351

Closed
sanscript opened this issue Dec 12, 2023 · 2 comments
Closed
Labels

Comments

@sanscript
Copy link

PS C:\xampp\htdocs\rector-project> vendor/bin/rector process --dry-run --debug
PHP Fatal error: Uncaught Error: Typed static property RectorPrefix202312\Composer\XdebugHandler\XdebugHandler::$xdebugActive must not be accessed before initialization in C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php:497
Stack trace:
#0 C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php(65): RectorPrefix202312\Composer\XdebugHandler\XdebugHandler::setXdebugDetails()
#1 C:\xampp\htdocs\crm\vendor\rector\rector\src\Console\ConsoleApplication.php(40): RectorPrefix202312\Composer\XdebugHandler\XdebugHandler->__construct('rector')
#2 C:\xampp\htdocs\crm\vendor\rector\rector\vendor\symfony\console\Application.php(216): Rector\Core\Console\ConsoleApplication->doRun(Object(RectorPrefix202312\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))
#3 C:\xampp\htdocs\crm\vendor\rector\rector\bin\rector.php(129): RectorPrefix202312\Symfony\Component\Console\Application->run()
#4 C:\xampp\htdocs\crm\vendor\rector\rector\bin\rector(5): require_once('C:\xampp\htdocs...')
#5 C:\xampp\htdocs\crm\vendor\bin\rector(119): include('C:\xampp\htdocs...')
#6 {main}
thrown in C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php on line 497
Fatal error: Uncaught Error: Typed static property RectorPrefix202312\Composer\XdebugHandler\XdebugHandler::$xdebugActive must not be accessed before initialization in C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php:497
Stack trace:
#0 C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php(65): RectorPrefix202312\Composer\XdebugHandler\XdebugHandler::setXdebugDetails()
#1 C:\xampp\htdocs\crm\vendor\rector\rector\src\Console\ConsoleApplication.php(40): RectorPrefix202312\Composer\XdebugHandler\XdebugHandler->__construct('rector')
#2 C:\xampp\htdocs\crm\vendor\rector\rector\vendor\symfony\console\Application.php(216): Rector\Core\Console\ConsoleApplication->doRun(Object(RectorPrefix202312\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))
#3 C:\xampp\htdocs\crm\vendor\rector\rector\bin\rector.php(129): RectorPrefix202312\Symfony\Component\Console\Application->run()
#4 C:\xampp\htdocs\crm\vendor\rector\rector\bin\rector(5): require_once('C:\xampp\htdocs...')
#5 C:\xampp\htdocs\crm\vendor\bin\rector(119): include('C:\xampp\htdocs...')
#6 {main}
thrown in C:\xampp\htdocs\crm\vendor\rector\rector\vendor\composer\xdebug-handler\src\XdebugHandler.php on line 497

@sanscript sanscript added the bug label Dec 12, 2023
@samsonasik
Copy link
Member

maybe duplicate xdebug issue #8060

@sanscript
Copy link
Author

Yes correct. it's the same issue.

The problem has been solved by adding this to the first line in the rector.php file. $_SERVER['argv'][] = '--xdebug';

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

No branches or pull requests

2 participants