This repository was archived by the owner on May 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +675
-464
lines changed Expand file tree Collapse file tree 6 files changed +675
-464
lines changed Original file line number Diff line number Diff line change
1
+ name : Laravel
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ laravel-tests :
11
+
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ - name : Copy .env
17
+ run : php -r "file_exists('.env') || copy('.env.example', '.env');"
18
+ - name : Install Dependencies
19
+ run : composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
20
+ - name : Generate key
21
+ run : php artisan key:generate --force
22
+ - name : Directory Permissions
23
+ run : chmod -R 777 storage bootstrap/cache
24
+ - name : Create Database
25
+ run : |
26
+ mkdir -p database
27
+ touch database/database-test.sqlite
28
+ - name : Execute tests (Unit and Feature tests) via PHPUnit
29
+ env :
30
+ DB_CONNECTION : sqlite
31
+ DB_DATABASE : database/database.sqlite
32
+ run : |
33
+ php artisan migrate --database=testing --force
34
+ vendor/bin/phpunit
Original file line number Diff line number Diff line change 1
1
language : php
2
2
php :
3
- - 5.5
4
- - 7.0
3
+ - 7.3
5
4
install :
6
5
- composer install
7
6
env :
15
14
- TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
16
15
- TWILIO_NUMBER=+15552737123
17
16
before_script :
18
- - psql -c 'create database airtng;' -U postgres
19
- - php artisan migrate
17
+ - touch database/database-test.sqlite
18
+ - php artisan migrate --database=testing --force
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Exceptions ;
4
4
5
- use Exception ;
5
+ use Throwable ;
6
6
use Illuminate \Database \Eloquent \ModelNotFoundException ;
7
7
use Symfony \Component \HttpKernel \Exception \HttpException ;
8
8
use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
@@ -23,12 +23,12 @@ class Handler extends ExceptionHandler
23
23
/**
24
24
* Report or log an exception.
25
25
*
26
- * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
27
- *
28
- * @param \Exception $e
26
+ * @param \Throwable $exception
29
27
* @return void
28
+ *
29
+ * @throws \Exception
30
30
*/
31
- public function report (Exception $ e )
31
+ public function report (Throwable $ e )
32
32
{
33
33
return parent ::report ($ e );
34
34
}
@@ -37,10 +37,12 @@ public function report(Exception $e)
37
37
* Render an exception into an HTTP response.
38
38
*
39
39
* @param \Illuminate\Http\Request $request
40
- * @param \Exception $e
41
- * @return \Illuminate\Http\Response
40
+ * @param \Throwable $exception
41
+ * @return \Symfony\Component\HttpFoundation\Response
42
+ *
43
+ * @throws \Throwable
42
44
*/
43
- public function render ($ request , Exception $ e )
45
+ public function render ($ request , Throwable $ e )
44
46
{
45
47
if ($ e instanceof ModelNotFoundException) {
46
48
$ e = new NotFoundHttpException ($ e ->getMessage (), $ e );
Original file line number Diff line number Diff line change 5
5
"license" : " MIT" ,
6
6
"type" : " project" ,
7
7
"require" : {
8
- "php" : " >= 7.2" ,
9
- "fideloper/proxy" : " ^4.0 " ,
10
- "laravel/framework" : " 5.8.* " ,
11
- "laravel/tinker" : " ^1.0 " ,
12
- "twilio/sdk" : " ^5 .0" ,
13
- "laravelcollective/html" : " 5.8.* "
8
+ "php" : " ^ 7.2.5 " ,
9
+ "fideloper/proxy" : " ^4.2 " ,
10
+ "laravel/framework" : " ^7.2 " ,
11
+ "laravel/tinker" : " ^2.3 " ,
12
+ "twilio/sdk" : " ^6.1 .0" ,
13
+ "laravelcollective/html" : " ^6.1 "
14
14
},
15
15
"require-dev" : {
16
- "fzaninotto/faker" : " ~1.4 " ,
17
- "mockery/mockery" : " 0.9.* " ,
18
- "phpunit/phpunit" : " ^7 .5" ,
16
+ "fzaninotto/faker" : " ^1.9.1 " ,
17
+ "mockery/mockery" : " ^1.3.1 " ,
18
+ "phpunit/phpunit" : " ^8 .5" ,
19
19
"phpspec/phpspec" : " ~6.1"
20
20
},
21
21
"extra" : {
You can’t perform that action at this time.
0 commit comments