Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 5.8 #68

Merged
merged 14 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
26 changes: 18 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
APP_NAME=DoeSangue
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=doesangue
DB_USERNAME=doesangue
DB_PASSWORD=doesangue
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=cache
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
*swp
.env
bower_components
.git/
.env.testing
#composer.lock
.theia/
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
composer.lock
Procfile
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ build:

variables:
APP_KEY: base64:D6N/Z/7E0B1M3l1GumT+Kp+JT7E4bzbeMRuxzV3CP1s=
DB_DATABASE: doesangue
DB_DATABASE: giveblood_test
DB_USERNAME: root
DB_CONNECTION: mysql
APP_ENV: testing

dependencies:
before:
- mysql -uroot -e 'CREATE DATABASE doesangue'
- mysql -uroot -e 'CREATE DATABASE giveblood_test'

tests:
override:
Expand Down
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
language: php
php:
- 7.1
#- 7.1
- 7.2
- 7.3
- nightly

addons:
postgresql: '9.6'
code_climate:
Expand All @@ -18,14 +21,16 @@ dist: trusty
notifications:
slack:
secure: g5gScU7zKCyMI1gZnoezl4VDAFQ5DZgr/Vav5kVbxCiItw+J6vvMqygmK5CFwNaYwvStJ9tIfJPvbxlRyEfF3qzRyCtpzKelbzyG79y/ecICVFI3Qd52FyXmgk/HrijxqeBU3geSSu1yi9fObf6DpmJ9jBdAeyCJ1dXCaaPe75aq7tPljxd4Qh2Omw/XjTdTqO5YWZ1wM3CAuIrobDtDNQ+fDHpam5Kdb62T9uR0d7MTHygHefoOw+1AWHVggNzAP4uBi7rU3XXMJDeAjUlPw6Mg3SRhsfJ3RechLVq/7dw7fQpHsoG8o6ySqd6CvLT2qFFdQ6kX3nSMIsO49CV8QtghICTwnzqbyhnQeI05tqlkYDC0i9AY4TF7kx4Uy7GvrvjjekJlMBGNLrYzPoSYBIms1lGbprqDAASoM73m4IhNWQ0GQiMeIf1ctrgzj0H0SxPPGSANn57YIAfhsioXsR/ChvNhreUyNHBinAO3afR7VI0utsPLwWiKzvDDh7NzIwqFzgQAeocu3pbuStPk1/hQZiMjJINNlFPHv/00j36+YuqKJxPM1y+fis1cloEsHhx29tKy9RtqyHlXsszTM34gbmQuSzJ+oLaaKm63uCAAPJFgb1g01/57ZlIbnZ9riGIORMkoJvqbDO7MRllpGFvSVjewSy6XroC5wjlGSZ4=
install: composer install
install:
- composer install
- composer require codedungeon/phpunit-result-printer
before_script:
- psql -c 'create database doesangue_test;' -U postgres
- composer require codeclimate/php-test-reporter --dev
- psql -c 'create database giveblood_test;' -U postgres
#- composer require codeclimate/php-test-reporter --dev
script:
- php artisan migrate --env=testing --no-interaction
- vendor/bin/phpunit
- ./vendor/bin/phpunit
- sh ./cache-clean.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
- vendor/bin/test-reporter
#- vendor/bin/test-reporter
8 changes: 4 additions & 4 deletions app/Console/Commands/MakeModelCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DoeSangue\Console\Commands;
namespace GiveBlood\Console\Commands;

//use Illuminate\Console\Command;
use Illuminate\Foundation\Console\ModelMakeCommand;
Expand All @@ -19,14 +19,14 @@ class MakeModelCommand extends ModelMakeCommand
*
* @var string
*/
protected $description = 'Create a new model class with Models namespace';
protected $description = 'Create a new model class with Modules namespace';


protected function getPath($name)
{
$name = str_replace_first($this->rootNamespace(), '', $name);

return $this->laravel[ 'path' ].'/Models/'.str_replace('\\', '/', $name).'.php';
return $this->laravel[ 'path' ].'/Modules/'.str_replace('\\', '/', $name).'.php';
}
/**
* Get the root namespace for the class.
Expand All @@ -35,7 +35,7 @@ protected function getPath($name)
*/
protected function rootNamespace()
{
return $this->laravel->getNamespace().'Models';
return $this->laravel->getNamespace().'Modules';
}

/**
Expand Down
44 changes: 44 additions & 0 deletions app/Console/Commands/MakeProviderCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace GiveBlood\Console\Commands;

use Illuminate\Foundation\Console\ProviderMakeCommand;

class MakeProviderCommand extends ProviderMakeCommand
{

/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a new custom service provider class';

/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Provider';

/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return __DIR__.'/stubs/provider.stub';
}

/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Modules';
}
}
37 changes: 37 additions & 0 deletions app/Console/Commands/stubs/provider.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace DummyNamespace;

use Illuminate\Support\ServiceProvider;
use Migrator\MigratorTrait as LaravelMigrator;

class DummyClass extends ServiceProvider
{
use LaravelMigrator;

public function register()
{
$this->registerMigrations();
//$this->registerFactories();
//$this->registerSeeders();
}

public function registerMigrations()
{
$this->migrations(
[
//
]
);
}

public function registerFactories()
{
//
}

public function registerSeeders()
{
//
}
}
File renamed without changes.
11 changes: 7 additions & 4 deletions app/Console/Kernel.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DoeSangue\Console;
namespace GiveBlood\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
Expand All @@ -13,13 +13,14 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
\DoeSangue\Console\Commands\MakeModelCommand::class
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
Expand All @@ -29,11 +30,13 @@ protected function schedule(Schedule $schedule)

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

include base_path('routes/console.php');
require (__DIR__.'/ConsoleRoute.php');
}
}
16 changes: 0 additions & 16 deletions app/GraphQL/Mutation/CreateCampaignMutation.php

This file was deleted.

8 changes: 0 additions & 8 deletions app/GraphQL/Mutation/NewBankMutation.php

This file was deleted.

8 changes: 0 additions & 8 deletions app/GraphQL/Mutation/UpdateProfileMutation.php

This file was deleted.

8 changes: 0 additions & 8 deletions app/GraphQL/Query/BloodGroupsQuery.php

This file was deleted.

8 changes: 0 additions & 8 deletions app/GraphQL/Query/CampaignsQuery.php

This file was deleted.

Loading