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

Passage à la version beta 1.3.0 #25

Merged
merged 30 commits into from
Nov 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
babac7c
Ajout du linter php (ca fait faire mal)
NastuzziSamy Oct 17, 2018
ddc19ed
Ajout de la commande de test et de Travis
NastuzziSamy Oct 17, 2018
d0d5a60
Mise en application du linter sur le dossier app/Console et fix js files
NastuzziSamy Oct 19, 2018
cf383f0
Linting des fichiers d'Exception et des Facade
NastuzziSamy Oct 19, 2018
5ab9304
Linting des controlleurs de base et d'authentification
NastuzziSamy Oct 21, 2018
7bab03a
Linting des controlleurs Visibility et User
NastuzziSamy Oct 22, 2018
c10fa7d
Linting des controlleurs Semester, Room, Role et Permission
NastuzziSamy Oct 23, 2018
fdaaf81
Linting des controlleurs des Room, Location, Group, Event, Contact, Comm
NastuzziSamy Oct 24, 2018
305c214
Linting des derniers controlleurs et amélioration du test
NastuzziSamy Oct 29, 2018
2ab9f29
Linting des middlewares et amélioration de l'installation
NastuzziSamy Oct 30, 2018
a7a9dff
Linting d'une première partie des modèles
NastuzziSamy Nov 3, 2018
4cab990
Linting d'autres modèles
NastuzziSamy Nov 3, 2018
b9a239b
Correction du linting des controlleurs et les évènements sont publics
NastuzziSamy Nov 3, 2018
919fa76
Merge pull request #23 from simde-utc/feature/linter-and-tests
NastuzziSamy Nov 3, 2018
2337b3e
Linting des derniers modèles. Création d'un trait pour la classe User
NastuzziSamy Nov 3, 2018
8d0d21d
Merge branch 'feature/linter-models' into feature/linter-and-tests
NastuzziSamy Nov 3, 2018
036af4a
Linting des requests
NastuzziSamy Nov 4, 2018
aabaa91
Linting des interfaces
NastuzziSamy Nov 4, 2018
b2fa7fa
Linting des notifications
NastuzziSamy Nov 4, 2018
a75ca13
Linting des Providers
NastuzziSamy Nov 4, 2018
d270a4f
Linting des services
NastuzziSamy Nov 4, 2018
ae14cfe
Linting des fichiers de configuration
NastuzziSamy Nov 6, 2018
852c203
Add php-stan to test without tests \o/
NastuzziSamy Nov 19, 2018
bd7c4c9
Linting des traits des modèles
NastuzziSamy Nov 20, 2018
7c2959d
Linting des traits controlleurs
NastuzziSamy Nov 22, 2018
00f1126
Correction de mauvais lintings et linting des tests, configs, routes
NastuzziSamy Nov 23, 2018
a8395c5
Linting final de tous les fichiers PHP
NastuzziSamy Nov 25, 2018
8a2874e
Merge branch 'develop' into feature/linter-and-tests
Nov 25, 2018
cfa3d4b
Merge pull request #24 from simde-utc/feature/linter-and-tests
Nov 25, 2018
c972a35
Fix de la récup du nom du modèle et ajout de la route des versions
NastuzziSamy Nov 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions .env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
APP_NAME="Portail des Assos"
APP_ENV=develop
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_ASSO=simde

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=portail
DB_USERNAME=root
DB_PASSWORD=""

BROADCAST_DRIVER=log
CACHE_DRIVER=redis
SESSION_DRIVER=database
SESSION_LIFETIME=120
QUEUE_DRIVER=redis

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: php

services:
- mysql
- redis-server

php:
- 7.1.3

before_script:
- cp .env.travis .env
- mysql -e 'CREATE DATABASE portail;'
- composer self-update
- composer install --no-interaction
- php artisan key:generate
- php artisan migrate:fresh --seed
- npm -g i npm
- npm i
- npm run prod
- php artisan quick:clear

script:
- php artisan quick:test
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Nouvelle API du [Portail des Assos](https://assos.utc.fr), construite avec [Lara
+ Suppression du cache : `php artisan quick:clear`
+ Création de la clé : `php artisan key:generate`
+ Création des tables et des données : `php artisan migrate:fresh --seed`
+ Installation des dépendances JS : `npm install` (très long)
+ Compilation de l'application frontend : `npm run dev` (assez long)
+ Installation des dépendances JS : `npm install --production` (assez long)
+ Compilation de l'application frontend : `npm run prod` (assez long)

- Lancer l'application via :
+ Artisan : `php artisan serve` et aller sur http://localhost:8000
Expand All @@ -34,6 +34,26 @@ Nouvelle API du [Portail des Assos](https://assos.utc.fr), construite avec [Lara
- Ça part !


## Mettre à jour

- Lancer `php artisan quick:update`
- Lancer `npm run prod` ou `npm run watch`
- Tout est bon

## Développement
### Lancer en développement

- Lancer `npm install` (assez long)
- Lancer `npm run watch`
- Enjoy


### Développer

- Respecter le linter imposé pour le PHP mais aussi pour le JS
- Commenter en français
- Lancer `php artisan quick:test` pour vérifier que tout est bon avant de push son code


## Documentation

Expand Down
94 changes: 49 additions & 45 deletions app/Console/Commands/Clear.php
Original file line number Diff line number Diff line change
@@ -1,54 +1,58 @@
<?php
/**
* Fichier générant la commande quick:clear.
* Efface le cache de l'application.
*
* @author Alexandre Brasseur <abrasseur.pro@gmail.com>
* @author Samy Nastuzzi <samy@nastuzzi.fr>
*
* @copyright Copyright (c) 2018, SiMDE-UTC
* @license GNU GPL-3.0
*/

namespace App\Console\Commands;

use Illuminate\Console\Command;

class Clear extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'quick:clear';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Clear all compiled and cached resources';

/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
shell_exec('composer dump-autoload');

$this->call('view:clear');
$this->call('route:clear');
$this->call('config:clear');
$this->call('auth:clear-resets');
$this->call('cache:clear');
$this->call('clear-compiled');
$this->call('clear');

$this->call('config:cache');
$this->call('route:cache');
$this->call('view:cache');
}
/**
* @var string
*/
protected $signature = 'quick:clear';

/**
* @var string
*/
protected $description = 'Clear all compiled and cached resources';

/**
* @return void
*/
public function __construct()
{
parent::__construct();
}

/**
* Exécution de la commande.
*
* @return mixed
*/
public function handle()
{
shell_exec('composer dump-autoload');

$this->call('view:clear');
$this->call('route:clear');
$this->call('config:clear');
$this->call('auth:clear-resets');
$this->call('cache:clear');
$this->call('clear-compiled');
$this->call('clear');

$this->call('config:cache');
$this->call('route:cache');
$this->call('view:cache');
}
}
Loading