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

Error when run bin/magento setup:di:compile #107

Closed
flaviub opened this issue Oct 20, 2022 · 4 comments
Closed

Error when run bin/magento setup:di:compile #107

flaviub opened this issue Oct 20, 2022 · 4 comments
Labels
invalid This doesn't seem right wontfix This will not be worked on

Comments

@flaviub
Copy link

flaviub commented Oct 20, 2022

Hello,

When we run this command bin/magento setup:di:compile we have this errors, can you help us?

php bin/magento setup:di:compile

Compilation was started.
Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 76.0 MiBsyntax error, unexpected token "(", expecting variable#0 /home/antares/public_html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#2 /home/antares/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#3 /home/antares/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#4 /home/antares/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#5 /home/antares/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()
#6 /home/antares/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#7 /home/antares/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process()
#8 /home/antares/public_html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute()
#9 /home/antares/public_html/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#10 /home/antares/public_html/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#11 /home/antares/public_html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#12 /home/antares/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#13 /home/antares/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#14 {main}

@magenx
Copy link
Owner

magenx commented Oct 20, 2022

hi
you have typo in your code:
syntax error, unexpected token "(", expecting variable

@flaviub
Copy link
Author

flaviub commented Oct 20, 2022

Ok, can you tell me how can I find where is the problem?

In this file /public_html/vendor/composer/ClassLoader.php on line 428 we have this:

includeFile($file);

This is a part of this function:

public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);

        return true;
    }

    return null;
}

@corpsysgit
Copy link

try:

composer dump-autoload

and then:

composer update
bin/magento setup:upgrade
bin/magento setup:di:compile

@magenx
Copy link
Owner

magenx commented Dec 10, 2022

there must be path to file in traces
Composer\Autoload\includeFile() -> .....
but i dont see it

try to run command with debug options like:
php -d display_errors=1 bin/magento setup:di:compile -vvv

@magenx magenx added invalid This doesn't seem right wontfix This will not be worked on labels Dec 12, 2022
@magenx magenx closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants