Skip to content

Fatal PHP Error with api-platform #12019

Closed

Description

@symfonyaml

Bug report

Problem

When I create a new Symfony project with PHPStan and Api-Platform I have the following error while clearing the symfony cache:

Uncaught Error: Too few arguments to function PHPStan\PhpDocParser\Parser\ConstExprParser::__construct(),
0 passed in vendor/api-platform/metadata/Resource/Factory/PhpDocResourceMetadataCollectionFactory.php on line 62
and exactly 1 expected

Reproduce

composer  create-project --quiet --no-progress --no-audit symfony/skeleton example
cd example
com req --quiet phpstan/phpstan
symfony composer require api

Code snippet that reproduces the problem

No response

Expected output

No expected output required for this issue.

Did PHPStan help you today? Did it make you happy in any way?

No response

Activity

  1. mergeable commented on Nov 12, 2024

    @mergeable

    This bug report is missing a link to reproduction at phpstan.org/try.

    It will most likely be closed after manual review.

  2. ondrejmirtes commented on Nov 12, 2024

    @ondrejmirtes
    Member

    There's already a PR to fix that in api-platform/core: api-platform/core#6789

  3. github-actions commented on Dec 14, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  4. locked as resolved and limited conversation to collaborators on Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions