psalm-plugin-laravel/tests/laravel-test.sh

41 lines
1.3 KiB
Bash
Raw Normal View History

2020-06-22 01:48:33 +02:00
#!/bin/bash
set -e
echo "Cleaning Up"
rm -rf ../laravel/
echo "Installing Laravel"
composer create-project --quiet --prefer-dist "laravel/laravel" ../laravel
cd ../laravel/
2021-07-16 20:57:33 +02:00
echo "Preparing Laravel"
./artisan make:cast ExampleCast
./artisan make:channel ExampleChannel
./artisan make:command ExampleCommand
./artisan make:controller ExampleController
./artisan make:event ExampleEvent
./artisan make:exception ExampleException
./artisan make:factory ExampleFactory
./artisan make:job ExampleJob
./artisan make:listener ExampleListener
./artisan make:mail ExampleMail
./artisan make:middleware ExampleMiddleware
./artisan make:model Example
./artisan make:notification ExampleNotification
./artisan make:observer ExampleObserver
./artisan make:policy ExamplePolicy
./artisan make:provider ExampleProvider
./artisan make:request ExampleRequest
./artisan make:resource ExampleResource
./artisan make:rule ExampleRule
./artisan make:seeder ExampleSeeder
./artisan make:test ExampleTest
2020-06-22 01:48:33 +02:00
echo "Adding package from source"
2020-06-22 05:22:22 +02:00
sed -e 's|"type": "project",|&"repositories": [ { "type": "path", "url": "../psalm-plugin-laravel" } ],|' -i composer.json
2021-10-08 13:23:33 +02:00
COMPOSER_MEMORY_LIMIT=-1 composer require --dev "psalm/plugin-laravel:*" -W
2020-06-22 01:48:33 +02:00
echo "Analyzing Laravel"
./vendor/bin/psalm -c ../psalm-plugin-laravel/tests/laravel-test-psalm.xml