Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit 750dfa8

Browse files
authored
Merge pull request #20 from laravel-portugal/switch-to-lumen
Updated Laravel to v8.x
2 parents be7b2cd + 3f2a666 commit 750dfa8

File tree

93 files changed

+2900
-4412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2900
-4412
lines changed

.env.example

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,19 @@
1-
APP_NAME=Laravel
1+
APP_NAME="Laravel-Portugal API"
22
APP_ENV=local
33
APP_KEY=
44
APP_DEBUG=true
5-
APP_URL=http://localhost
5+
APP_URL=http://api.laravel.pt
6+
APP_TIMEZONE=UTC
67

78
LOG_CHANNEL=stack
9+
LOG_SLACK_WEBHOOK_URL=
810

911
DB_CONNECTION=mysql
1012
DB_HOST=127.0.0.1
1113
DB_PORT=3306
12-
DB_DATABASE=laravel
13-
DB_USERNAME=root
14-
DB_PASSWORD=
14+
DB_DATABASE=homestead
15+
DB_USERNAME=homestead
16+
DB_PASSWORD=secret
1517

16-
BROADCAST_DRIVER=log
1718
CACHE_DRIVER=file
1819
QUEUE_CONNECTION=sync
19-
SESSION_DRIVER=file
20-
SESSION_LIFETIME=120
21-
22-
REDIS_HOST=127.0.0.1
23-
REDIS_PASSWORD=null
24-
REDIS_PORT=6379
25-
26-
MAIL_DRIVER=smtp
27-
MAIL_HOST=smtp.mailtrap.io
28-
MAIL_PORT=2525
29-
MAIL_USERNAME=null
30-
MAIL_PASSWORD=null
31-
MAIL_ENCRYPTION=null
32-
MAIL_FROM_ADDRESS=null
33-
MAIL_FROM_NAME="${APP_NAME}"
34-
35-
AWS_ACCESS_KEY_ID=
36-
AWS_SECRET_ACCESS_KEY=
37-
AWS_DEFAULT_REGION=us-east-1
38-
AWS_BUCKET=
39-
40-
PUSHER_APP_ID=
41-
PUSHER_APP_KEY=
42-
PUSHER_APP_SECRET=
43-
PUSHER_APP_CLUSTER=mt1
44-
45-
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46-
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

.gitattributes

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Run tests"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
testing:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
php: [7.4]
18+
19+
name: For PHP ${{ matrix.php }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v1
27+
with:
28+
path: ~/.composer/cache/files
29+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
coverage: xdebug
36+
37+
- name: Install dependencies
38+
run: composer install --no-interaction --no-suggest
39+
40+
- name: Execute tests
41+
run: vendor/bin/phpunit --testdox --coverage-clover build/logs/clover.xml
42+
43+
- name: Store test coverage report
44+
run: vendor/bin/php-coveralls -v
45+
env:
46+
COVERALLS_RUN_LOCALLY: 1
47+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

.gitignore

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
/node_modules
2-
/public/hot
3-
/public/storage
4-
/storage/*.key
51
/vendor
6-
.env
7-
.env.backup
8-
.phpunit.result.cache
2+
/.idea
93
Homestead.json
104
Homestead.yaml
11-
npm-debug.log
12-
yarn-error.log
5+
.env
6+
.phpunit.result.cache

.styleci.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Laravel-Portugal API
22

3-
[![Build Status](https://img.shields.io/travis/laravel-portugal/api/master.svg?style=flat-square)](https://travis-ci.org/laravel-portugal/api)
3+
![Run tests](https://github.com/laravel-portugal/api/workflows/Run%20tests/badge.svg)
44
[![Coverage Status](https://coveralls.io/repos/github/laravel-portugal/api/badge.svg?branch=master)](https://coveralls.io/github/laravel-portugal/api?branch=master)
55

66
## Installation
@@ -15,13 +15,12 @@
1515
1. Clone this repository.
1616
2. Run `composer install` to install all dependencies (add `--no-dev` if you're using this in production).
1717
3. Run `cp .env.example .env` to create an `.env` file based on the distributed `.env.example` file.
18-
4. Run `php artisan key:generate` to generate a new application key.
19-
5. Update the `.env` file with the connection details for the database.
20-
6. Run `php artisan migrate` to create the database schema.
18+
4. Update the `.env` file with a new `APP_KEY` and the connection details for the database.
19+
5. Run `php artisan migrate` to create the database schema.
2120

2221
## Testing
2322

24-
This project is fully tested. We have an [automatic pipeline](https://travis-ci.org/laravel-portugal/api) and an [automatic code quality analysis](https://coveralls.io/github/laravel-portugal/api) tool set up to continuously test and assert the quality of all code published in this repository, but you can execute the test suite yourself by running the following command:
23+
This project is fully tested. We have an [automatic pipeline](https://github.com/laravel-portugal/api/actions) and an [automatic code quality analysis](https://coveralls.io/github/laravel-portugal/api) tool set up to continuously test and assert the quality of all code published in this repository, but you can execute the test suite yourself by running the following command:
2524

2625
``` bash
2726
vendor/bin/phpunit
@@ -33,15 +32,15 @@ _Note: This assumes you've run `composer install` (without the `--no-dev` option
3332

3433
## Changelog
3534

36-
Please see [CHANGELOG](changelog.md) for more information on what has changed recently.
35+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
3736

3837
## Contributing
3938

40-
Please see [CONTRIBUTING](contributing.md) for details.
39+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
4140

42-
### Security
41+
## Security
4342

44-
If you discover any security related issues, please [talk to us on Discord](https://laravel.pt) instead of using the issue tracker.
43+
Please see [SECURITY](SECURITY.md) for details.
4544

4645
## Credits
4746

File renamed without changes.

app/Console/Kernel.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Console;
44

55
use Illuminate\Console\Scheduling\Schedule;
6-
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
6+
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
77

88
class Kernel extends ConsoleKernel
99
{
@@ -24,19 +24,6 @@ class Kernel extends ConsoleKernel
2424
*/
2525
protected function schedule(Schedule $schedule)
2626
{
27-
// $schedule->command('inspire')
28-
// ->hourly();
29-
}
30-
31-
/**
32-
* Register the commands for the application.
33-
*
34-
* @return void
35-
*/
36-
protected function commands()
37-
{
38-
$this->load(__DIR__.'/Commands');
39-
40-
require base_path('routes/console.php');
27+
//
4128
}
4229
}

app/Events/Event.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace App\Events;
4+
5+
use Illuminate\Queue\SerializesModels;
6+
7+
abstract class Event
8+
{
9+
use SerializesModels;
10+
}

0 commit comments

Comments
 (0)