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

Allow installation of dev dependencies #22

Merged
merged 1 commit into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ jobs:
+ args: analyse src/ --level=5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already here - it just looks like an addition on this PR because of the + 😄

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah 😃

```

_to install dev dependencies:_
```diff
on: [push, pull_request]
name: Test
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PHPStan
uses: docker://oskarstark/phpstan-ga
+ env:
+ REQUIRE_DEV: true
with:
args: analyse src/
```

_to use a phpstan.neon.dist configuration file:_

just drop the `phpstan.neon.dist` in your repository root and it will be taken into account.
Expand Down
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/sh -l

sh -c "composer install --no-scripts --no-progress --quiet --no-dev && /composer/vendor/bin/phpstan $*"
NO_DEV="--no-dev"
if [ "$REQUIRE_DEV" = "true" ]; then
NO_DEV=""
fi

sh -c "composer install --no-scripts --no-progress --quiet $NO_DEV && /composer/vendor/bin/phpstan $*"