Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit c28c1f5

Browse files
author
Carlos Villavicencio
committed
Upgrade to Laravel 7.2
1 parent a600437 commit c28c1f5

File tree

6 files changed

+675
-464
lines changed

6 files changed

+675
-464
lines changed

.github/workflows/laravel.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22
php:
3-
- 5.5
4-
- 7.0
3+
- 7.3
54
install:
65
- composer install
76
env:
@@ -15,5 +14,5 @@ env:
1514
- TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1615
- TWILIO_NUMBER=+15552737123
1716
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

app/Exceptions/Handler.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Exceptions;
44

5-
use Exception;
5+
use Throwable;
66
use Illuminate\Database\Eloquent\ModelNotFoundException;
77
use Symfony\Component\HttpKernel\Exception\HttpException;
88
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -23,12 +23,12 @@ class Handler extends ExceptionHandler
2323
/**
2424
* Report or log an exception.
2525
*
26-
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
27-
*
28-
* @param \Exception $e
26+
* @param \Throwable $exception
2927
* @return void
28+
*
29+
* @throws \Exception
3030
*/
31-
public function report(Exception $e)
31+
public function report(Throwable $e)
3232
{
3333
return parent::report($e);
3434
}
@@ -37,10 +37,12 @@ public function report(Exception $e)
3737
* Render an exception into an HTTP response.
3838
*
3939
* @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
4244
*/
43-
public function render($request, Exception $e)
45+
public function render($request, Throwable $e)
4446
{
4547
if ($e instanceof ModelNotFoundException) {
4648
$e = new NotFoundHttpException($e->getMessage(), $e);

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"license": "MIT",
66
"type": "project",
77
"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"
1414
},
1515
"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",
1919
"phpspec/phpspec": "~6.1"
2020
},
2121
"extra": {

0 commit comments

Comments
 (0)