Giter VIP home page Giter VIP logo

Comments (5)

Ocramius avatar Ocramius commented on June 19, 2024

Can you try running with -vvv?

from composerrequirechecker.

soullivaneuh avatar soullivaneuh commented on June 19, 2024

Of course, but you have nothing more:

$ ./docker-console composer-require-checker -vvv
ComposerRequireChecker 0.2.0

In ParserAbstract.php line 293:
                                               
  [PhpParser\Error]                            
  Syntax error, unexpected T_STRING on line 1  
                                               

Exception trace:
 PhpParser\ParserAbstract->parse() at phar:///usr/bin/composer-require-checker/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php:50
 PhpParser\Parser\Multiple->tryParse() at phar:///usr/bin/composer-require-checker/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php:31
 PhpParser\Parser\Multiple->parse() at phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/ASTLocator/LocateASTFromFiles.php:35
 ComposerRequireChecker\ASTLocator\LocateASTFromFiles->__invoke() at phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/DefinedSymbolsLocator/LocateDefinedSymbolsFromASTRoots.php:27
 ComposerRequireChecker\DefinedSymbolsLocator\LocateDefinedSymbolsFromASTRoots->__invoke() at phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/Cli/CheckCommand.php:73
 ComposerRequireChecker\Cli\CheckCommand->execute() at phar:///usr/bin/composer-require-checker/vendor/symfony/console/Command/Command.php:252
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:865
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:241
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:143
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer-require-checker/bin/composer-require-checker.php:32
 include() at /usr/bin/composer-require-checker:10

check [--config-file CONFIG-FILE] [--ignore-parse-errors] [--] [<composer-json>]

from composerrequirechecker.

maglnet avatar maglnet commented on June 19, 2024

Regarding the warnings:
This seems to be related to a * within an exclude-from-classmap key, that makes the regex invalid, but I currently do not understand why this fails, because I think we're using the same logic like the composer classmap generator.
Could you please check if composer dump-autoload -o gives these warnings, too?

The Syntax error could also be caused by a short open tag, you could try running the phar file with:

php -d short_open_tag=1 composer-require-checker.phar

and see if this fixes the problem.

If this does not help, could you please add your composer.lock file, so I could see if I find any hints what could cause the problems?

from composerrequirechecker.

soullivaneuh avatar soullivaneuh commented on June 19, 2024

Here is the result of the dump-autoload:

$ composer dump-autoload -o
Generating optimized autoload files
Warning: Ambiguous class resolution, "Symfony\Component\Dotenv\Dotenv" was found in both "/code/vendor/symfony/dotenv/Dotenv.php" and "/code/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Dotenv.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\Dotenv\Exception\ExceptionInterface" was found in both "/code/vendor/symfony/dotenv/Exception/ExceptionInterface.php" and "/code/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Exception/ExceptionInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\Dotenv\Exception\PathException" was found in both "/code/vendor/symfony/dotenv/Exception/PathException.php" and "/code/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Exception/PathException.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\Dotenv\Exception\FormatExceptionContext" was found in both "/code/vendor/symfony/dotenv/Exception/FormatExceptionContext.php" and "/code/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Exception/FormatExceptionContext.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\Dotenv\Exception\FormatException" was found in both "/code/vendor/symfony/dotenv/Exception/FormatException.php" and "/code/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Exception/FormatException.php", the first will be used.

Concerning the short_open_tag:

$ php -d xdebug.max_nesting_level=5000 -d short_open_tag=1 $(which composer-require-checker)

...
Warning: preg_match(): Compilation failed: nothing to repeat at offset 1 in phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php on line 29

Call Stack:
    0.0005     415496   1. {main}() /usr/bin/composer-require-checker:0
    0.0022     611416   2. include('phar:///usr/bin/composer-require-checker/bin/composer-require-checker.php') /usr/bin/composer-require-checker:10
    0.0123    1479832   3. ComposerRequireChecker\Cli\Application->run() phar:///usr/bin/composer-require-checker/bin/composer-require-checker.php:32
    0.0188    1729008   4. ComposerRequireChecker\Cli\Application->doRun() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:143
    0.0191    1731800   5. ComposerRequireChecker\Cli\Application->doRunCommand() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:241
    0.0191    1731800   6. ComposerRequireChecker\Cli\CheckCommand->run() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:865
    0.0193    1733528   7. ComposerRequireChecker\Cli\CheckCommand->execute() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Command/Command.php:252
    0.0349    4055200   8. ComposerRequireChecker\DefinedSymbolsLocator\LocateDefinedSymbolsFromASTRoots->__invoke() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/Cli/CheckCommand.php:73
   47.6826    8866816   9. ComposerRequireChecker\ASTLocator\LocateASTFromFiles->__invoke() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/DefinedSymbolsLocator/LocateDefinedSymbolsFromASTRoots.php:27
   47.6826    8866816  10. ComposerRequireChecker\FileLocator\LocateAllFilesByExtension->filterFilesByExtension() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/ASTLocator/LocateASTFromFiles.php:34
   47.6837    8867032  11. preg_match() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php:29


Warning: preg_match(): Compilation failed: nothing to repeat at offset 1 in phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php on line 29

Call Stack:
    0.0005     415496   1. {main}() /usr/bin/composer-require-checker:0
    0.0022     611416   2. include('phar:///usr/bin/composer-require-checker/bin/composer-require-checker.php') /usr/bin/composer-require-checker:10
    0.0123    1479832   3. ComposerRequireChecker\Cli\Application->run() phar:///usr/bin/composer-require-checker/bin/composer-require-checker.php:32
    0.0188    1729008   4. ComposerRequireChecker\Cli\Application->doRun() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:143
    0.0191    1731800   5. ComposerRequireChecker\Cli\Application->doRunCommand() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:241
    0.0191    1731800   6. ComposerRequireChecker\Cli\CheckCommand->run() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Application.php:865
    0.0193    1733528   7. ComposerRequireChecker\Cli\CheckCommand->execute() phar:///usr/bin/composer-require-checker/vendor/symfony/console/Command/Command.php:252
    0.0349    4055200   8. ComposerRequireChecker\DefinedSymbolsLocator\LocateDefinedSymbolsFromASTRoots->__invoke() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/Cli/CheckCommand.php:73
   47.6826    8866816   9. ComposerRequireChecker\ASTLocator\LocateASTFromFiles->__invoke() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/DefinedSymbolsLocator/LocateDefinedSymbolsFromASTRoots.php:27
   47.6826    8866816  10. ComposerRequireChecker\FileLocator\LocateAllFilesByExtension->filterFilesByExtension() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/ASTLocator/LocateASTFromFiles.php:34
   47.6837    8867032  11. preg_match() phar:///usr/bin/composer-require-checker/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php:29


In ParserAbstract.php line 293:
                                               
  Syntax error, unexpected T_STRING on line 1  
                                               

check [--config-file CONFIG-FILE] [--ignore-parse-errors] [--] [<composer-json>]

from composerrequirechecker.

maglnet avatar maglnet commented on June 19, 2024

The Warning: preg_match(): Compilation failed... should be fixed with 0.2.1 now. / #60

from composerrequirechecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.