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

Parsing the file [...StateProvider.tpl.php] resulted in an error: Syntax error, unexpected T_NAMESPACE on line 5 #2805

Closed
kochen opened this issue Nov 25, 2024 · 2 comments

Comments

@kochen
Copy link

kochen commented Nov 25, 2024

API Platform version(s) affected: since 4.0.4 (4.0.10 still affected)

Description

$ vendor/bin/composer-require-checker
ComposerRequireChecker 4.14.0@b6d5acd89d0de1727c1188157fa99552c39d1dfb
In LocateASTFromFiles.php line 41:
                                                                               
  Parsing the file [.../vendor/api-platform/core/src/Laravel/Console/Maker/Resources/skeleton/StateProvider.tpl.php] resulted in   
  an error: Syntax error, unexpected T_NAMESPACE on line 5                     
                                                                               
In ParserAbstract.php line 321:
                                                  
  Syntax error, unexpected T_NAMESPACE on line 5  
                                                  
check [--config-file CONFIG-FILE] [--ignore-parse-errors] [--output OUTPUT] [--] [<composer-json>]

How to reproduce

Here is a composer.json to reproduce the issue:

{
    "name": "api-platform/issue-2805",
    "type": "project",
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "require-dev": {
        "maglnet/composer-require-checker": "^4.14"
    },
    "require": {
        "api-platform/core": "4.0.10"
    }
}

Possible Solution
Prior to v4.0.4, this would result in a successful check:

$ vendor/bin/composer-require-checker
ComposerRequireChecker 4.14.0@b6d5acd89d0de1727c1188157fa99552c39d1dfb
There were no unknown symbols found.

Additional Context
This is a Symfony project, and not Laravel.

@kochen
Copy link
Author

kochen commented Nov 26, 2024

Added a composer.json file to reproduce the issue.

@kochen
Copy link
Author

kochen commented Nov 26, 2024

Moving to Core: api-platform/core#6826

@kochen kochen closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant