Skip to content

Getting error: /usr/local/bin/phpstan: line 2: syntax error: unexpected newline #10

Description

@bshaffer

When I use this action to run phpstan in my github actions, I get the following error:

/usr/local/bin/phpstan: line 2: syntax error: unexpected newline

Looking at the debug output, this is from the following command (which run locally, executes as expected):

  Command:  phpstan analyse appengine/flexible/tasks/src --autoload-file=appengine/flexible/tasks/vendor/autoload.php

You can see the full run log here

I have also tried setting the PHP version to 7.4 for both the composer action and the phpstan action, with no luck.

Any thoughts?

name: Lint

on: [push]

jobs:
  phpstan:
    steps:
    - uses: actions/checkout@v2
    - uses: php-actions/composer@v6 # or alternative dependency management
      with:
        args: --working-dir=logging --ignore-platform-reqs

    - uses: php-actions/phpstan@v3
      with:
        php_version: "8.0"
        path: logging/src
        autoload_file: logging/vendor/autoload.php

Activity

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