Skip to content

Commit 8d433ed

Browse files
authored
fix: test sample app from /tmp (larastan#2166)
1 parent 83278e5 commit 8d433ed

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/laravel-test.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ LARAVEL_VERSION_CONSTRAINT="${1:-^11.0}"
77
echo "Install Laravel ${LARAVEL_VERSION_CONSTRAINT}"
88
composer create-project --quiet --prefer-dist "laravel/laravel:${LARAVEL_VERSION_CONSTRAINT}" ../laravel
99
cd ../laravel/
10+
SAMPLE_APP_DIR="$(pwd)"
11+
composer show --direct
1012

1113
echo "Add Larastan from source"
1214
composer config minimum-stability dev
1315
composer config repositories.0 '{ "type": "path", "url": "../larastan", "options": { "symlink": false } }'
1416

1517
# No version information with "type":"path"
16-
composer require --dev "larastan/larastan:*"
17-
composer du -o
18+
composer require --dev --optimize-autoloader "larastan/larastan:*"
1819

1920
cat >phpstan.neon <<"EOF"
2021
includes:
@@ -27,7 +28,7 @@ EOF
2728

2829
echo "Test Laravel"
2930
vendor/bin/phpstan analyse
30-
cd -
3131

32-
echo "Test Laravel from other working directories"
33-
../laravel/vendor/bin/phpstan analyse --configuration=../laravel/phpstan.neon ../laravel/app
32+
echo "Test Laravel from another working directory"
33+
cd /tmp/
34+
${SAMPLE_APP_DIR}/vendor/bin/phpstan analyse --configuration=${SAMPLE_APP_DIR}/phpstan.neon

0 commit comments

Comments
 (0)