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

40 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"
2022-02-14 11:33:32 +01:00
composer create-project laravel/laravel ../laravel 8.6.* --quiet --prefer-dist
2020-06-22 01:48:33 +02:00
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
2020-06-22 01:48:33 +02:00
echo "Adding package from source"
2022-02-14 09:15:13 +01:00
sed -e 's|"type": "project",|&"repositories": [ { "type": "path", "url": "../psalm-plugin-laravel" } ],|' -i composer.json
2022-01-19 10:57:47 +01:00
COMPOSER_MEMORY_LIMIT=-1 composer update --with "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