From eee0c152a49d999fd6f58abbc481796f9164aacf Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Fri, 25 May 2018 14:43:20 -0300 Subject: [PATCH 01/17] Harpia revisado para PHP 7.2+ --- .travis.yml | 1 + app/Console/Commands/ModulosMigrate.php | 44 +++--- app/Console/Commands/ModulosSeed.php | 40 +++--- .../Repositories/ListaSemturRepository.php | 130 +++++++++--------- modulos/ModulosServiceProvider.php | 15 +- 5 files changed, 115 insertions(+), 115 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e18aa19..eb6f0091 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ sudo: required php: - 7.1 + - 7.2 before_script: - cp .env.travis .env diff --git a/app/Console/Commands/ModulosMigrate.php b/app/Console/Commands/ModulosMigrate.php index 54aaafa9..7098f1dd 100755 --- a/app/Console/Commands/ModulosMigrate.php +++ b/app/Console/Commands/ModulosMigrate.php @@ -40,10 +40,10 @@ public function handle() { $modulos = config('modulos.modulos'); - while (list(, $modulo) = each($modulos)) { + foreach ($modulos as $modulo) { // Load the migrations - $moduloPath = '/modulos/' . $modulo.'/Database/Migrations'; + $moduloPath = '/modulos/' . $modulo . '/Database/Migrations'; $dirPath = base_path() . $moduloPath; if (is_dir($dirPath)) { Artisan::call('migrate', ['--path' => $moduloPath]); @@ -55,14 +55,14 @@ public function handle() if ($this->option('seed') == 'prod') { $modulos = config('modulos.modulos'); - while (list(, $modulo) = each($modulos)) { + foreach ($modulos as $modulo) { - // Load the migrations - if ($modulo == 'Seguranca') { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\\'. $modulo .'Seeder'; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Production\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\\' . $modulo . 'Seeder'; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Production\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); @@ -75,25 +75,25 @@ public function handle() if ($this->option('seed') == 'dev') { $modulos = config('modulos.modulos'); - while (list(, $modulo) = each($modulos)) { + foreach ($modulos as $modulo) { - // Load the migrations - if ($modulo == 'Seguranca') { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\\'. $modulo .'Seeder'; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Production\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\\' . $modulo . 'Seeder'; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Production\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); $this->info($modulo . ' Seed complete!'); } - // Load the migrations - if ($modulo == 'Seguranca') { - $class = null; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Development\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = null; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Development\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); $this->info($modulo . ' Development Seed complete!'); diff --git a/app/Console/Commands/ModulosSeed.php b/app/Console/Commands/ModulosSeed.php index a71ad5c5..495013d4 100644 --- a/app/Console/Commands/ModulosSeed.php +++ b/app/Console/Commands/ModulosSeed.php @@ -41,39 +41,39 @@ public function handle() $modulos = config('modulos.modulos'); if ($this->option('dev')) { - while (list(, $modulo) = each($modulos)) { + foreach ($modulos as $modulo) { - // Load the migrations - if ($modulo == 'Seguranca') { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\\'. $modulo .'Seeder'; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Production\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\\' . $modulo . 'Seeder'; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Production\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); $this->info($modulo . ' Seed complete!'); } - // Load the migrations - if ($modulo == 'Seguranca') { - $class = null; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Development\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = null; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Development\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); $this->info($modulo . ' Development Seed complete!'); } } } else { - while (list(, $modulo) = each($modulos)) { + foreach ($modulos as $modulo) { - // Load the migrations - if ($modulo == 'Seguranca') { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\\'. $modulo .'Seeder'; - } else { - $class = '\Modulos\\'. $modulo .'\Database\Seeds\Production\\'. $modulo .'Seeder'; - } + // Load the migrations + if ($modulo == 'Seguranca') { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\\' . $modulo . 'Seeder'; + } else { + $class = '\Modulos\\' . $modulo . '\Database\Seeds\Production\\' . $modulo . 'Seeder'; + } if (class_exists($class)) { Artisan::call('db:seed', ['--class' => $class]); diff --git a/modulos/Academico/Repositories/ListaSemturRepository.php b/modulos/Academico/Repositories/ListaSemturRepository.php index b92984b1..d6dc7b82 100644 --- a/modulos/Academico/Repositories/ListaSemturRepository.php +++ b/modulos/Academico/Repositories/ListaSemturRepository.php @@ -13,7 +13,7 @@ public function __construct(ListaSemtur $model) parent::__construct($model); } - public function paginateRequest(array $requestParameters = []) + public function paginateRequest(array $requestParameters = null) { $sort = []; if (!empty($requestParameters['field']) and !empty($requestParameters['sort'])) { @@ -45,24 +45,24 @@ public function paginateRequest(array $requestParameters = []) public function paginateMatriculas($sort = null, $search = null) { $result = $this->model - ->join('acd_matriculas_listas_semtur', function ($join) { - $join->on('mls_lst_id', '=', 'lst_id'); - }) - ->join('acd_matriculas', function ($join) { - $join->on('mat_id', '=', 'mls_mat_id'); - }) - ->join('acd_turmas', function ($join) { - $join->on('mat_trm_id', '=', 'trm_id'); - }) - ->join('acd_polos', function ($join) { - $join->on('mat_pol_id', '=', 'pol_id'); - }) - ->join('acd_alunos', function ($join) { - $join->on('mat_alu_id', '=', 'alu_id'); - }) - ->join('gra_pessoas', function ($join) { - $join->on('alu_pes_id', '=', 'pes_id'); - }); + ->join('acd_matriculas_listas_semtur', function ($join) { + $join->on('mls_lst_id', '=', 'lst_id'); + }) + ->join('acd_matriculas', function ($join) { + $join->on('mat_id', '=', 'mls_mat_id'); + }) + ->join('acd_turmas', function ($join) { + $join->on('mat_trm_id', '=', 'trm_id'); + }) + ->join('acd_polos', function ($join) { + $join->on('mat_pol_id', '=', 'pol_id'); + }) + ->join('acd_alunos', function ($join) { + $join->on('mat_alu_id', '=', 'alu_id'); + }) + ->join('gra_pessoas', function ($join) { + $join->on('alu_pes_id', '=', 'pes_id'); + }); if (!empty($search)) { foreach ($search as $key => $value) { @@ -86,18 +86,18 @@ public function paginateMatriculas($sort = null, $search = null) public function getTurmasByLista($id) { $result = $this->model - ->join('acd_matriculas_listas_semtur', function ($join) { - $join->on('mls_lst_id', '=', 'lst_id'); - }) - ->join('acd_matriculas', function ($join) { - $join->on('mls_mat_id', '=', 'mat_id'); - }) - ->join('acd_turmas', function ($join) { - $join->on('mat_trm_id', '=', 'trm_id'); - }) - ->where('lst_id', '=', $id) - ->groupBy('mat_trm_id') - ->pluck('trm_nome', 'trm_id'); + ->join('acd_matriculas_listas_semtur', function ($join) { + $join->on('mls_lst_id', '=', 'lst_id'); + }) + ->join('acd_matriculas', function ($join) { + $join->on('mls_mat_id', '=', 'mat_id'); + }) + ->join('acd_turmas', function ($join) { + $join->on('mat_trm_id', '=', 'trm_id'); + }) + ->where('lst_id', '=', $id) + ->groupBy('mat_trm_id') + ->pluck('trm_nome', 'trm_id'); return $result; } @@ -130,21 +130,21 @@ public function findAll(array $parameters, array $sort = [], array $select = []) $query = $this->model->join('acd_matriculas_listas_semtur', function ($join) { $join->on('mls_lst_id', '=', 'lst_id'); }) - ->join('acd_matriculas', function ($join) { - $join->on('mls_mat_id', '=', 'mat_id'); - }) - ->join('acd_turmas', function ($join) { - $join->on('mat_trm_id', '=', 'trm_id'); - }) - ->join('acd_polos', function ($join) { - $join->on('mat_pol_id', '=', 'pol_id'); - }) - ->join('acd_alunos', function ($join) { - $join->on('mat_alu_id', '=', 'alu_id'); - }) - ->join('gra_pessoas', function ($join) { - $join->on('alu_pes_id', '=', 'pes_id'); - }); + ->join('acd_matriculas', function ($join) { + $join->on('mls_mat_id', '=', 'mat_id'); + }) + ->join('acd_turmas', function ($join) { + $join->on('mat_trm_id', '=', 'trm_id'); + }) + ->join('acd_polos', function ($join) { + $join->on('mat_pol_id', '=', 'pol_id'); + }) + ->join('acd_alunos', function ($join) { + $join->on('mat_alu_id', '=', 'alu_id'); + }) + ->join('gra_pessoas', function ($join) { + $join->on('alu_pes_id', '=', 'pes_id'); + }); foreach ($parameters as $key => $value) { $query = $query->where($key, '=', $value); @@ -168,25 +168,25 @@ public function getMatriculasOutOfLista($listaId, $turmaId, $poloId = null) $query = \Modulos\Academico\Models\Matricula::join('acd_turmas', function ($join) { $join->on('mat_trm_id', '=', 'trm_id'); }) - ->join('acd_polos', function ($join) { - $join->on('mat_pol_id', '=', 'pol_id'); - }) - ->join('acd_alunos', function ($join) { - $join->on('mat_alu_id', '=', 'alu_id'); - }) - ->join('gra_pessoas', function ($join) { - $join->on('alu_pes_id', '=', 'pes_id'); - }) - ->select('acd_matriculas.*', 'pes_nome', 'pol_nome', 'trm_nome') - ->whereNotIn('mat_id', function ($q) use ($listaId, $turmaId) { - $q->select('mat_id') - ->from('acd_matriculas') - ->join('acd_matriculas_listas_semtur', 'mls_mat_id', '=', 'mat_id') - ->where('mls_lst_id', '=', $listaId) - ->where('mat_trm_id', '=', $turmaId); - }) - ->where('mat_situacao', '=', 'cursando') - ->where('mat_trm_id', '=', $turmaId); + ->join('acd_polos', function ($join) { + $join->on('mat_pol_id', '=', 'pol_id'); + }) + ->join('acd_alunos', function ($join) { + $join->on('mat_alu_id', '=', 'alu_id'); + }) + ->join('gra_pessoas', function ($join) { + $join->on('alu_pes_id', '=', 'pes_id'); + }) + ->select('acd_matriculas.*', 'pes_nome', 'pol_nome', 'trm_nome') + ->whereNotIn('mat_id', function ($q) use ($listaId, $turmaId) { + $q->select('mat_id') + ->from('acd_matriculas') + ->join('acd_matriculas_listas_semtur', 'mls_mat_id', '=', 'mat_id') + ->where('mls_lst_id', '=', $listaId) + ->where('mat_trm_id', '=', $turmaId); + }) + ->where('mat_situacao', '=', 'cursando') + ->where('mat_trm_id', '=', $turmaId); if ($poloId) { $query = $query->where('mat_pol_id', '=', $poloId); diff --git a/modulos/ModulosServiceProvider.php b/modulos/ModulosServiceProvider.php index 3d4118b9..6548144c 100755 --- a/modulos/ModulosServiceProvider.php +++ b/modulos/ModulosServiceProvider.php @@ -11,25 +11,24 @@ public function boot() { $modulos = config('modulos.modulos'); - while (list(, $modulo) = each($modulos)) { - + foreach ($modulos as $modulo) { // Load the routes for each of the modules - if (file_exists(__DIR__.'/'.$modulo.'/routes.php')) { + if (file_exists(__DIR__ . '/' . $modulo . '/routes.php')) { Route::group([ 'middleware' => 'web', 'namespace' => $modulo, ], function ($router) use ($modulo) { - require __DIR__.'/'.$modulo.'/routes.php'; + require __DIR__ . '/' . $modulo . '/routes.php'; }); } // Load the views - if (is_dir(__DIR__.'/'.$modulo.'/Views')) { - $this->loadViewsFrom(__DIR__.'/'.$modulo.'/Views', $modulo); + if (is_dir(__DIR__ . '/' . $modulo . '/Views')) { + $this->loadViewsFrom(__DIR__ . '/' . $modulo . '/Views', $modulo); } - if (is_dir(__DIR__.'/'.$modulo.'/Database/Migrations')) { - $this->loadMigrationsFrom(__DIR__.'/'.$modulo.'/Database/Migrations'); + if (is_dir(__DIR__ . '/' . $modulo . '/Database/Migrations')) { + $this->loadMigrationsFrom(__DIR__ . '/' . $modulo . '/Database/Migrations'); } } } From 783535f8af64a91cba69b63c353c3e13361523e1 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Fri, 25 May 2018 16:31:04 -0300 Subject: [PATCH 02/17] =?UTF-8?q?Removidas=20fun=C3=A7=C3=B5es=20depreciad?= =?UTF-8?q?as=20no=20PHP=207.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Academico/Repositories/DiplomaRepository.php | 13 +++++++++++-- .../Repositories/ListaSemturRepository.php | 3 +-- modulos/Core/Repository/BaseRepository.php | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modulos/Academico/Repositories/DiplomaRepository.php b/modulos/Academico/Repositories/DiplomaRepository.php index 563c8480..bc74a8c1 100644 --- a/modulos/Academico/Repositories/DiplomaRepository.php +++ b/modulos/Academico/Repositories/DiplomaRepository.php @@ -179,8 +179,17 @@ public function getPrintData(array $diplomas) return $retorno; } - private function ucwords_improved($s, $e = array()) + private function ucwords_improved($text, $ignore = array()) { - return join(' ', array_map(create_function('$s', 'return (!in_array($s, ' . var_export($e, true) . ')) ? ucfirst($s) : $s;'), explode(' ', strtolower($s)))); + $f = function ($word) use ($ignore) { + + if (in_array(strtolower($word), $ignore)) { + return strtolower($word); + } + + return ucfirst(strtolower($word)); + }; + + return join(' ', array_map($f, explode(' ', $text))); } } diff --git a/modulos/Academico/Repositories/ListaSemturRepository.php b/modulos/Academico/Repositories/ListaSemturRepository.php index d6dc7b82..a58afeb3 100644 --- a/modulos/Academico/Repositories/ListaSemturRepository.php +++ b/modulos/Academico/Repositories/ListaSemturRepository.php @@ -2,7 +2,6 @@ namespace Modulos\Academico\Repositories; -use Illuminate\Support\Facades\DB; use Modulos\Academico\Models\ListaSemtur; use Modulos\Core\Repository\BaseRepository; @@ -13,7 +12,7 @@ public function __construct(ListaSemtur $model) parent::__construct($model); } - public function paginateRequest(array $requestParameters = null) + public function paginateRequest(array $requestParameters = []) { $sort = []; if (!empty($requestParameters['field']) and !empty($requestParameters['sort'])) { diff --git a/modulos/Core/Repository/BaseRepository.php b/modulos/Core/Repository/BaseRepository.php index 7eef92c5..1570f4b4 100755 --- a/modulos/Core/Repository/BaseRepository.php +++ b/modulos/Core/Repository/BaseRepository.php @@ -93,7 +93,7 @@ public function paginate($sort = null, $search = null) return $result->paginate(15); } - public function paginateRequest(array $requestParameters = null) + public function paginateRequest(array $requestParameters = []) { $sort = []; if (!empty($requestParameters['field']) and !empty($requestParameters['sort'])) { From e88c42c1b8db70ad241cf33a547dcd2ddfd0f9c3 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 14:56:37 -0300 Subject: [PATCH 03/17] =?UTF-8?q?Revis=C3=A3o=20DiplomaRepository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/DiplomaRepository.php | 4 ++-- .../ListaSemturRepositoryTest.php | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modulos/Academico/Repositories/DiplomaRepository.php b/modulos/Academico/Repositories/DiplomaRepository.php index bc74a8c1..ff9cf036 100644 --- a/modulos/Academico/Repositories/DiplomaRepository.php +++ b/modulos/Academico/Repositories/DiplomaRepository.php @@ -181,7 +181,7 @@ public function getPrintData(array $diplomas) private function ucwords_improved($text, $ignore = array()) { - $f = function ($word) use ($ignore) { + $callback = function ($word) use ($ignore) { if (in_array(strtolower($word), $ignore)) { return strtolower($word); @@ -190,6 +190,6 @@ private function ucwords_improved($text, $ignore = array()) return ucfirst(strtolower($word)); }; - return join(' ', array_map($f, explode(' ', $text))); + return join(' ', array_map($callback, explode(' ', $text))); } } diff --git a/modulos/Academico/tests/Repositories/ListaSemturRepositoryTest.php b/modulos/Academico/tests/Repositories/ListaSemturRepositoryTest.php index 717dd155..c7cfcf8f 100644 --- a/modulos/Academico/tests/Repositories/ListaSemturRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/ListaSemturRepositoryTest.php @@ -23,7 +23,7 @@ public function testAllWithEmptyDatabase() $this->assertEquals(0, $response->count()); } - public function testvalidateMatricula() + public function testValidateMatricula() { $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); @@ -32,7 +32,7 @@ public function testvalidateMatricula() $this->assertEquals(false, $response); } - public function testvalidateMatriculaWithRg() + public function testValidateMatriculaWithRg() { $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); factory(\Modulos\Geral\Models\Documento::class)->create(['doc_pes_id' => $matricula->aluno->alu_pes_id, 'doc_tpd_id' => 1]); @@ -42,7 +42,7 @@ public function testvalidateMatriculaWithRg() $this->assertEquals(false, $response); } - public function testvalidateMatriculaWithRgAndCpf() + public function testValidateMatriculaWithRgAndCpf() { $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); factory(\Modulos\Geral\Models\Documento::class)->create(['doc_pes_id' => $matricula->aluno->alu_pes_id, 'doc_tpd_id' => 1]); @@ -53,7 +53,7 @@ public function testvalidateMatriculaWithRgAndCpf() $this->assertEquals(true, $response); } - public function testvalidateMatriculaWithoutCidade() + public function testValidateMatriculaWithoutCidade() { $pessoa = factory(\Modulos\Geral\Models\Pessoa::class)->create(['pes_cidade' => '']); $aluno = factory(\Modulos\Academico\Models\Aluno::class)->create(['alu_pes_id' => $pessoa->pes_id]); @@ -63,7 +63,7 @@ public function testvalidateMatriculaWithoutCidade() $this->assertEquals(false, $response); } - public function testvalidateMatriculaWithoutMae() + public function testValidateMatriculaWithoutMae() { $pessoa = factory(\Modulos\Geral\Models\Pessoa::class)->create(['pes_mae' => '']); $aluno = factory(\Modulos\Academico\Models\Aluno::class)->create(['alu_pes_id' => $pessoa->pes_id]); @@ -102,7 +102,7 @@ public function testPaginateRequestWithSearch() $this->assertGreaterThan(0, $response->total()); } - public function testgetTurmasByLista() + public function testGetTurmasByLista() { $lista = factory(ListaSemtur::class)->create(); $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(); @@ -116,7 +116,7 @@ public function testgetTurmasByLista() $this->assertEquals(10, count($response)); } - public function testgetPolosByLista() + public function testGetPolosByLista() { $lista = factory(ListaSemtur::class)->create(); $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(); @@ -130,7 +130,7 @@ public function testgetPolosByLista() $this->assertEquals(10, count($response)); } - public function testfindAll() + public function testFindAll() { $lista = factory(ListaSemtur::class)->create(); $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); @@ -142,7 +142,7 @@ public function testfindAll() $this->assertEquals(1, count($response)); } - public function testfindAllReturnEmpty() + public function testFindAllReturnEmpty() { $lista = factory(ListaSemtur::class)->create(); $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); @@ -154,7 +154,7 @@ public function testfindAllReturnEmpty() $this->assertEmpty($response); } - public function testgetMatriculasOutOfLista() + public function testGetMatriculasOutOfLista() { $lista = factory(ListaSemtur::class)->create(); $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); From 894d4605eb704fe7cc7082ceb6c6eb5d9edbee2b Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 15:09:28 -0300 Subject: [PATCH 04/17] =?UTF-8?q?Atualizadas=20depend=C3=AAncias=20para=20?= =?UTF-8?q?Laravel=205.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 14 +- composer.lock | 949 +++++++++++++++++++++++++++----------------------- 2 files changed, 518 insertions(+), 445 deletions(-) diff --git a/composer.json b/composer.json index f6b414fc..de74c6da 100755 --- a/composer.json +++ b/composer.json @@ -6,8 +6,8 @@ "type": "project", "require": { "php": ">=7.0.0", - "laravel/framework": "5.5.*", - "laravelcollective/html": "5.5.*", + "laravel/framework": "5.6.*", + "laravelcollective/html": "5.6.*", "stevebauman/eloquenttable": "1.1.*", "guzzlehttp/guzzle": "^6.2", "mpdf/mpdf": "^6.1", @@ -21,13 +21,13 @@ "filp/whoops": "^2.0", "mockery/mockery": "0.9.*", "symfony/css-selector": "3.1.*", - "symfony/dom-crawler": "3.1.*", - "phpunit/phpunit": "~6.0", - "phpunit/php-code-coverage": "^5.0", + "symfony/dom-crawler": "^4.0", + "phpunit/phpunit": "~7.0", + "phpunit/php-code-coverage": "^6.0", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.0", - "symfony/console": "~3.1", - "brianium/paratest": "^1.1", + "symfony/console": "^4.0", + "brianium/paratest": "~2.0", "codacy/coverage": "dev-master" }, "autoload": { diff --git a/composer.lock b/composer.lock index 9b450e04..0123a351 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "c233bf1011090a3b031d3c73eed6e985", + "content-hash": "784d7a44ff6f6585cae09f3e80bca6cc", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -323,16 +323,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.6.3", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13" + "reference": "11037b4352c008373561dc6fc836834eed80c3b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/e3eed9b1facbb0ced3a0995244843a189e7d1b13", - "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/11037b4352c008373561dc6fc836834eed80c3b5", + "reference": "11037b4352c008373561dc6fc836834eed80c3b5", "shasum": "" }, "require": { @@ -341,9 +341,11 @@ "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^5.4.6", + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0", "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5", - "symfony/console": "2.*||^3.0" + "symfony/console": "^2.0.5||^3.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -354,7 +356,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6.x-dev" + "dev-master": "2.7.x-dev" } }, "autoload": { @@ -392,7 +394,7 @@ "persistence", "queryobject" ], - "time": "2017-11-19T13:38:54+00:00" + "time": "2018-04-07T18:44:18+00:00" }, { "name": "doctrine/inflector", @@ -515,18 +517,67 @@ ], "time": "2014-09-09T13:34:57+00:00" }, + { + "name": "dragonmantank/cron-expression", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/3f00985deec8df53d4cc1e5c33619bda1ee309a5", + "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2018-04-06T15:51:55+00:00" + }, { "name": "egulias/email-validator", - "version": "2.1.3", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04" + "reference": "8790f594151ca6a2010c6218e09d96df67173ad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3", + "reference": "8790f594151ca6a2010c6218e09d96df67173ad3", "shasum": "" }, "require": { @@ -535,7 +586,7 @@ }, "require-dev": { "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", "satooshi/php-coveralls": "^1.0.1" }, "suggest": { @@ -570,7 +621,7 @@ "validation", "validator" ], - "time": "2017-11-15T23:40:40+00:00" + "time": "2018-04-10T10:11:19+00:00" }, { "name": "erusev/parsedown", @@ -620,16 +671,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.0", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -639,7 +690,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { @@ -648,7 +699,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.3-dev" } }, "autoload": { @@ -681,7 +732,7 @@ "rest", "web service" ], - "time": "2017-06-22T18:50:49+00:00" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", @@ -888,20 +939,20 @@ }, { "name": "jeremeamia/SuperClosure", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/jeremeamia/super_closure.git", - "reference": "443c3df3207f176a1b41576ee2a66968a507b3db" + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/443c3df3207f176a1b41576ee2a66968a507b3db", - "reference": "443c3df3207f176a1b41576ee2a66968a507b3db", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9", "shasum": "" }, "require": { - "nikic/php-parser": "^1.2|^2.0|^3.0", + "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0", "php": ">=5.4", "symfony/polyfill-php56": "^1.0" }, @@ -911,7 +962,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -942,47 +993,50 @@ "serialize", "tokenizer" ], - "time": "2016-12-07T09:37:55+00:00" + "time": "2018-03-21T22:21:57+00:00" }, { "name": "laravel/framework", - "version": "v5.5.39", + "version": "v5.6.23", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "a21ef7e51df831a7c38d24dcf8c4774ee0847526" + "reference": "f547f0a71a12763d1adb8493237d541c9e3a5d10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/a21ef7e51df831a7c38d24dcf8c4774ee0847526", - "reference": "a21ef7e51df831a7c38d24dcf8c4774ee0847526", + "url": "https://api.github.com/repos/laravel/framework/zipball/f547f0a71a12763d1adb8493237d541c9e3a5d10", + "reference": "f547f0a71a12763d1adb8493237d541c9e3a5d10", "shasum": "" }, "require": { "doctrine/inflector": "~1.1", + "dragonmantank/cron-expression": "~2.0", "erusev/parsedown": "~1.7", "ext-mbstring": "*", "ext-openssl": "*", - "league/flysystem": "~1.0", + "league/flysystem": "^1.0.8", "monolog/monolog": "~1.12", - "mtdowling/cron-expression": "~1.0", - "nesbot/carbon": "^1.24.1", - "php": ">=7.0", + "nesbot/carbon": "1.25.*", + "php": "^7.1.3", "psr/container": "~1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "~3.0", + "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "~6.0", - "symfony/console": "~3.3", - "symfony/debug": "~3.3", - "symfony/finder": "~3.3", - "symfony/http-foundation": "~3.3", - "symfony/http-kernel": "~3.3", - "symfony/process": "~3.3", - "symfony/routing": "~3.3", - "symfony/var-dumper": "~3.3", - "tijsverkoyen/css-to-inline-styles": "~2.2", + "symfony/console": "~4.0", + "symfony/debug": "~4.0", + "symfony/finder": "~4.0", + "symfony/http-foundation": "~4.0", + "symfony/http-kernel": "~4.0", + "symfony/process": "~4.0", + "symfony/routing": "~4.0", + "symfony/var-dumper": "~4.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.1", "vlucas/phpdotenv": "~2.2" }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", @@ -1011,44 +1065,46 @@ "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version", - "tightenco/collect": "<5.5.33" + "illuminate/view": "self.version" }, "require-dev": { "aws/aws-sdk-php": "~3.0", - "doctrine/dbal": "~2.5", + "doctrine/dbal": "~2.6", "filp/whoops": "^2.1.4", + "league/flysystem-cached-adapter": "~1.0", "mockery/mockery": "~1.0", - "orchestra/testbench-core": "3.5.*", + "moontoast/math": "^1.1", + "orchestra/testbench-core": "3.6.*", "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~6.0", + "phpunit/phpunit": "~7.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "~3.3", - "symfony/dom-crawler": "~3.3" + "symfony/css-selector": "~4.0", + "symfony/dom-crawler": "~4.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", "laravel/tinker": "Required to use the tinker console command (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0).", "nexmo/client": "Required to use the Nexmo transport (~1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~4.0).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -1076,20 +1132,20 @@ "framework", "laravel" ], - "time": "2018-03-09T17:24:53+00:00" + "time": "2018-05-22T14:55:57+00:00" }, { "name": "laravel/tinker", - "version": "v1.0.5", + "version": "v1.0.7", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41" + "reference": "e3086ee8cb1f54a39ae8dcb72d1c37d10128997d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/94f6daf2131508cebd11cd6f8632ba586d7ecc41", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41", + "url": "https://api.github.com/repos/laravel/tinker/zipball/e3086ee8cb1f54a39ae8dcb72d1c37d10128997d", + "reference": "e3086ee8cb1f54a39ae8dcb72d1c37d10128997d", "shasum": "" }, "require": { @@ -1097,7 +1153,7 @@ "illuminate/contracts": "~5.1", "illuminate/support": "~5.1", "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*", + "psy/psysh": "0.7.*|0.8.*|0.9.*", "symfony/var-dumper": "~3.0|~4.0" }, "require-dev": { @@ -1139,38 +1195,40 @@ "laravel", "psysh" ], - "time": "2018-03-06T17:34:36+00:00" + "time": "2018-05-17T13:42:07+00:00" }, { "name": "laravelcollective/html", - "version": "v5.5.3", + "version": "v5.6.8", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "b79edc7acf574144c9811277286b4cafee8a07cc" + "reference": "42c0854e00d6bb3346883d122b444fbf15a13ecb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/b79edc7acf574144c9811277286b4cafee8a07cc", - "reference": "b79edc7acf574144c9811277286b4cafee8a07cc", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/42c0854e00d6bb3346883d122b444fbf15a13ecb", + "reference": "42c0854e00d6bb3346883d122b444fbf15a13ecb", "shasum": "" }, "require": { - "illuminate/http": "5.5.*", - "illuminate/routing": "5.5.*", - "illuminate/session": "5.5.*", - "illuminate/support": "5.5.*", - "illuminate/view": "5.5.*", - "php": ">=7.0.0" + "illuminate/http": "5.6.*", + "illuminate/routing": "5.6.*", + "illuminate/session": "5.6.*", + "illuminate/support": "5.6.*", + "illuminate/view": "5.6.*", + "php": ">=7.1.3" }, "require-dev": { - "illuminate/database": "5.5.*", - "mockery/mockery": "~0.9.4", - "phpunit/phpunit": "~5.4" + "illuminate/database": "5.6.*", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~7.1" }, "type": "library", "extra": { - "branch-alias": [], + "branch-alias": { + "dev-master": "5.6-dev" + }, "laravel": { "providers": [ "Collective\\Html\\HtmlServiceProvider" @@ -1205,20 +1263,20 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2018-02-12T14:19:55+00:00" + "time": "2018-05-10T17:15:15+00:00" }, { "name": "league/flysystem", - "version": "1.0.43", + "version": "1.0.45", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "1ce7cc142d906ba58dc54c82915d355a9191c8a8" + "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1ce7cc142d906ba58dc54c82915d355a9191c8a8", - "reference": "1ce7cc142d906ba58dc54c82915d355a9191c8a8", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a99f94e63b512d75f851b181afcdf0ee9ebef7e6", + "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6", "shasum": "" }, "require": { @@ -1289,20 +1347,20 @@ "sftp", "storage" ], - "time": "2018-03-01T10:27:04+00:00" + "time": "2018-05-07T08:44:23+00:00" }, { "name": "maatwebsite/excel", - "version": "2.1.27", + "version": "2.1.28", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "ea758fe5a9d33e0d88b40f099d1df652a0c99d38" + "reference": "06e397a30595d1082963d6aa5ec0c3a9961d70c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/ea758fe5a9d33e0d88b40f099d1df652a0c99d38", - "reference": "ea758fe5a9d33e0d88b40f099d1df652a0c99d38", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/06e397a30595d1082963d6aa5ec0c3a9961d70c8", + "reference": "06e397a30595d1082963d6aa5ec0c3a9961d70c8", "shasum": "" }, "require": { @@ -1367,7 +1425,7 @@ "import", "laravel" ], - "time": "2018-03-09T13:14:19+00:00" + "time": "2018-05-09T14:34:18+00:00" }, { "name": "monolog/monolog", @@ -1498,62 +1556,18 @@ ], "time": "2016-12-12T10:42:18+00:00" }, - { - "name": "mtdowling/cron-expression", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "time": "2017-01-23T04:29:33+00:00" - }, { "name": "nesbot/carbon", - "version": "1.24.2", + "version": "1.25.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bba6c6e410c6b4317e37a9474aeaa753808c3875" + "reference": "cbcf13da0b531767e39eb86e9687f5deba9857b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bba6c6e410c6b4317e37a9474aeaa753808c3875", - "reference": "bba6c6e410c6b4317e37a9474aeaa753808c3875", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cbcf13da0b531767e39eb86e9687f5deba9857b4", + "reference": "cbcf13da0b531767e39eb86e9687f5deba9857b4", "shasum": "" }, "require": { @@ -1593,28 +1607,28 @@ "datetime", "time" ], - "time": "2018-03-10T10:10:14+00:00" + "time": "2018-03-19T15:50:49+00:00" }, { "name": "nikic/php-parser", - "version": "v3.1.5", + "version": "v4.0.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" + "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", + "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.5" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" @@ -1622,7 +1636,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1644,20 +1658,20 @@ "parser", "php" ], - "time": "2018-02-28T20:30:58+00:00" + "time": "2018-03-25T17:35:16+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.11", + "version": "v2.0.12", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", "shasum": "" }, "require": { @@ -1692,7 +1706,7 @@ "pseudorandom", "random" ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2018-04-04T21:24:14+00:00" }, { "name": "phpoffice/phpexcel", @@ -1948,30 +1962,30 @@ }, { "name": "psy/psysh", - "version": "v0.8.17", + "version": "v0.9.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec" + "reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", - "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4d969a0e08e1e05e7207c07cb4207017ecc9a331", + "reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1", "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0", - "php": ">=5.3.9", + "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", + "php": ">=5.4.0", "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { - "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "symfony/finder": "~2.1|~3.0|~4.0" + "bamarni/composer-bin-plugin": "^1.2", + "hoa/console": "~2.15|~3.16", + "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -1986,15 +2000,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.8.x-dev" + "dev-develop": "0.9.x-dev" } }, "autoload": { "files": [ - "src/Psy/functions.php" + "src/functions.php" ], "psr-4": { - "Psy\\": "src/Psy/" + "Psy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2016,7 +2030,7 @@ "interactive", "shell" ], - "time": "2017-12-28T16:14:16+00:00" + "time": "2018-05-22T06:48:07+00:00" }, { "name": "ramsey/uuid", @@ -2248,21 +2262,20 @@ }, { "name": "symfony/console", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7" + "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/067339e9b8ec30d5f19f5950208893ff026b94f7", - "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7", + "url": "https://api.github.com/repos/symfony/console/zipball/058f120b8e06ebcd7b211de5ffae07b2db00fbdd", + "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -2271,14 +2284,14 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", + "symfony/config": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" + "symfony/process": "~3.4|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" @@ -2286,7 +2299,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2313,7 +2326,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-02-26T15:46:28+00:00" + "time": "2018-05-16T09:05:32+00:00" }, { "name": "symfony/css-selector", @@ -2370,32 +2383,32 @@ }, { "name": "symfony/debug", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc" + "reference": "4e7c98de67cc4171d4c986554e09a511da40f3d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/9b1071f86e79e1999b3d3675d2e0e7684268b9bc", - "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc", + "url": "https://api.github.com/repos/symfony/debug/zipball/4e7c98de67cc4171d4c986554e09a511da40f3d8", + "reference": "4e7c98de67cc4171d4c986554e09a511da40f3d8", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2422,20 +2435,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-02-28T21:49:22+00:00" + "time": "2018-05-16T09:05:32+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428" + "reference": "63353a71073faf08f62caab4e6889b06a787f07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/85eaf6a8ec915487abac52e133efc4a268204428", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", + "reference": "63353a71073faf08f62caab4e6889b06a787f07b", "shasum": "" }, "require": { @@ -2485,29 +2498,29 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-02-14T14:11:10+00:00" + "time": "2018-04-06T07:35:43+00:00" }, { "name": "symfony/finder", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625" + "reference": "8c633f5a815903a1fe6e3fc135f207267a8a79af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a479817ce0a9e4adfd7d39c6407c95d97c254625", - "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625", + "url": "https://api.github.com/repos/symfony/finder/zipball/8c633f5a815903a1fe6e3fc135f207267a8a79af", + "reference": "8c633f5a815903a1fe6e3fc135f207267a8a79af", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2534,34 +2547,33 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-03-05T18:28:11+00:00" + "time": "2018-05-16T09:05:32+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "6f5935723c11b4125fc9927db6ad2feaa196e175" + "reference": "277b757a2d3960170d99d372e171a8a18916467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6f5935723c11b4125fc9927db6ad2feaa196e175", - "reference": "6f5935723c11b4125fc9927db6ad2feaa196e175", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/277b757a2d3960170d99d372e171a8a18916467a", + "reference": "277b757a2d3960170d99d372e171a8a18916467a", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php70": "~1.6" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0|~4.0" + "symfony/expression-language": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2588,33 +2600,34 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:48:49+00:00" + "time": "2018-05-25T11:08:56+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "a443bbbd93682aa08e623fade4c94edd586ed2de" + "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a443bbbd93682aa08e623fade4c94edd586ed2de", - "reference": "a443bbbd93682aa08e623fade4c94edd586ed2de", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/450a1bda817f2dce25a9e13f0f011336743f2a48", + "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0", - "symfony/debug": "~2.8|~3.0|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "^3.4.4|^4.0.4" + "symfony/debug": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/http-foundation": "~3.4.4|~4.0.4", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/config": "<2.8", + "symfony/config": "<3.4", "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", - "symfony/var-dumper": "<3.3", + "symfony/var-dumper": "<3.4", "twig/twig": "<1.34|<2.4,>=2" }, "provide": { @@ -2622,34 +2635,32 @@ }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0|~4.0", - "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/console": "~2.8|~3.0|~4.0", - "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/browser-kit": "~3.4|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/css-selector": "~3.4|~4.0", "symfony/dependency-injection": "^3.4.5|^4.0.5", - "symfony/dom-crawler": "~2.8|~3.0|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/process": "~2.8|~3.0|~4.0", + "symfony/dom-crawler": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0", - "symfony/templating": "~2.8|~3.0|~4.0", - "symfony/translation": "~2.8|~3.0|~4.0", - "symfony/var-dumper": "~3.3|~4.0" + "symfony/stopwatch": "~3.4|~4.0", + "symfony/templating": "~3.4|~4.0", + "symfony/translation": "~3.4|~4.0", + "symfony/var-dumper": "~3.4|~4.0" }, "suggest": { "symfony/browser-kit": "", "symfony/config": "", "symfony/console": "", "symfony/dependency-injection": "", - "symfony/finder": "", "symfony/var-dumper": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2676,20 +2687,75 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-03-05T19:41:07+00:00" + "time": "2018-05-25T13:32:52+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-04-30T19:57:29+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "reference": "3296adf6a6454a050679cde90f95350ad604b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { @@ -2701,7 +2767,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2735,20 +2801,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php56", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "ebc999ce5f14204c5150b9bd15f8f04e621409d8" + "reference": "af98553c84912459db3f636329567809d639a8f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ebc999ce5f14204c5150b9bd15f8f04e621409d8", - "reference": "ebc999ce5f14204c5150b9bd15f8f04e621409d8", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/af98553c84912459db3f636329567809d639a8f6", + "reference": "af98553c84912459db3f636329567809d639a8f6", "shasum": "" }, "require": { @@ -2758,7 +2824,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2791,41 +2857,37 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.7.0", + "name": "symfony/polyfill-php72", + "version": "v1.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0", "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" + "Symfony\\Polyfill\\Php72\\": "" }, "files": [ "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2842,7 +2904,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2850,20 +2912,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "e17c808ec4228026d4f5a8832afa19be85979563" + "reference": "1a5ad95d9436cbff3296034fe9f8d586dce3fb3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/e17c808ec4228026d4f5a8832afa19be85979563", - "reference": "e17c808ec4228026d4f5a8832afa19be85979563", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/1a5ad95d9436cbff3296034fe9f8d586dce3fb3a", + "reference": "1a5ad95d9436cbff3296034fe9f8d586dce3fb3a", "shasum": "" }, "require": { @@ -2872,7 +2934,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2902,29 +2964,29 @@ "polyfill", "shim" ], - "time": "2018-01-31T18:08:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cc4aea21f619116aaf1c58016a944e4821c8e8af" + "reference": "3621fa74d0576a6f89d63bc44fabd376711bd0b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cc4aea21f619116aaf1c58016a944e4821c8e8af", - "reference": "cc4aea21f619116aaf1c58016a944e4821c8e8af", + "url": "https://api.github.com/repos/symfony/process/zipball/3621fa74d0576a6f89d63bc44fabd376711bd0b0", + "reference": "3621fa74d0576a6f89d63bc44fabd376711bd0b0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2951,38 +3013,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-02-12T17:55:00+00:00" + "time": "2018-05-16T09:05:32+00:00" }, { "name": "symfony/routing", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "8773a9d52715f1a579576ce0e60213de34f5ef3e" + "reference": "e8833b64b139926cbe1610d53722185e55c18e44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/8773a9d52715f1a579576ce0e60213de34f5ef3e", - "reference": "8773a9d52715f1a579576ce0e60213de34f5ef3e", + "url": "https://api.github.com/repos/symfony/routing/zipball/e8833b64b139926cbe1610d53722185e55c18e44", + "reference": "e8833b64b139926cbe1610d53722185e55c18e44", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "conflict": { - "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", "symfony/yaml": "<3.4" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -2996,7 +3058,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3029,20 +3091,20 @@ "uri", "url" ], - "time": "2018-02-28T21:49:22+00:00" + "time": "2018-05-16T14:21:07+00:00" }, { "name": "symfony/translation", - "version": "v4.0.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" + "reference": "e1f5863d0a9e79cfec7f031421ced3fe1d403e66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", + "url": "https://api.github.com/repos/symfony/translation/zipball/e1f5863d0a9e79cfec7f031421ced3fe1d403e66", + "reference": "e1f5863d0a9e79cfec7f031421ced3fe1d403e66", "shasum": "" }, "require": { @@ -3063,7 +3125,7 @@ "symfony/yaml": "~3.4|~4.0" }, "suggest": { - "psr/log": "To use logging capability in translator", + "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" }, @@ -3097,25 +3159,26 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-05-21T10:09:47+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.4.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "80964679d81da3d5618519e0e4be488c3d7ecd7d" + "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/80964679d81da3d5618519e0e4be488c3d7ecd7d", - "reference": "80964679d81da3d5618519e0e4be488c3d7ecd7d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3c34cf3f4bbac9e003d9325225e9ef1a49180a18", + "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" }, "conflict": { "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" @@ -3126,13 +3189,12 @@ }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "ext-symfony_debug": "" + "ext-intl": "To show region name in time zone dump" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3166,7 +3228,7 @@ "debug", "dump" ], - "time": "2018-02-22T17:29:24+00:00" + "time": "2018-04-26T16:12:06+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3310,16 +3372,16 @@ }, { "name": "brianium/paratest", - "version": "1.1.0", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "30f01dff874f9a5dd0b0651bca6384888030d47b" + "reference": "57eab83115294c2fa513d02e69b557fd9391938c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/30f01dff874f9a5dd0b0651bca6384888030d47b", - "reference": "30f01dff874f9a5dd0b0651bca6384888030d47b", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/57eab83115294c2fa513d02e69b557fd9391938c", + "reference": "57eab83115294c2fa513d02e69b557fd9391938c", "shasum": "" }, "require": { @@ -3328,9 +3390,10 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "php": ">=7.0", - "phpunit/php-timer": "^1.0.4", - "phpunit/phpunit": "^6.0.13", + "php": ">=7.1", + "phpunit/php-code-coverage": "^6.0", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit": "^7.0", "symfony/console": "^3.4|^4.0", "symfony/process": "^3.4|^4.0" }, @@ -3361,14 +3424,14 @@ } ], "description": "Parallel testing for PHP", - "homepage": "https://github.com/brianium/paratest", + "homepage": "https://github.com/paratestphp/paratest", "keywords": [ "concurrent", "parallel", "phpunit", "testing" ], - "time": "2018-01-18T12:09:16+00:00" + "time": "2018-04-12T09:40:56+00:00" }, { "name": "codacy/coverage", @@ -3376,12 +3439,12 @@ "source": { "type": "git", "url": "https://github.com/codacy/php-codacy-coverage.git", - "reference": "546ac2e000a004571c1000ecff4d68a98706db3a" + "reference": "629d1fd597f91fb072bd822830059fd5145ce49a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/codacy/php-codacy-coverage/zipball/546ac2e000a004571c1000ecff4d68a98706db3a", - "reference": "546ac2e000a004571c1000ecff4d68a98706db3a", + "url": "https://api.github.com/repos/codacy/php-codacy-coverage/zipball/629d1fd597f91fb072bd822830059fd5145ce49a", + "reference": "629d1fd597f91fb072bd822830059fd5145ce49a", "shasum": "" }, "require": { @@ -3413,7 +3476,7 @@ ], "description": "Sends PHP test coverage information to Codacy.", "homepage": "https://github.com/codacy/php-codacy-coverage", - "time": "2017-12-20T14:31:46+00:00" + "time": "2018-04-30T16:23:12+00:00" }, { "name": "composer/semver", @@ -3594,16 +3657,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.10.4", + "version": "v2.11.1", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "b2dce1dacff988b79c4aadf252e5dee31bc04e19" + "reference": "ad94441c17b8ef096e517acccdbf3238af8a2da8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/b2dce1dacff988b79c4aadf252e5dee31bc04e19", - "reference": "b2dce1dacff988b79c4aadf252e5dee31bc04e19", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ad94441c17b8ef096e517acccdbf3238af8a2da8", + "reference": "ad94441c17b8ef096e517acccdbf3238af8a2da8", "shasum": "" }, "require": { @@ -3612,7 +3675,7 @@ "ext-json": "*", "ext-tokenizer": "*", "php": "^5.6 || >=7.0 <7.3", - "php-cs-fixer/diff": "^1.2", + "php-cs-fixer/diff": "^1.3", "symfony/console": "^3.2 || ^4.0", "symfony/event-dispatcher": "^3.0 || ^4.0", "symfony/filesystem": "^3.0 || ^4.0", @@ -3633,7 +3696,7 @@ "mikey179/vfsstream": "^1.6", "php-coveralls/php-coveralls": "^2.0", "php-cs-fixer/accessible-object": "^1.0", - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", "phpunitgoodpractices/traits": "^1.3.1", "symfony/phpunit-bridge": "^3.2.2 || ^4.0" }, @@ -3645,6 +3708,11 @@ "php-cs-fixer" ], "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.11-dev" + } + }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" @@ -3655,6 +3723,8 @@ "tests/Test/AbstractIntegrationTestCase.php", "tests/Test/Assert/AssertTokensTrait.php", "tests/Test/Constraint/SameStringsConstraint.php", + "tests/Test/Constraint/SameStringsConstraintForV5.php", + "tests/Test/Constraint/SameStringsConstraintForV7.php", "tests/Test/IntegrationCase.php", "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", @@ -3677,7 +3747,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-03-08T11:13:12+00:00" + "time": "2018-03-21T17:41:26+00:00" }, { "name": "fzaninotto/faker", @@ -3731,16 +3801,16 @@ }, { "name": "gitonomy/gitlib", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/gitonomy/gitlib.git", - "reference": "1c2b0605115786613cb517798046c8ab57c17097" + "reference": "932a960221ae3484a3e82553b3be478e56beb68d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/1c2b0605115786613cb517798046c8ab57c17097", - "reference": "1c2b0605115786613cb517798046c8ab57c17097", + "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/932a960221ae3484a3e82553b3be478e56beb68d", + "reference": "932a960221ae3484a3e82553b3be478e56beb68d", "shasum": "" }, "require": { @@ -3783,7 +3853,7 @@ ], "description": "Library for accessing git", "homepage": "http://gitonomy.com", - "time": "2018-01-10T11:34:47+00:00" + "time": "2018-04-22T19:55:36+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -4247,23 +4317,23 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -4306,44 +4376,44 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.0", + "version": "6.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" + "reference": "4cab20a326d14de7575a8e235c70d879b569a57a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4cab20a326d14de7575a8e235c70d879b569a57a", + "reference": "4cab20a326d14de7575a8e235c70d879b569a57a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", + "php": "^7.1", "phpunit/php-file-iterator": "^1.4.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -4369,7 +4439,7 @@ "testing", "xunit" ], - "time": "2017-12-06T09:29:45+00:00" + "time": "2018-05-28T11:49:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4461,28 +4531,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -4497,7 +4567,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -4506,33 +4576,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4555,20 +4625,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.7", + "version": "7.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6bd77b57707c236833d2b57b968e403df060c9d9" + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6bd77b57707c236833d2b57b968e403df060c9d9", - "reference": "6bd77b57707c236833d2b57b968e403df060c9d9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", "shasum": "" }, "require": { @@ -4580,15 +4650,15 @@ "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", - "php": "^7.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", + "phpunit/php-code-coverage": "^6.0.1", "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.5", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", @@ -4596,16 +4666,12 @@ "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -4613,7 +4679,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -4639,33 +4705,30 @@ "testing", "xunit" ], - "time": "2018-02-26T07:01:09+00:00" + "time": "2018-04-29T15:09:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "5.0.6", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", - "php": "^7.0", + "php": "^7.1", "phpunit/php-text-template": "^1.2.1", "sebastian/exporter": "^3.1" }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, "require-dev": { - "phpunit/phpunit": "^6.5" + "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" @@ -4673,7 +4736,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -4698,7 +4761,7 @@ "mock", "xunit" ], - "time": "2018-01-06T05:45:45+00:00" + "time": "2018-04-11T04:50:36+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4747,30 +4810,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4807,32 +4870,33 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4857,9 +4921,12 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", @@ -5339,24 +5406,25 @@ }, { "name": "symfony/dom-crawler", - "version": "v3.1.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "7eede2a901a19928494194f7d1815a77b9a473a0" + "reference": "cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7eede2a901a19928494194f7d1815a77b9a473a0", - "reference": "7eede2a901a19928494194f7d1815a77b9a473a0", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1", + "reference": "cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/css-selector": "~2.8|~3.0" + "symfony/css-selector": "~3.4|~4.0" }, "suggest": { "symfony/css-selector": "" @@ -5364,7 +5432,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5391,24 +5459,25 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-01-21T17:13:55+00:00" + "time": "2018-05-01T23:00:51+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", + "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { @@ -5440,20 +5509,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-05-16T09:05:32+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0" + "reference": "ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/371532a2cfe932f7a3766dd4c45364566def1dd0", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2", + "reference": "ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2", "shasum": "" }, "require": { @@ -5494,37 +5563,41 @@ "configuration", "options" ], - "time": "2018-01-18T22:19:33+00:00" + "time": "2018-05-11T15:58:37+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.7.0", + "name": "symfony/polyfill-php70", + "version": "v1.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", "shasum": "" }, "require": { + "paragonie/random_compat": "~1.0|~2.0", "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" + "Symfony\\Polyfill\\Php70\\": "" }, "files": [ "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5541,7 +5614,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -5549,11 +5622,11 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.0.6", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", From ed0ec4158c5dac2189b4c28cf3114fcccc4d5aa7 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 15:13:36 -0300 Subject: [PATCH 05/17] =?UTF-8?q?Remo=C3=A7=C3=A3o=20comando=20'optimize'?= =?UTF-8?q?=20do=20arquivo=20Composer.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index de74c6da..72b5ff2e 100755 --- a/composer.json +++ b/composer.json @@ -58,13 +58,11 @@ ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", - "php artisan optimize", "chmod +x fixcode", "bash bin/setup.sh" ], "post-update-cmd": [ - "Illuminate\\Foundation\\ComposerScripts::postUpdate", - "php artisan optimize" + "Illuminate\\Foundation\\ComposerScripts::postUpdate" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", From 384bd4d926566416f792c0592f06aa24e523028e Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 15:20:57 -0300 Subject: [PATCH 06/17] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=20nos=20testes=20pa?= =?UTF-8?q?ra=20PHPUnit=207+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ModulosTestCase.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/ModulosTestCase.php b/tests/ModulosTestCase.php index 5a74b6e7..94426379 100644 --- a/tests/ModulosTestCase.php +++ b/tests/ModulosTestCase.php @@ -43,8 +43,15 @@ protected function assertDatabaseHas($table, array $data, $connection = null) /** * @see TestCase::assertEquals() + * @param $expected + * @param $actual + * @param string $message + * @param float $delta + * @param int $maxDepth + * @param bool $canonicalize + * @param bool $ignoreCase */ - public static function assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) + public static function assertEquals($expected, $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void { /* * Previne erros causados pela diferenca de tempo From 737b75d48c4da1a4affd09928d8670ab24623ea9 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 17:42:04 -0300 Subject: [PATCH 07/17] =?UTF-8?q?Revis=C3=A3o=20testes=20unit=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/factories/ModelFactory.php | 11 ++- .../HistoricoDefinitivoRepositorytTest.php | 4 +- .../Repositories/LivroRepositorytTest.php | 18 ++--- .../MatriculaCursoRepositoryTest.php | 18 ++--- .../MatriculaOfertaDisciplinaTest.php | 67 ++++++++++++------- .../ModuloDisciplinaRepositoryTest.php | 3 +- .../Repositories/TutorGrupoRepositoryTest.php | 32 ++++++--- modulos/Core/Repository/BaseRepository.php | 4 +- .../Repositories/PessoaRepositoryTest.php | 2 + modulos/ModulosEventServiceProvider.php | 1 - tests/ModulosTestCase.php | 4 ++ 11 files changed, 102 insertions(+), 62 deletions(-) diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index a9314036..038a82ca 100755 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -10,7 +10,7 @@ 'pes_nascimento' => $faker->date('d/m/Y'), 'pes_mae' => $faker->name, 'pes_pai' => $faker->name, - 'pes_estado_civil' => $faker->randomElement(['solteiro', 'casado', 'divorciado', 'viuvo(a)', 'uniao_estavel']), + 'pes_estado_civil' => $faker->randomElement(['solteiro', 'casado', 'divorciado', 'viuvo(a)', 'uniao_estavel', 'outros']), 'pes_naturalidade' => $faker->city, 'pes_nacionalidade' => $faker->country, 'pes_raca' => $faker->randomElement(['branco', 'negro', 'amarelo']), @@ -311,7 +311,7 @@ return [ 'ttg_tut_id' => $tutor->tut_id, 'ttg_grp_id' => $grupo->grp_id, - 'ttg_tipo_tutoria' => $faker->randomElement($array = array('presencial', 'distancia')), + 'ttg_tipo_tutoria' => $faker->randomElement(['presencial', 'distancia']), 'ttg_data_inicio' => '10/11/2010', 'ttg_data_fim' => null ]; @@ -547,7 +547,12 @@ 'min_id_nota2' => $faker->numberBetween(0, 10), 'min_id_nota3' => $faker->numberBetween(0, 10), 'min_id_recuperacao' => $faker->numberBetween(0, 5), - 'min_id_conceito' => $faker->randomElement(['aprovado', 'aprovado_final', 'reprovado', 'reprovado_final']), + 'min_id_conceito' => $faker->randomElement([ + 'aprovado_media', + 'aprovado_final', + 'reprovado_media', + 'reprovado_final' + ]), 'min_id_final' => $faker->numberBetween(0, 10), 'min_id_aproveitamento' => $faker->numberBetween(0, 10) ]; diff --git a/modulos/Academico/tests/Repositories/HistoricoDefinitivoRepositorytTest.php b/modulos/Academico/tests/Repositories/HistoricoDefinitivoRepositorytTest.php index f775a9fb..324fe002 100644 --- a/modulos/Academico/tests/Repositories/HistoricoDefinitivoRepositorytTest.php +++ b/modulos/Academico/tests/Repositories/HistoricoDefinitivoRepositorytTest.php @@ -90,7 +90,7 @@ public function testGetGradeCurricularByMatricula() 'mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'aprovado' + 'mof_situacao_matricula' => 'aprovado_media' ]); $rg = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000']); @@ -203,7 +203,7 @@ public function mockGradeCurricular($comTitulacao = false) 'mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'aprovado' + 'mof_situacao_matricula' => 'aprovado_media' ]); $lancamentoTcc = factory(\Modulos\Academico\Models\LancamentoTcc::class)->create([ diff --git a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php index 32e22ad0..14f09639 100644 --- a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php +++ b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php @@ -79,13 +79,15 @@ public function testLists() public function testSearch() { - $entries = factory(Livro::class, 2)->create(); + $entries = factory(Livro::class, 2)->create([ + 'liv_tipo_livro' => 'CERTIFICADO' + ]); factory(Livro::class)->create([ - 'liv_tipo_livro' => 'search_tipo_livro' + 'liv_tipo_livro' => 'DIPLOMA' ]); - $searchResult = $this->repo->search(array(['liv_tipo_livro', '=', 'search_tipo_livro'])); + $searchResult = $this->repo->search(array(['liv_tipo_livro', '=', 'DIPLOMA'])); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -96,7 +98,7 @@ public function testSearchWithSelect() factory(Livro::class, 2)->create(); $entry = factory(Livro::class)->create([ - 'liv_tipo_livro' => "tipo_livro_to_find" + 'liv_tipo_livro' => "CERTIFICADO" ]); $expected = [ @@ -104,7 +106,7 @@ public function testSearchWithSelect() 'liv_tipo_livro' => $entry->liv_tipo_livro ]; - $searchResult = $this->repo->search(array(['liv_tipo_livro', '=', "tipo_livro_to_find"]), ['liv_id', 'liv_tipo_livro']); + $searchResult = $this->repo->search(array(['liv_tipo_livro', '=', "CERTIFICADO"]), ['liv_id', 'liv_tipo_livro']); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -168,21 +170,21 @@ public function testPaginateWithSearch() { factory(Livro::class, 2)->create(); factory(Livro::class)->create([ - 'liv_tipo_livro' => 'livro_to_search', + 'liv_tipo_livro' => 'CERTIFICADO', ]); $search = [ [ 'field' => 'liv_tipo_livro', 'type' => '=', - 'term' => 'livro_to_search' + 'term' => 'CERTIFICADO' ] ]; $response = $this->repo->paginate(null, $search); $this->assertInstanceOf(LengthAwarePaginator::class, $response); $this->assertGreaterThan(0, $response->total()); - $this->assertEquals('livro_to_search', $response->first()->liv_tipo_livro); + $this->assertEquals('CERTIFICADO', $response->first()->liv_tipo_livro); } public function testPaginateRequest() diff --git a/modulos/Academico/tests/Repositories/MatriculaCursoRepositoryTest.php b/modulos/Academico/tests/Repositories/MatriculaCursoRepositoryTest.php index d818d5a8..3f5f3163 100755 --- a/modulos/Academico/tests/Repositories/MatriculaCursoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/MatriculaCursoRepositoryTest.php @@ -128,7 +128,7 @@ public function testUpdate() $data = $entry->toArray(); $data['mat_modo_entrada'] = $entry->getOriginal('mat_modo_entrada'); - $data['mat_situacao'] = 'Evadido'; + $data['mat_situacao'] = 'evadido'; $return = $this->repo->update($data, $id); $data['mat_data_conclusao'] = $entry->getOriginal('mat_data_conclusao'); @@ -171,10 +171,10 @@ public function testSearch() $entries = factory(\Modulos\Academico\Models\Matricula::class, 2)->create(); factory(\Modulos\Academico\Models\Matricula::class)->create([ - 'mat_situacao' => 'search_mat_situacao' + 'mat_situacao' => 'desistente' ]); - $searchResult = $this->repo->search(array(['mat_situacao', '=', 'search_mat_situacao'])); + $searchResult = $this->repo->search(array(['mat_situacao', '=', 'desistente'])); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -185,7 +185,7 @@ public function testSearchWithSelect() factory(\Modulos\Academico\Models\Matricula::class, 2)->create(); $entry = factory(\Modulos\Academico\Models\Matricula::class)->create([ - 'mat_situacao' => "mat_situacao_to_find" + 'mat_situacao' => "desistente" ]); $expected = [ @@ -193,7 +193,7 @@ public function testSearchWithSelect() 'mat_situacao' => $entry->mat_situacao ]; - $searchResult = $this->repo->search(array(['mat_situacao', '=', "mat_situacao_to_find"]), ['mat_id', 'mat_situacao']); + $searchResult = $this->repo->search(array(['mat_situacao', '=', "desistente"]), ['mat_id', 'mat_situacao']); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -257,21 +257,21 @@ public function testPaginateWithSearch() { factory(\Modulos\Academico\Models\Matricula::class, 2)->create(); factory(\Modulos\Academico\Models\Matricula::class)->create([ - 'mat_situacao' => 'mat_situacao_to_search', + 'mat_situacao' => 'desistente', ]); $search = [ [ 'field' => 'mat_situacao', 'type' => '=', - 'term' => 'mat_situacao_to_search' + 'term' => 'desistente' ] ]; $response = $this->repo->paginate(null, $search); $this->assertInstanceOf(LengthAwarePaginator::class, $response); $this->assertGreaterThan(0, $response->total()); - $this->assertEquals('mat_situacao_to_search', $response->first()->mat_situacao); + $this->assertEquals('desistente', $response->first()->mat_situacao); } public function testPaginateRequest() @@ -828,7 +828,7 @@ public function testFindMatriculaIdByTurmaAluno() 'mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'aprovado' + 'mof_situacao_matricula' => 'aprovado_media' ]); //Com matricula em TCC diff --git a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php index 85f123e8..95a36dba 100755 --- a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php +++ b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php @@ -30,7 +30,8 @@ public function testCreate() $response = $this->repo->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'cursando']); + 'mof_situacao_matricula' => 'cursando' + ]); $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $response); @@ -141,21 +142,21 @@ public function testPaginateWithSort() public function testPaginateWithSearch() { $entry = factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_tipo_matricula' => 'matriculacomun' + 'mof_tipo_matricula' => 'matriculacomum' ]); $search = [ [ 'field' => 'mof_tipo_matricula', 'type' => '=', - 'term' => 'matriculacomun' + 'term' => 'matriculacomum' ] ]; $response = $this->repo->paginate(null, $search); $this->assertInstanceOf(LengthAwarePaginator::class, $response); $this->assertGreaterThan(0, $response->total()); - $this->assertEquals('matriculacomun', $response->first()->mof_tipo_matricula); + $this->assertEquals('matriculacomum', $response->first()->mof_tipo_matricula); } public function testgetAllAlunosBySituacaoWithDoc() @@ -165,9 +166,25 @@ public function testgetAllAlunosBySituacaoWithDoc() $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'cursando']); - $rg = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000']); - $cpf = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 1, 'doc_conteudo' => '123456']); + factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplina, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'cursando' + ]); + + $rg = $this->docrepo->create([ + 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, + 'doc_tpd_id' => 2, + 'doc_conteudo' => '123456', + 'doc_data_expedicao' => '10/10/2000' + ]); + + $cpf = $this->docrepo->create([ + 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, + 'doc_tpd_id' => 1, + 'doc_conteudo' => '123456' + ]); $polo = $matricula->mat_pol_id; } @@ -183,7 +200,7 @@ public function testgetAllAlunosBySituacaoWithoutDoc() $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'cursando']); + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); $polo = $matricula->mat_pol_id; } @@ -215,11 +232,11 @@ public function testUpdate() $matriculaOferta->mof_nota3 = 7; $response = $this->repo->update(['mof_nota1' => 7, - 'mof_nota2' => 7, - 'mof_nota3' => 7, - 'mof_final' => '', - 'mof_recuperacao' => '', - 'mof_conceito'=> null], $matriculaOferta->mof_id); + 'mof_nota2' => 7, + 'mof_nota3' => 7, + 'mof_final' => '', + 'mof_recuperacao' => '', + 'mof_conceito' => null], $matriculaOferta->mof_id); $this->assertEquals($response, 1); @@ -378,7 +395,7 @@ public function testcreateMatriculaAlunoSemPreRequisitos() list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); - $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[".$modulodisciplina->mdc_id."]"]); + $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); @@ -463,19 +480,19 @@ public function testgetAlunosMatriculasLote() //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi reprovado por média $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'reprovado_media']); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'reprovado_media']); //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi aprovado por média $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'aprovado_media']); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media']); //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e está cursando a mesma $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'cursando']); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina com status de matrícula cancelado $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'cancelado']); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); //este é para o caso em que o aluno não tem nenhuma matrícula na oferta disciplina em questão e portando ele está apto a se matricular nessa disciplina $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); @@ -513,7 +530,7 @@ public function testgetAlunosMatriculasLoteSemPreRequisitos() list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); - $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[".$modulodisciplina->mdc_id."]"]); + $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); @@ -524,7 +541,7 @@ public function testgetAlunosMatriculasLoteSemPreRequisitos() $this->assertArrayHasKey('reprovados', $response); $this->assertNotEmpty($response); - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_tipo_matricula' => 'matriculacomun', 'mof_situacao_matricula' => 'cancelado']); + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $oferta->ofd_id, 'trm_id' => $matricula->mat_trm_id, 'pol_id' => $matricula->mat_pol_id]); $this->assertArrayHasKey('nao_matriculados', $response); $this->assertArrayHasKey('cursando', $response); @@ -602,7 +619,7 @@ public function testcalculaNotasNumericaAprovadoMedia() 'mof_nota3' => 7, 'mof_final' => null, 'mof_recuperacao' => '', - 'mof_conceito'=> null + 'mof_conceito' => null ], $configuracoesCurso ]); @@ -627,7 +644,7 @@ public function testcalculaNotasNumericaAprovadoFinal() 'mof_nota3' => 4, 'mof_final' => 7, 'mof_recuperacao' => 5, - 'mof_conceito'=> null + 'mof_conceito' => null ], $configuracoesCurso ]); @@ -653,7 +670,7 @@ public function testcalculaNotasNumericaAprovadoRecuperacao() 'mof_nota3' => 4, 'mof_final' => null, 'mof_recuperacao' => 7, - 'mof_conceito'=> null + 'mof_conceito' => null ], $configuracoesCurso ]); @@ -681,7 +698,7 @@ public function testcalculaNotasNumericaAprovadoRecuperacaoSubstituirMenorNota() 'mof_nota3' => 4, 'mof_final' => null, 'mof_recuperacao' => 7, - 'mof_conceito'=> null + 'mof_conceito' => null ], $configuracoesCurso ]); @@ -702,7 +719,7 @@ public function testcalculaNotasConceitoAprovadoConceito() $response = $this->invokeMethod($this->repo, 'calculaNotas', [ [ - 'mof_conceito'=> 'Bom' + 'mof_conceito' => 'Bom' ], $configuracoesCurso ]); diff --git a/modulos/Academico/tests/Repositories/ModuloDisciplinaRepositoryTest.php b/modulos/Academico/tests/Repositories/ModuloDisciplinaRepositoryTest.php index 87eb1f1d..c4682ab4 100644 --- a/modulos/Academico/tests/Repositories/ModuloDisciplinaRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/ModuloDisciplinaRepositoryTest.php @@ -309,6 +309,7 @@ public function testUpdatePreRequisito() $updateArray = $moduloDis->toArray(); $updateArray['mdc_pre_requisitos'][] = $moduloDisciplina->mdc_id; + $updateArray['mdc_tipo_disciplina'] = $moduloDis->getOriginal('mdc_tipo_disciplina'); $modulodisciplinaId = $updateArray['mdc_id']; unset($updateArray['mdc_id']); @@ -796,7 +797,7 @@ private function mock() 'mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'aprovado' + 'mof_situacao_matricula' => 'aprovado_media' ]); $rg = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000']); diff --git a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php index 7dc137f0..eeaaa96f 100644 --- a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php @@ -42,12 +42,15 @@ public function testFind() public function testUpdate() { - $entry = factory(TutorGrupo::class)->create(); + $entry = factory(TutorGrupo::class)->create([ + 'ttg_tipo_tutoria' => "distancia" + ]); + $id = $entry->ttg_id; $data = $entry->toArray(); - $data['ttg_tipo_tutoria'] = "slug"; + $data['ttg_tipo_tutoria'] = "presencial"; $return = $this->repo->update($data, $id); $fromRepository = $this->repo->find($id); @@ -82,13 +85,15 @@ public function testLists() public function testSearch() { - $entries = factory(TutorGrupo::class, 2)->create(); + $entries = factory(TutorGrupo::class, 2)->create([ + 'ttg_tipo_tutoria' => 'distancia' + ]); factory(TutorGrupo::class)->create([ - 'ttg_tipo_tutoria' => 'Presencial' + 'ttg_tipo_tutoria' => 'presencial' ]); - $searchResult = $this->repo->search(array(['ttg_tipo_tutoria', '=', 'Presencial'])); + $searchResult = $this->repo->search(array(['ttg_tipo_tutoria', '=', 'presencial'])); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -96,10 +101,12 @@ public function testSearch() public function testSearchWithSelect() { - factory(TutorGrupo::class, 2)->create(); + factory(TutorGrupo::class, 2)->create([ + 'ttg_tipo_tutoria' => 'distancia' + ]); $entry = factory(TutorGrupo::class)->create([ - 'ttg_tipo_tutoria' => "Presencial" + 'ttg_tipo_tutoria' => 'presencial' ]); $expected = [ @@ -107,7 +114,7 @@ public function testSearchWithSelect() 'ttg_tipo_tutoria' => $entry->ttg_tipo_tutoria ]; - $searchResult = $this->repo->search(array(['ttg_tipo_tutoria', '=', "Presencial"]), ['ttg_id', 'ttg_tipo_tutoria']); + $searchResult = $this->repo->search(array(['ttg_tipo_tutoria', '=', "presencial"]), ['ttg_id', 'ttg_tipo_tutoria']); $this->assertInstanceOf(TableCollection::class, $searchResult); $this->assertEquals(1, $searchResult->count()); @@ -169,16 +176,19 @@ public function testPaginateWithSort() public function testPaginateWithSearch() { - factory(TutorGrupo::class, 2)->create(); + factory(TutorGrupo::class, 2)->create([ + 'ttg_tipo_tutoria' => 'distancia' + ]); + factory(TutorGrupo::class)->create([ - 'ttg_tipo_tutoria' => 'Presencial', + 'ttg_tipo_tutoria' => 'presencial' ]); $search = [ [ 'field' => 'ttg_tipo_tutoria', 'type' => '=', - 'term' => 'Presencial' + 'term' => 'presencial' ] ]; diff --git a/modulos/Core/Repository/BaseRepository.php b/modulos/Core/Repository/BaseRepository.php index 1570f4b4..be6b0d88 100755 --- a/modulos/Core/Repository/BaseRepository.php +++ b/modulos/Core/Repository/BaseRepository.php @@ -23,7 +23,7 @@ public function create(array $data) public function update(array $data, $id, $attribute = null) { - if (!$attribute) { + if (is_null($attribute)) { $attribute = $this->model->getKeyName(); } @@ -79,7 +79,7 @@ public function paginate($sort = null, $search = null) switch ($value['type']) { case 'like': $result = $result->where($value['field'], $value['type'], "%{$value['term']}%"); - break; + break; default: $result = $result->where($value['field'], $value['type'], $value['term']); } diff --git a/modulos/Geral/tests/Repositories/PessoaRepositoryTest.php b/modulos/Geral/tests/Repositories/PessoaRepositoryTest.php index 32e40723..8b9df3b6 100755 --- a/modulos/Geral/tests/Repositories/PessoaRepositoryTest.php +++ b/modulos/Geral/tests/Repositories/PessoaRepositoryTest.php @@ -58,12 +58,14 @@ public function testUpdate() $data = $entry->toArray(); $data['pes_bairro'] = "bairro novo"; + $data['pes_estado_civil'] = $entry->getOriginal('pes_estado_civil'); $return = $this->repo->update($data, $id); $fromRepository = $this->repo->find($id); // Accessor $data['pes_estrangeiro'] = $entry->getOriginal('pes_estrangeiro'); + $data['pes_estado_civil'] = $entry->getOriginal('pes_estado_civil'); $data['pes_nascimento'] = $entry->getOriginal('pes_nascimento'); $fromRepositoryArray = $fromRepository->getOriginal(); diff --git a/modulos/ModulosEventServiceProvider.php b/modulos/ModulosEventServiceProvider.php index f13bdd2c..7002b5ab 100755 --- a/modulos/ModulosEventServiceProvider.php +++ b/modulos/ModulosEventServiceProvider.php @@ -4,7 +4,6 @@ use Illuminate\Support\Facades\Event; use Illuminate\Contracts\Foundation\Application; -use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class ModulosEventServiceProvider extends ServiceProvider diff --git a/tests/ModulosTestCase.php b/tests/ModulosTestCase.php index 94426379..ec511f55 100644 --- a/tests/ModulosTestCase.php +++ b/tests/ModulosTestCase.php @@ -26,6 +26,10 @@ public function createApplication() /** * @see InteractsWithDatabase::assertDatabaseHas() + * @param $table + * @param array $data + * @param null $connection + * @return \TestCase */ protected function assertDatabaseHas($table, array $data, $connection = null) { From 94e7e4deee8a6713f132d113730a97196f278d64 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 17:46:10 -0300 Subject: [PATCH 08/17] =?UTF-8?q?Atualizada=20vers=C3=A3o=20m=C3=ADnima=20?= =?UTF-8?q?do=20PHP=20(7.1.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb6f0091..3a8ac1ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ dist: trusty sudo: required php: - - 7.1 - - 7.2 + - '7.1' + - '7.2' before_script: - cp .env.travis .env diff --git a/composer.json b/composer.json index 72b5ff2e..e9c54d63 100755 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "php": ">=7.0.0", + "php": ">=7.1.3", "laravel/framework": "5.6.*", "laravelcollective/html": "5.6.*", "stevebauman/eloquenttable": "1.1.*", From fe04b9c00d9a4d35c1f6ef4488ac897e630c9df0 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Mon, 28 May 2018 18:47:53 -0300 Subject: [PATCH 09/17] =?UTF-8?q?Revis=C3=A3o=20Codacy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Academico/tests/Repositories/LivroRepositorytTest.php | 5 ++--- .../tests/Repositories/MatriculaOfertaDisciplinaTest.php | 7 +++++-- .../tests/Repositories/TutorGrupoRepositoryTest.php | 2 +- .../tests/Listeners/SincronizacaoListenerTest.php | 6 +++--- readme.md | 4 ++++ 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php index 14f09639..46ff4b0c 100644 --- a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php +++ b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php @@ -68,7 +68,7 @@ public function testDelete() public function testLists() { - $entries = factory(Livro::class, 2)->create(); + factory(Livro::class, 2)->create(); $model = new Livro(); $expected = $model->pluck('liv_tipo_livro', 'liv_id'); @@ -79,7 +79,7 @@ public function testLists() public function testSearch() { - $entries = factory(Livro::class, 2)->create([ + factory(Livro::class, 2)->create([ 'liv_tipo_livro' => 'CERTIFICADO' ]); @@ -130,7 +130,6 @@ public function testAll() public function testCount() { $created = factory(Livro::class, 10)->create(); - $collection = $this->repo->all(); $this->assertEquals($created->count(), $this->repo->count()); } diff --git a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php index 95a36dba..26acd832 100755 --- a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php +++ b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php @@ -173,18 +173,21 @@ public function testgetAllAlunosBySituacaoWithDoc() 'mof_situacao_matricula' => 'cursando' ]); - $rg = $this->docrepo->create([ + // RG + $this->docrepo->create([ 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000' ]); - $cpf = $this->docrepo->create([ + // CPF + $this->docrepo->create([ 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 1, 'doc_conteudo' => '123456' ]); + $polo = $matricula->mat_pol_id; } diff --git a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php index eeaaa96f..e2b4235d 100644 --- a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php @@ -85,7 +85,7 @@ public function testLists() public function testSearch() { - $entries = factory(TutorGrupo::class, 2)->create([ + factory(TutorGrupo::class, 2)->create([ 'ttg_tipo_tutoria' => 'distancia' ]); diff --git a/modulos/Integracao/tests/Listeners/SincronizacaoListenerTest.php b/modulos/Integracao/tests/Listeners/SincronizacaoListenerTest.php index 87dbe460..48e9f4ec 100644 --- a/modulos/Integracao/tests/Listeners/SincronizacaoListenerTest.php +++ b/modulos/Integracao/tests/Listeners/SincronizacaoListenerTest.php @@ -58,7 +58,7 @@ private function createIntegracao() 'ser_slug' => "local_integracao" ]); - $ambienteServico = factory(\Modulos\Integracao\Models\AmbienteServico::class)->create([ + factory(\Modulos\Integracao\Models\AmbienteServico::class)->create([ 'asr_amb_id' => $this->ambiente->amb_id, 'asr_ser_id' => $servico->ser_id, 'asr_token' => "aksjhdeuig2768125sahsjhdvjahsy" @@ -77,7 +77,7 @@ private function createMonitor() 'ser_slug' => "get_tutor_online_time" ]); - $ambienteServico = factory(\Modulos\Integracao\Models\AmbienteServico::class)->create([ + factory(\Modulos\Integracao\Models\AmbienteServico::class)->create([ 'asr_amb_id' => $this->ambiente->amb_id, 'asr_ser_id' => $servico->ser_id, 'asr_token' => "abcdefgh12345" @@ -116,7 +116,7 @@ private function mockUpDatabaseLote(int $qtdeMatriculas = 20) { // Cria a turma $data = [ - 'trm_id' => random_int(50, 100), + 'trm_id' => random_int(50, 1000), 'trm_ofc_id' => factory(Modulos\Academico\Models\OfertaCurso::class)->create()->ofc_id, 'trm_per_id' => factory(Modulos\Academico\Models\PeriodoLetivo::class)->create()->per_id, 'trm_nome' => "Turma de Teste", diff --git a/readme.md b/readme.md index e86991f3..7e2ded06 100755 --- a/readme.md +++ b/readme.md @@ -31,6 +31,10 @@ Requerimentos do sistema * Tokenizer PHP Extension * XML PHP Extension +Requerimentos do Moodle +------------ + * Versão mínima: 3.3 + Instalação ------------ From b56e8fe6bb6a25abe394078dd4da01c07b45cfd1 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Thu, 7 Jun 2018 11:28:39 -0300 Subject: [PATCH 10/17] =?UTF-8?q?Revis=C3=A3o=20Codacy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Academico/tests/Repositories/LivroRepositorytTest.php | 3 +-- .../tests/Repositories/MatriculaOfertaDisciplinaTest.php | 6 +++--- .../tests/Repositories/TutorGrupoRepositoryTest.php | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php index 14f09639..10b2ed16 100644 --- a/modulos/Academico/tests/Repositories/LivroRepositorytTest.php +++ b/modulos/Academico/tests/Repositories/LivroRepositorytTest.php @@ -79,7 +79,7 @@ public function testLists() public function testSearch() { - $entries = factory(Livro::class, 2)->create([ + factory(Livro::class, 2)->create([ 'liv_tipo_livro' => 'CERTIFICADO' ]); @@ -130,7 +130,6 @@ public function testAll() public function testCount() { $created = factory(Livro::class, 10)->create(); - $collection = $this->repo->all(); $this->assertEquals($created->count(), $this->repo->count()); } diff --git a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php index 95a36dba..d200977d 100755 --- a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php +++ b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php @@ -141,7 +141,7 @@ public function testPaginateWithSort() public function testPaginateWithSearch() { - $entry = factory(MatriculaOfertaDisciplina::class)->create([ + factory(MatriculaOfertaDisciplina::class)->create([ 'mof_tipo_matricula' => 'matriculacomum' ]); @@ -173,14 +173,14 @@ public function testgetAllAlunosBySituacaoWithDoc() 'mof_situacao_matricula' => 'cursando' ]); - $rg = $this->docrepo->create([ + $this->docrepo->create([ 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000' ]); - $cpf = $this->docrepo->create([ + $this->docrepo->create([ 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 1, 'doc_conteudo' => '123456' diff --git a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php index eeaaa96f..e821c242 100644 --- a/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/TutorGrupoRepositoryTest.php @@ -74,7 +74,7 @@ public function testDelete() public function testLists() { - $entries = factory(TutorGrupo::class, 2)->create(); + factory(TutorGrupo::class, 2)->create(); $model = new TutorGrupo(); $expected = $model->pluck('ttg_tipo_tutoria', 'ttg_id'); @@ -85,7 +85,7 @@ public function testLists() public function testSearch() { - $entries = factory(TutorGrupo::class, 2)->create([ + factory(TutorGrupo::class, 2)->create([ 'ttg_tipo_tutoria' => 'distancia' ]); From f36fe347fe3979e843fa6e3bebc85cb30a56c833 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Fri, 8 Jun 2018 14:25:50 -0300 Subject: [PATCH 11/17] =?UTF-8?q?Atualizados=20relat=C3=B3rios=20PDF=20(Mp?= =?UTF-8?q?df=207.1+)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 +- composer.lock | 607 +++++++++--------- .../HistoricoDefinitivoController.php | 9 +- .../HistoricoParcialController.php | 9 +- .../RelatoriosAtasFinaisController.php | 15 +- .../RelatoriosMatriculasCursoController.php | 4 +- ...latoriosMatriculasDisciplinaController.php | 42 +- .../historicodefinitivo/tecnico.blade.php | 2 +- 8 files changed, 363 insertions(+), 329 deletions(-) diff --git a/composer.json b/composer.json index e9c54d63..94f3e098 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "laravelcollective/html": "5.6.*", "stevebauman/eloquenttable": "1.1.*", "guzzlehttp/guzzle": "^6.2", - "mpdf/mpdf": "^6.1", + "mpdf/mpdf": "^7.1", "ramsey/uuid": "^3.6", "doctrine/dbal": "^2.5", "maatwebsite/excel": "^2.1.0", @@ -20,7 +20,7 @@ "fzaninotto/faker": "~1.4", "filp/whoops": "^2.0", "mockery/mockery": "0.9.*", - "symfony/css-selector": "3.1.*", + "symfony/css-selector": "^4.0", "symfony/dom-crawler": "^4.0", "phpunit/phpunit": "~7.0", "phpunit/php-code-coverage": "^6.0", diff --git a/composer.lock b/composer.lock index 0123a351..3b0be857 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "784d7a44ff6f6585cae09f3e80bca6cc", + "content-hash": "f110d8a454f76887d09b160d5f1c16da", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -519,16 +519,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5" + "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/3f00985deec8df53d4cc1e5c33619bda1ee309a5", - "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/92a2c3768d50e21a1f26a53cb795ce72806266c5", + "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5", "shasum": "" }, "require": { @@ -564,7 +564,7 @@ "cron", "schedule" ], - "time": "2018-04-06T15:51:55+00:00" + "time": "2018-06-06T03:12:17+00:00" }, { "name": "egulias/email-validator", @@ -997,16 +997,16 @@ }, { "name": "laravel/framework", - "version": "v5.6.23", + "version": "v5.6.24", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "f547f0a71a12763d1adb8493237d541c9e3a5d10" + "reference": "56290edeb0d8051826d40b4cbd8ed3c30348b2b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/f547f0a71a12763d1adb8493237d541c9e3a5d10", - "reference": "f547f0a71a12763d1adb8493237d541c9e3a5d10", + "url": "https://api.github.com/repos/laravel/framework/zipball/56290edeb0d8051826d40b4cbd8ed3c30348b2b5", + "reference": "56290edeb0d8051826d40b4cbd8ed3c30348b2b5", "shasum": "" }, "require": { @@ -1132,7 +1132,7 @@ "framework", "laravel" ], - "time": "2018-05-22T14:55:57+00:00" + "time": "2018-06-04T14:51:03+00:00" }, { "name": "laravel/tinker", @@ -1199,16 +1199,16 @@ }, { "name": "laravelcollective/html", - "version": "v5.6.8", + "version": "v5.6.9", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "42c0854e00d6bb3346883d122b444fbf15a13ecb" + "reference": "fda9d3dad85ecea609ef9c6323d6923536cf5643" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/42c0854e00d6bb3346883d122b444fbf15a13ecb", - "reference": "42c0854e00d6bb3346883d122b444fbf15a13ecb", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/fda9d3dad85ecea609ef9c6323d6923536cf5643", + "reference": "fda9d3dad85ecea609ef9c6323d6923536cf5643", "shasum": "" }, "require": { @@ -1263,7 +1263,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2018-05-10T17:15:15+00:00" + "time": "2018-05-30T16:09:07+00:00" }, { "name": "league/flysystem", @@ -1507,54 +1507,119 @@ }, { "name": "mpdf/mpdf", - "version": "v6.1.3", + "version": "v7.1.0", "source": { "type": "git", "url": "https://github.com/mpdf/mpdf.git", - "reference": "7f138bf7508eac895ac2c13d2509b056ac7e7e97" + "reference": "8e3d0d7bf74f71d04904215fb487d01e924c469a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpdf/mpdf/zipball/7f138bf7508eac895ac2c13d2509b056ac7e7e97", - "reference": "7f138bf7508eac895ac2c13d2509b056ac7e7e97", + "url": "https://api.github.com/repos/mpdf/mpdf/zipball/8e3d0d7bf74f71d04904215fb487d01e924c469a", + "reference": "8e3d0d7bf74f71d04904215fb487d01e924c469a", "shasum": "" }, "require": { + "ext-gd": "*", "ext-mbstring": "*", - "php": ">=5.4.0", + "myclabs/deep-copy": "^1.7", + "paragonie/random_compat": "^1.4|^2.0", + "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0", + "psr/log": "^1.0", "setasign/fpdi": "1.6.*" }, "require-dev": { - "phpunit/phpunit": "^4.7" + "mockery/mockery": "^0.9.5", + "phpunit/phpunit": "^5.0", + "squizlabs/php_codesniffer": "^2.7.0", + "tracy/tracy": "^2.4" }, "suggest": { + "ext-bcmath": "Needed for generation of some types of barcodes", + "ext-xml": "Needed mainly for SVG manipulation", "ext-zlib": "Needed for compression of embedded resources, such as fonts" }, "type": "library", + "extra": { + "branch-alias": { + "dev-development": "7.0-dev" + } + }, "autoload": { - "classmap": [ - "mpdf.php", - "classes" - ] + "psr-4": { + "Mpdf\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0" + "GPL-2.0-only" ], "authors": [ + { + "name": "Matěj Humpál", + "role": "Developer, maintainer" + }, { "name": "Ian Back", - "role": "Developer" + "role": "Developer (retired)" } ], "description": "A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support", - "homepage": "http://mpdf.github.io", + "homepage": "https://mpdf.github.io", "keywords": [ "pdf", "php", "utf-8" ], - "time": "2016-12-12T10:42:18+00:00" + "time": "2018-05-18T05:41:37+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/478465659fd987669df0bd8a9bf22a8710e5f1b6", + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-05-29T17:25:09+00:00" }, { "name": "nesbot/carbon", @@ -1611,16 +1676,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3" + "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", - "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/35b8caf75e791ba1b2d24fec1552168d72692b12", + "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12", "shasum": "" }, "require": { @@ -1658,20 +1723,20 @@ "parser", "php" ], - "time": "2018-03-25T17:35:16+00:00" + "time": "2018-06-03T11:33:10+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.12", + "version": "v2.0.14", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" + "reference": "f6ce7dd93628088e1017fb5dd73b0b9fec7df9e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", - "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/f6ce7dd93628088e1017fb5dd73b0b9fec7df9e5", + "reference": "f6ce7dd93628088e1017fb5dd73b0b9fec7df9e5", "shasum": "" }, "require": { @@ -1703,10 +1768,11 @@ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", + "polyfill", "pseudorandom", "random" ], - "time": "2018-04-04T21:24:14+00:00" + "time": "2018-06-06T17:40:22+00:00" }, { "name": "phpoffice/phpexcel", @@ -1962,16 +2028,16 @@ }, { "name": "psy/psysh", - "version": "v0.9.4", + "version": "v0.9.5", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331" + "reference": "0951e91ac04ca28cf317f3997a0adfc319e80106" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4d969a0e08e1e05e7207c07cb4207017ecc9a331", - "reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0951e91ac04ca28cf317f3997a0adfc319e80106", + "reference": "0951e91ac04ca28cf317f3997a0adfc319e80106", "shasum": "" }, "require": { @@ -2030,7 +2096,7 @@ "interactive", "shell" ], - "time": "2018-05-22T06:48:07+00:00" + "time": "2018-06-02T16:39:22+00:00" }, { "name": "ramsey/uuid", @@ -2262,16 +2328,16 @@ }, { "name": "symfony/console", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd" + "reference": "2d5d973bf9933d46802b01010bd25c800c87c242" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/058f120b8e06ebcd7b211de5ffae07b2db00fbdd", - "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd", + "url": "https://api.github.com/repos/symfony/console/zipball/2d5d973bf9933d46802b01010bd25c800c87c242", + "reference": "2d5d973bf9933d46802b01010bd25c800c87c242", "shasum": "" }, "require": { @@ -2299,7 +2365,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2326,29 +2392,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/css-selector", - "version": "v3.1.10", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d" + "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d", - "reference": "722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/03ac71606ecb0b0ce792faa17d74cc32c2949ef4", + "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2379,20 +2445,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-01-02T20:31:54+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/debug", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "4e7c98de67cc4171d4c986554e09a511da40f3d8" + "reference": "449f8b00b28ab6e6912c3e6b920406143b27193b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/4e7c98de67cc4171d4c986554e09a511da40f3d8", - "reference": "4e7c98de67cc4171d4c986554e09a511da40f3d8", + "url": "https://api.github.com/repos/symfony/debug/zipball/449f8b00b28ab6e6912c3e6b920406143b27193b", + "reference": "449f8b00b28ab6e6912c3e6b920406143b27193b", "shasum": "" }, "require": { @@ -2408,7 +2474,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2435,20 +2501,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-16T14:33:22+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b" + "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2391ed210a239868e7256eb6921b1bd83f3087b5", + "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5", "shasum": "" }, "require": { @@ -2471,7 +2537,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2498,20 +2564,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:43+00:00" + "time": "2018-04-06T07:35:57+00:00" }, { "name": "symfony/finder", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8c633f5a815903a1fe6e3fc135f207267a8a79af" + "reference": "087e2ee0d74464a4c6baac4e90417db7477dc238" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8c633f5a815903a1fe6e3fc135f207267a8a79af", - "reference": "8c633f5a815903a1fe6e3fc135f207267a8a79af", + "url": "https://api.github.com/repos/symfony/finder/zipball/087e2ee0d74464a4c6baac4e90417db7477dc238", + "reference": "087e2ee0d74464a4c6baac4e90417db7477dc238", "shasum": "" }, "require": { @@ -2520,7 +2586,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2547,20 +2613,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-16T14:33:22+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "277b757a2d3960170d99d372e171a8a18916467a" + "reference": "a916c88390fb861ee21f12a92b107d51bb68af99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/277b757a2d3960170d99d372e171a8a18916467a", - "reference": "277b757a2d3960170d99d372e171a8a18916467a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a916c88390fb861ee21f12a92b107d51bb68af99", + "reference": "a916c88390fb861ee21f12a92b107d51bb68af99", "shasum": "" }, "require": { @@ -2568,12 +2634,13 @@ "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { + "predis/predis": "~1.0", "symfony/expression-language": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2600,34 +2667,34 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-05-25T11:08:56+00:00" + "time": "2018-05-25T14:55:38+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48" + "reference": "b5ab9d4cdbfd369083744b6b5dfbf454e31e5f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/450a1bda817f2dce25a9e13f0f011336743f2a48", - "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b5ab9d4cdbfd369083744b6b5dfbf454e31e5f90", + "reference": "b5ab9d4cdbfd369083744b6b5dfbf454e31e5f90", "shasum": "" }, "require": { "php": "^7.1.3", "psr/log": "~1.0", "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4.4|~4.0.4", + "symfony/event-dispatcher": "~4.1", + "symfony/http-foundation": "~4.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", - "symfony/var-dumper": "<3.4", + "symfony/dependency-injection": "<4.1", + "symfony/var-dumper": "<4.1", "twig/twig": "<1.34|<2.4,>=2" }, "provide": { @@ -2639,7 +2706,7 @@ "symfony/config": "~3.4|~4.0", "symfony/console": "~3.4|~4.0", "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^3.4.5|^4.0.5", + "symfony/dependency-injection": "^4.1", "symfony/dom-crawler": "~3.4|~4.0", "symfony/expression-language": "~3.4|~4.0", "symfony/finder": "~3.4|~4.0", @@ -2648,7 +2715,7 @@ "symfony/stopwatch": "~3.4|~4.0", "symfony/templating": "~3.4|~4.0", "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0" + "symfony/var-dumper": "~4.1" }, "suggest": { "symfony/browser-kit": "", @@ -2660,7 +2727,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2687,7 +2754,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-05-25T13:32:52+00:00" + "time": "2018-05-30T12:52:34+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2968,16 +3035,16 @@ }, { "name": "symfony/process", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3621fa74d0576a6f89d63bc44fabd376711bd0b0" + "reference": "73445bd33b0d337c060eef9652b94df72b6b3434" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3621fa74d0576a6f89d63bc44fabd376711bd0b0", - "reference": "3621fa74d0576a6f89d63bc44fabd376711bd0b0", + "url": "https://api.github.com/repos/symfony/process/zipball/73445bd33b0d337c060eef9652b94df72b6b3434", + "reference": "73445bd33b0d337c060eef9652b94df72b6b3434", "shasum": "" }, "require": { @@ -2986,7 +3053,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -3013,20 +3080,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/routing", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e8833b64b139926cbe1610d53722185e55c18e44" + "reference": "180b51c66d10f09e562c9ebc395b39aacb2cf8a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e8833b64b139926cbe1610d53722185e55c18e44", - "reference": "e8833b64b139926cbe1610d53722185e55c18e44", + "url": "https://api.github.com/repos/symfony/routing/zipball/180b51c66d10f09e562c9ebc395b39aacb2cf8a2", + "reference": "180b51c66d10f09e562c9ebc395b39aacb2cf8a2", "shasum": "" }, "require": { @@ -3058,7 +3125,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -3091,20 +3158,20 @@ "uri", "url" ], - "time": "2018-05-16T14:21:07+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/translation", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e1f5863d0a9e79cfec7f031421ced3fe1d403e66" + "reference": "16328f5b217cebc8dd4adfe4aeeaa8c377581f5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e1f5863d0a9e79cfec7f031421ced3fe1d403e66", - "reference": "e1f5863d0a9e79cfec7f031421ced3fe1d403e66", + "url": "https://api.github.com/repos/symfony/translation/zipball/16328f5b217cebc8dd4adfe4aeeaa8c377581f5a", + "reference": "16328f5b217cebc8dd4adfe4aeeaa8c377581f5a", "shasum": "" }, "require": { @@ -3119,6 +3186,7 @@ "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", "symfony/intl": "~3.4|~4.0", @@ -3132,7 +3200,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -3159,20 +3227,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-05-21T10:09:47+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18" + "reference": "bc88ad53e825ebacc7b190bbd360781fce381c64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3c34cf3f4bbac9e003d9325225e9ef1a49180a18", - "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/bc88ad53e825ebacc7b190bbd360781fce381c64", + "reference": "bc88ad53e825ebacc7b190bbd360781fce381c64", "shasum": "" }, "require": { @@ -3181,20 +3249,26 @@ "symfony/polyfill-php72": "~1.5" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" }, "require-dev": { "ext-iconv": "*", + "symfony/process": "~3.4|~4.0", "twig/twig": "~1.34|~2.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump" + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -3228,7 +3302,7 @@ "debug", "dump" ], - "time": "2018-04-26T16:12:06+00:00" + "time": "2018-04-29T07:56:09+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3540,6 +3614,50 @@ ], "time": "2016-08-30T16:08:34+00:00" }, + { + "name": "composer/xdebug-handler", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2018-04-11T15:42:36+00:00" + }, { "name": "doctrine/instantiator", "version": "1.1.0", @@ -3596,16 +3714,16 @@ }, { "name": "filp/whoops", - "version": "2.1.14", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6" + "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", - "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", + "url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a", + "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a", "shasum": "" }, "require": { @@ -3613,9 +3731,9 @@ "psr/log": "^1.0.1" }, "require-dev": { - "mockery/mockery": "0.9.*", + "mockery/mockery": "^0.9 || ^1.0", "phpunit/phpunit": "^4.8.35 || ^5.7", - "symfony/var-dumper": "^2.6 || ^3.0" + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -3624,7 +3742,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -3653,24 +3771,25 @@ "throwable", "whoops" ], - "time": "2017-11-23T18:22:44+00:00" + "time": "2018-03-03T17:56:25+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.11.1", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "ad94441c17b8ef096e517acccdbf3238af8a2da8" + "reference": "a53f39a72cf0baa03909fae779a4de6d3772c74f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ad94441c17b8ef096e517acccdbf3238af8a2da8", - "reference": "ad94441c17b8ef096e517acccdbf3238af8a2da8", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/a53f39a72cf0baa03909fae779a4de6d3772c74f", + "reference": "a53f39a72cf0baa03909fae779a4de6d3772c74f", "shasum": "" }, "require": { "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.0", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", @@ -3692,16 +3811,20 @@ "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.0", + "keradus/cli-executor": "^1.1", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.0", + "php-coveralls/php-coveralls": "^2.1", "php-cs-fixer/accessible-object": "^1.0", - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "phpunitgoodpractices/traits": "^1.3.1", - "symfony/phpunit-bridge": "^3.2.2 || ^4.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.4", + "symfony/phpunit-bridge": "^4.0" }, "suggest": { "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." }, "bin": [ @@ -3710,7 +3833,7 @@ "type": "application", "extra": { "branch-alias": { - "dev-master": "2.11-dev" + "dev-master": "2.12-dev" } }, "autoload": { @@ -3722,9 +3845,6 @@ "tests/Test/AbstractIntegrationCaseFactory.php", "tests/Test/AbstractIntegrationTestCase.php", "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/Constraint/SameStringsConstraint.php", - "tests/Test/Constraint/SameStringsConstraintForV5.php", - "tests/Test/Constraint/SameStringsConstraintForV7.php", "tests/Test/IntegrationCase.php", "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", @@ -3747,7 +3867,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-03-21T17:41:26+00:00" + "time": "2018-06-02T17:33:35+00:00" }, { "name": "fzaninotto/faker", @@ -3965,51 +4085,6 @@ ], "time": "2017-02-28T12:52:32+00:00" }, - { - "name": "myclabs/deep-copy", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2017-10-19T19:58:43+00:00" - }, { "name": "phar-io/manifest", "version": "1.0.1", @@ -4380,23 +4455,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.5", + "version": "6.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4cab20a326d14de7575a8e235c70d879b569a57a" + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4cab20a326d14de7575a8e235c70d879b569a57a", - "reference": "4cab20a326d14de7575a8e235c70d879b569a57a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^7.1", - "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", @@ -4439,29 +4514,29 @@ "testing", "xunit" ], - "time": "2018-05-28T11:49:20+00:00" + "time": "2018-06-01T07:51:50+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/e20525b0c2945c7c317fff95660698cb3d2a53bc", + "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4476,7 +4551,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -4486,7 +4561,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-05-28T12:13:49+00:00" }, { "name": "phpunit/php-text-template", @@ -4629,34 +4704,34 @@ }, { "name": "phpunit/phpunit", - "version": "7.1.5", + "version": "7.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" + "reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", - "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/00bc0b93f0ff4f557e9ea766557fde96da9a03dd", + "reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", + "myclabs/deep-copy": "^1.7", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.1", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.1.1", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", @@ -4666,10 +4741,14 @@ "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", "phpunit/php-invoker": "^2.0" }, @@ -4679,7 +4758,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.1-dev" + "dev-master": "7.2-dev" } }, "autoload": { @@ -4705,63 +4784,7 @@ "testing", "xunit" ], - "time": "2018-04-29T15:09:19+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "6.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.1", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-04-11T04:50:36+00:00" + "time": "2018-06-05T03:40:05+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5406,16 +5429,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1" + "reference": "3350cacf151b48d903114ab8f7a4ccb23e07e10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1", - "reference": "cf13fe774cabf4d32e8e234ec6efe7821e8b6ec1", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/3350cacf151b48d903114ab8f7a4ccb23e07e10a", + "reference": "3350cacf151b48d903114ab8f7a4ccb23e07e10a", "shasum": "" }, "require": { @@ -5432,7 +5455,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5459,20 +5482,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-05-01T23:00:51+00:00" + "time": "2018-05-01T23:02:13+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04" + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", - "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", "shasum": "" }, "require": { @@ -5482,7 +5505,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5509,20 +5532,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2" + "reference": "9b9ab6043c57c8c5571bc846e6ebfd27dff3b589" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2", - "reference": "ac1c3a814ddcad9d0cc2d0382e215d3bff8ae2d2", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9b9ab6043c57c8c5571bc846e6ebfd27dff3b589", + "reference": "9b9ab6043c57c8c5571bc846e6ebfd27dff3b589", "shasum": "" }, "require": { @@ -5531,7 +5554,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5563,7 +5586,7 @@ "configuration", "options" ], - "time": "2018-05-11T15:58:37+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/polyfill-php70", @@ -5626,16 +5649,16 @@ }, { "name": "symfony/stopwatch", - "version": "v4.0.11", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/07463bbbbbfe119045a24c4a516f92ebd2752784", + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784", "shasum": "" }, "require": { @@ -5644,7 +5667,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5671,7 +5694,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" + "time": "2018-02-19T16:51:42+00:00" }, { "name": "theseer/tokenizer", @@ -5772,7 +5795,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.0.0" + "php": ">=7.1.3" }, "platform-dev": [] } diff --git a/modulos/Academico/Http/Controllers/HistoricoDefinitivoController.php b/modulos/Academico/Http/Controllers/HistoricoDefinitivoController.php index e2aa033c..8152bae9 100755 --- a/modulos/Academico/Http/Controllers/HistoricoDefinitivoController.php +++ b/modulos/Academico/Http/Controllers/HistoricoDefinitivoController.php @@ -2,11 +2,12 @@ namespace Modulos\Academico\Http\Controllers; -use Modulos\Academico\Http\Requests\HistoricoDefinitivoRequest; +use Mpdf\Mpdf; +use Modulos\Core\Http\Controller\BaseController; use Modulos\Academico\Repositories\CursoRepository; -use Modulos\Academico\Repositories\HistoricoDefinitivoRepository; use Modulos\Academico\Repositories\MatriculaCursoRepository; -use Modulos\Core\Http\Controller\BaseController; +use Modulos\Academico\Repositories\HistoricoDefinitivoRepository; +use Modulos\Academico\Http\Requests\HistoricoDefinitivoRequest; class HistoricoDefinitivoController extends BaseController { @@ -38,7 +39,7 @@ public function postPrint(HistoricoDefinitivoRequest $request) if (!empty($matriculas)) { $matr = $this->matriculaCursoRepository->find($matriculas['matriculas'][0])->first(); - $mpdf = new \mPDF(); + $mpdf = new Mpdf(); $cursoNome = $matr->turma->ofertacurso->curso->crs_nome; $mpdf->SetTitle('Histórico(s) Definitivo(s) - '. $cursoNome); diff --git a/modulos/Academico/Http/Controllers/HistoricoParcialController.php b/modulos/Academico/Http/Controllers/HistoricoParcialController.php index 6e17a8da..4ac4e505 100755 --- a/modulos/Academico/Http/Controllers/HistoricoParcialController.php +++ b/modulos/Academico/Http/Controllers/HistoricoParcialController.php @@ -2,12 +2,13 @@ namespace Modulos\Academico\Http\Controllers; +use Mpdf\Mpdf; +use ActionButton; use Illuminate\Http\Request; +use Modulos\Core\Http\Controller\BaseController; use Modulos\Academico\Repositories\AlunoRepository; -use Modulos\Academico\Repositories\HistoricoParcialRepository; use Modulos\Academico\Repositories\MatriculaCursoRepository; -use Modulos\Core\Http\Controller\BaseController; -use ActionButton; +use Modulos\Academico\Repositories\HistoricoParcialRepository; class HistoricoParcialController extends BaseController { @@ -131,7 +132,7 @@ public function getPrint($matriculaId) $data = 'São Luís, '.strftime('%d de %B de %Y', strtotime('today')); - $mpdf = new \mPDF(); + $mpdf = new Mpdf(); $mpdf->mirrorMargins = 1; $mpdf->SetTitle('Histórico Parcial - ' . $aluno->pessoa->pes_nome); $mpdf->addPage('P'); diff --git a/modulos/Academico/Http/Controllers/RelatoriosAtasFinaisController.php b/modulos/Academico/Http/Controllers/RelatoriosAtasFinaisController.php index 0602ca71..4edaa537 100644 --- a/modulos/Academico/Http/Controllers/RelatoriosAtasFinaisController.php +++ b/modulos/Academico/Http/Controllers/RelatoriosAtasFinaisController.php @@ -3,8 +3,9 @@ namespace Modulos\Academico\Http\Controllers; -use Harpia\Matriz\MatrizCurricularTree; +use Mpdf\Mpdf; use Illuminate\Http\Request; +use Harpia\Matriz\MatrizCurricularTree; use Modulos\Core\Http\Controller\BaseController; use Modulos\Academico\Repositories\PoloRepository; use Modulos\Academico\Repositories\CursoRepository; @@ -75,7 +76,8 @@ public function __construct( TurmaRepository $turmaRepository, OfertaCursoRepository $ofertaCursoRepository, ResultadosFinaisRepository $resultadosFinaisRepository - ) { + ) + { $this->cursoRepository = $cursoRepository; $this->poloRepository = $poloRepository; $this->turmaRepository = $turmaRepository; @@ -100,7 +102,7 @@ public function getIndex(Request $request) $sqlOfertas = $this->ofertaCursoRepository->findAllByCurso($crs_id); $turmas = $this->turmaRepository->findAllByOfertaCurso($ofc_id)->pluck('trm_nome', 'trm_id'); foreach ($sqlOfertas as $oferta) { - $ofertasCurso[$oferta->ofc_id] = $oferta->ofc_ano . '('.$oferta->mdl_nome.')'; + $ofertasCurso[$oferta->ofc_id] = $oferta->ofc_ano . '(' . $oferta->mdl_nome . ')'; } $oferta = $this->ofertaCursoRepository->find($ofc_id); $polos = $oferta->polos->pluck('pol_nome', 'pol_id'); @@ -160,12 +162,15 @@ public function postPdf(RelatoriosAtasFinaisRequest $request) 'meses' => $this->meses ])->render(); + return $content; + // mpdf - $mpdf = new \mPDF('c', 'A4', '', '', 10, 10, 10, 10, 9, 9); + $configs = ['c', 'A4', '', '', 10, 10, 10, 10, 9, 9]; + $mpdf = new mPDF($configs); $mpdf->debug = true; $mpdf->mirrorMargins = 0; - $mpdf->SetTitle('Relatório de Atas Finais '. $curso->crs_nome); + $mpdf->SetTitle('Relatório de Atas Finais ' . $curso->crs_nome); $mpdf->defaultheaderfontsize = 10; $mpdf->defaultheaderfontstyle = 'B'; $mpdf->defaultheaderline = 0; diff --git a/modulos/Academico/Http/Controllers/RelatoriosMatriculasCursoController.php b/modulos/Academico/Http/Controllers/RelatoriosMatriculasCursoController.php index 54c3824c..6ce2e955 100755 --- a/modulos/Academico/Http/Controllers/RelatoriosMatriculasCursoController.php +++ b/modulos/Academico/Http/Controllers/RelatoriosMatriculasCursoController.php @@ -4,6 +4,7 @@ use Excel; use Validator; +use Mpdf\Mpdf; use Carbon\Carbon; use Illuminate\Http\Request; use Modulos\Core\Http\Controller\BaseController; @@ -111,7 +112,8 @@ public function postPdf(Request $request) $date = new Carbon(); - $mpdf = new \mPDF('c', 'A4', '', '', 15, 15, 16, 16, 9, 9); + $configs = ['c', 'A4', '', '', 15, 15, 16, 16, 9, 9]; + $mpdf = new mPDF($configs); $mpdf->mirrorMargins = 1; $mpdf->SetTitle('Relatório de alunos do Curso ' . $nomecurso->crs_nome); diff --git a/modulos/Academico/Http/Controllers/RelatoriosMatriculasDisciplinaController.php b/modulos/Academico/Http/Controllers/RelatoriosMatriculasDisciplinaController.php index 6e994f2b..ea49867d 100755 --- a/modulos/Academico/Http/Controllers/RelatoriosMatriculasDisciplinaController.php +++ b/modulos/Academico/Http/Controllers/RelatoriosMatriculasDisciplinaController.php @@ -4,6 +4,7 @@ use Excel; use Validator; +use Mpdf\Mpdf; use Carbon\Carbon; use Illuminate\Http\Request; use Modulos\Core\Http\Controller\BaseController; @@ -92,14 +93,14 @@ public function getIndex(Request $request) } $situacao = [ - "" => "Selecione o status", - "cursando" => "Cursando", - "aprovado_media" => "Aprovado por Média", - "aprovado_final" => "Aprovado por Final", - "reprovado_media" => "Reprovado por Média", - "reprovado_final" => "Reprovado por Final", - "cancelado" => "Cancelado" - ]; + "" => "Selecione o status", + "cursando" => "Cursando", + "aprovado_media" => "Aprovado por Média", + "aprovado_final" => "Aprovado por Final", + "reprovado_media" => "Reprovado por Média", + "reprovado_final" => "Reprovado por Final", + "cancelado" => "Cancelado" + ]; return view('Academico::relatoriosmatriculasdisciplina.index', compact('tabela', 'paginacao', 'cursos', 'ofertasCurso', 'turmas', 'periodos', 'disciplinas', 'polos', 'situacao')); } @@ -132,7 +133,8 @@ public function postPdf(Request $request) $date = new Carbon(); - $mpdf = new \mPDF('c', 'A4', '', '', 15, 15, 16, 16, 9, 9); + $configs = ['c', 'A4', '', '', 15, 15, 16, 16, 9, 9]; + $mpdf = new Mpdf($configs); $mpdf->mirrorMargins = 1; $mpdf->SetTitle('Relatório de alunos da Disciplina: ' . $disciplina[0]); @@ -179,7 +181,7 @@ public function postXls(Request $request) $date = new Carbon(); - Excel::create('Relatorio de matrículas da disciplina '.$disciplina[0], function ($excel) use ($turma, $date, $alunos, $disciplina) { + Excel::create('Relatorio de matrículas da disciplina ' . $disciplina[0], function ($excel) use ($turma, $date, $alunos, $disciplina) { $excel->sheet($turma->trm_nome, function ($sheet) use ($turma, $date, $alunos, $disciplina) { // Cabecalho $objDraw = new \PHPExcel_Worksheet_Drawing(); @@ -216,16 +218,16 @@ public function postXls(Request $request) foreach ($alunos as $aluno) { $data = [ - $aluno->mat_id, - $aluno->pes_nome, - $aluno->pes_email, - $aluno->pol_nome, - $aluno->pes_nascimento, - $aluno->rg, - $aluno->cpf, - $aluno->pes_pai, - $aluno->pes_mae, - $aluno->situacao_matricula + $aluno->mat_id, + $aluno->pes_nome, + $aluno->pes_email, + $aluno->pol_nome, + $aluno->pes_nascimento, + $aluno->rg, + $aluno->cpf, + $aluno->pes_pai, + $aluno->pes_mae, + $aluno->situacao_matricula ]; $sheet->appendRow($data); diff --git a/modulos/Academico/Views/historicodefinitivo/tecnico.blade.php b/modulos/Academico/Views/historicodefinitivo/tecnico.blade.php index 9e44a67e..72359d10 100755 --- a/modulos/Academico/Views/historicodefinitivo/tecnico.blade.php +++ b/modulos/Academico/Views/historicodefinitivo/tecnico.blade.php @@ -179,7 +179,7 @@ {{$obj->mof_id}} {{$obj->dis_nome}} {{$obj->dis_carga_horaria}} - @if($obj->ofd_tipo_avaliacao == numerica) + @if($obj->ofd_tipo_avaliacao == 'numerica') {{number_format($obj->mof_mediafinal, 2)}} @else {{$obj->mof_conceito}} From 21046b2afd2edc42cb23caefa0d83eeb6f6628a1 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Fri, 8 Jun 2018 14:44:59 -0300 Subject: [PATCH 12/17] =?UTF-8?q?Configura=C3=A7=C3=B5es=20PHPUnit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpunit.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index c84a9dad..889e0106 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -59,10 +59,6 @@ From 4c20262ec3be5aeb9d15ec832231d7b7a0e5ef8f Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Fri, 8 Jun 2018 15:17:34 -0300 Subject: [PATCH 13/17] =?UTF-8?q?Ajustes=20na=20exporta=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20Certificados=20e=20Diplomas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Academico/Http/Controllers/CertificacaoController.php | 5 +++-- modulos/Academico/Http/Controllers/DiplomasController.php | 7 ++++--- modulos/Academico/Views/diplomas/print.blade.php | 2 +- .../Academico/tests/Repositories/AlunoRepositoryTest.php | 4 ++-- .../Academico/tests/Repositories/TutorRepositoryTest.php | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/modulos/Academico/Http/Controllers/CertificacaoController.php b/modulos/Academico/Http/Controllers/CertificacaoController.php index b33b6049..cd02d682 100755 --- a/modulos/Academico/Http/Controllers/CertificacaoController.php +++ b/modulos/Academico/Http/Controllers/CertificacaoController.php @@ -2,11 +2,12 @@ namespace Modulos\Academico\Http\Controllers; +use Mpdf\Mpdf; use Illuminate\Http\Request; use Modulos\Academico\Repositories\CursoRepository; -use Modulos\Academico\Repositories\MatriculaCursoRepository; use Modulos\Academico\Repositories\LivroRepository; use Modulos\Academico\Repositories\RegistroRepository; +use Modulos\Academico\Repositories\MatriculaCursoRepository; class CertificacaoController { @@ -45,7 +46,7 @@ public function getPrint($idMatricula, $idModulo) return redirect()->back(); } define('_MPDF_TTFONTDATAPATH', sys_get_temp_dir()."/"); - $mpdf = new \mPDF(); + $mpdf = new Mpdf(); $mpdf->addPage('L'); $mpdf->WriteHTML(view('Academico::certificacao.print', compact('dados'))->render()); $mpdf->Output(); diff --git a/modulos/Academico/Http/Controllers/DiplomasController.php b/modulos/Academico/Http/Controllers/DiplomasController.php index c466240d..c322bdd5 100644 --- a/modulos/Academico/Http/Controllers/DiplomasController.php +++ b/modulos/Academico/Http/Controllers/DiplomasController.php @@ -2,12 +2,13 @@ namespace Modulos\Academico\Http\Controllers; +use Mpdf\Mpdf; use Illuminate\Http\Request; use Modulos\Academico\Repositories\CursoRepository; -use Modulos\Academico\Repositories\MatriculaCursoRepository; use Modulos\Academico\Repositories\LivroRepository; -use Modulos\Academico\Repositories\RegistroRepository; use Modulos\Academico\Repositories\DiplomaRepository; +use Modulos\Academico\Repositories\RegistroRepository; +use Modulos\Academico\Repositories\MatriculaCursoRepository; class DiplomasController { @@ -51,7 +52,7 @@ public function postPrint(Request $request) return redirect()->back(); } define('_MPDF_TTFONTDATAPATH', sys_get_temp_dir()."/"); - $mpdf = new \mPDF(); + $mpdf = new Mpdf(); $mpdf->addPage('L', '', '', '', '', '', ''); $mpdf->WriteHTML(view('Academico::diplomas.print', ['retorno' => $retorno])->render()); diff --git a/modulos/Academico/Views/diplomas/print.blade.php b/modulos/Academico/Views/diplomas/print.blade.php index 078413ba..b81fae26 100644 --- a/modulos/Academico/Views/diplomas/print.blade.php +++ b/modulos/Academico/Views/diplomas/print.blade.php @@ -47,7 +47,7 @@ _________________________________________________
NOME DO PROFISSIONAL RESPONSÁVEL

- DIPLOMA VÁLIDO EM TODO TERRITÓRIO NACIONAL + DIPLOMA VÁLIDO EM TODO TERRITÓRIO NACIONAL
diff --git a/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php b/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php index 52527afd..5a3c1a43 100755 --- a/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php @@ -139,8 +139,8 @@ public function testLists() $entries = factory(Aluno::class, 2)->create(); $model = new Aluno(); - $expected = $model->pluck('alu_nome', 'alu_id'); - $fromRepository = $this->repo->lists('alu_id', 'alu_nome'); + $expected = Aluno::all()->pluck('alu_pes_id', 'alu_id'); + $fromRepository = $this->repo->lists('alu_pes_id', 'alu_id'); $this->assertEquals($expected, $fromRepository); } diff --git a/modulos/Academico/tests/Repositories/TutorRepositoryTest.php b/modulos/Academico/tests/Repositories/TutorRepositoryTest.php index 22442f06..f496c6dd 100755 --- a/modulos/Academico/tests/Repositories/TutorRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/TutorRepositoryTest.php @@ -77,8 +77,8 @@ public function testLists() $entries = factory(Tutor::class, 2)->create(); $model = new Tutor(); - $expected = $model->pluck('tut_nome', 'tut_id'); - $fromRepository = $this->repo->lists('tut_id', 'tut_nome'); + $expected = $model->pluck('tut_pes_id', 'tut_id'); + $fromRepository = $this->repo->lists('tut_id', 'tut_pes_id'); $this->assertEquals($expected, $fromRepository); } From acbe68f800b5d4e69ae851a03c19bf1e011bb4a9 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Wed, 12 Sep 2018 15:16:57 -0300 Subject: [PATCH 14/17] =?UTF-8?q?Revis=C3=A3o=20de=20casos=20redundantes?= =?UTF-8?q?=20de=20eventos=20de=20exclus=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Harpia/Event/SincronizacaoFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Harpia/Event/SincronizacaoFactory.php b/Harpia/Event/SincronizacaoFactory.php index 01a3173e..55adbebc 100644 --- a/Harpia/Event/SincronizacaoFactory.php +++ b/Harpia/Event/SincronizacaoFactory.php @@ -161,11 +161,11 @@ final public static function getEventEntry($endpoint, $id, $isDelete = false) } if (in_array($endpoint, array_keys(self::EVENTS['TutorGrupo']))) { - return !$isDelete ? TutorGrupo::find($id) : self::mockDeletedEntry(TutorGrupo::class, 'ttg_id', $id); + return TutorGrupo::find($id); } if (in_array($endpoint, array_keys(self::EVENTS['Pessoa']))) { - return !$isDelete ? Pessoa::find($id) : self::mockDeletedEntry(Pessoa::class, 'pes_id', $id); + return Pessoa::find($id); } throw new \Exception("Endpoint não corresponde a nenhum evento mapeado"); From 4903f7c431557f488b8a55c0422f8842b0a47152 Mon Sep 17 00:00:00 2001 From: Felipe Pimenta Date: Wed, 12 Sep 2018 19:37:07 -0300 Subject: [PATCH 15/17] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=20do=20arquivo=20do?= =?UTF-8?q?cker-compose=20para=20utilizar=20php7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ee1e8661..30d36aeb 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,6 @@ volumes: # MySQL Data harpia-mysql-data: driver: local - # Redis Data - #harpia-redis-data: - # driver: local services: # MySQL (5.7) @@ -25,37 +22,12 @@ services: - MYSQL_USER=harpia - MYSQL_PASSWORD=harpia - # Redis - #cache: - # image: ambientum/redis:3.2 - # container_name: harpia-redis - # command: --appendonly yes - # volumes: - # - harpia-redis-data:/data - # ports: - # - "6379:6379" - - # PHP (with Caddy) web: - #image: ambientum/php:7.0-caddy - #image: ambientum/php:7.0-nginx - image: ambientum/php:7.0-apache + image: ambientum/php:7.2-nginx container_name: harpia-web volumes: - .:/var/www/app ports: - "80:8080" links: - - mysql - # - cache - - # Laravel Queues - #queue: - # image: ambientum/php:7.0 - # container_name: harpia-queue - # command: php artisan queue:listen - # volumes: - # - .:/var/www/app - # links: - # - mysql - # - cache + - mysql \ No newline at end of file From 60db3038875aa1a117d2b31f995247483eae01b3 Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Thu, 27 Sep 2018 18:06:47 -0300 Subject: [PATCH 16/17] =?UTF-8?q?Revis=C3=A3o=20de=20teste=20de=20deleteMa?= =?UTF-8?q?tricula?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MatriculaOfertaDisciplinaTest.php | 1649 ++++++++--------- 1 file changed, 822 insertions(+), 827 deletions(-) diff --git a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php index 9348552c..b1f545a7 100755 --- a/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php +++ b/modulos/Academico/tests/Repositories/MatriculaOfertaDisciplinaTest.php @@ -1,903 +1,898 @@ repo = $this->app->make(MatriculaOfertaDisciplinaRepository::class); + $this->docrepo = $this->app->make(DocumentoRepository::class); + + $this->table = 'acd_matriculas_ofertas_disciplinas'; + } + + public function testDeleteMatricula() + { + $data = factory(MatriculaOfertaDisciplina::class)->create(); + $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); + $this->assertEquals('success', $response['type']); + + $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); + $this->assertEquals('error', $response['type']); + + $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); + $this->assertEquals('error', $response['type']); + + $response = $this->repo->deleteMatricula(['ofd_id' => 1000, 'mat_id' => 1000]); + $this->assertEquals('error', $response['type']); + } + + public function testCreate() + { + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(); + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); + + $response = $this->repo->create(['mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $oferta->ofd_id, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'cursando' + ]); + + $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $response); - public function setUp() - { - parent::setUp(); - $this->repo = $this->app->make(MatriculaOfertaDisciplinaRepository::class); - $this->docrepo = $this->app->make(DocumentoRepository::class); + $this->assertArrayHasKey('mof_id', $response); + $this->assertNotEmpty($response); + } - $this->table = 'acd_matriculas_ofertas_disciplinas'; - } + public function testFind() + { + $entry = factory(MatriculaOfertaDisciplina::class)->create(); + $id = $entry->mof_id; + $fromRepository = $this->repo->find($id); + + $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $fromRepository); + $this->assertDatabaseHas($this->table, $fromRepository->toArray()); + + $this->assertEquals($entry->toArray(), $fromRepository->toArray()); + } + + public function testLists() + { + $entries = factory(MatriculaOfertaDisciplina::class, 2)->create(); + + $model = new MatriculaOfertaDisciplina(); + $expected = $model->pluck('mof_tipo_matricula', 'mof_id'); + $fromRepository = $this->repo->lists('mof_id', 'mof_tipo_matricula'); + + $this->assertEquals($expected, $fromRepository); + } + + public function testSearch() + { + factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_tipo_matricula' => 'matriculacomum' + ]); + + $searchResult = $this->repo->search(array(['mof_tipo_matricula', '=', 'matriculacomum'])); + + $this->assertInstanceOf(TableCollection::class, $searchResult); + $this->assertEquals(1, $searchResult->count()); + } + + public function testSearchWithSelect() + { + factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_tipo_matricula' => 'matriculacomum' + ]); + + $searchResult = $this->repo->search(array(['mof_tipo_matricula', '=', 'matriculacomum']), ['mof_id']); + + $this->assertInstanceOf(TableCollection::class, $searchResult); + $this->assertEquals(1, $searchResult->count()); + } + + public function testAll() + { + // With empty database + $collection = $this->repo->all(); + + $this->assertEquals(0, $collection->count()); + + // Non-empty database + $created = factory(MatriculaOfertaDisciplina::class, 10)->create(); + $collection = $this->repo->all(); + + $this->assertEquals($created->count(), $collection->count()); + } + + public function testCount() + { + $created = factory(MatriculaOfertaDisciplina::class, 10)->create(); + $collection = $this->repo->all(); + + $this->assertEquals($created->count(), $this->repo->count()); + } + + public function testGetFillableModelFields() + { + $model = new MatriculaOfertaDisciplina(); + $this->assertEquals($model->getFillable(), $this->repo->getFillableModelFields()); + } + + public function testPaginateWithoutParameters() + { + factory(MatriculaOfertaDisciplina::class, 2)->create(); + + $response = $this->repo->paginate(); + + $this->assertInstanceOf(LengthAwarePaginator::class, $response); + $this->assertGreaterThan(1, $response->total()); + } + + public function testPaginateWithSort() + { + factory(MatriculaOfertaDisciplina::class, 2)->create(); + + $sort = [ + 'field' => 'mof_id', + 'sort' => 'desc' + ]; + + $response = $this->repo->paginate($sort); + + $this->assertInstanceOf(LengthAwarePaginator::class, $response); + $this->assertEquals(2, $response->first()->mof_id); + } + + public function testPaginateWithSearch() + { + factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_tipo_matricula' => 'matriculacomum' + ]); + + $search = [ + [ + 'field' => 'mof_tipo_matricula', + 'type' => '=', + 'term' => 'matriculacomum' + ] + ]; + + $response = $this->repo->paginate(null, $search); + $this->assertInstanceOf(LengthAwarePaginator::class, $response); + $this->assertGreaterThan(0, $response->total()); + $this->assertEquals('matriculacomum', $response->first()->mof_tipo_matricula); + } + + public function testGetAllAlunosBySituacaoWithDoc() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); + $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); + + foreach ($matriculas as $matricula) { + factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplina, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'cursando' + ]); + + // RG + $this->docrepo->create([ + 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, + 'doc_tpd_id' => 2, + 'doc_conteudo' => '123456', + 'doc_data_expedicao' => '10/10/2000' + ]); + + // CPF + $this->docrepo->create([ + 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, + 'doc_tpd_id' => 1, + 'doc_conteudo' => '123456' + ]); + + $polo = $matricula->mat_pol_id; + } + + $response = $this->repo->getAllAlunosBySituacao($turma->trm_id, $ofertaDisciplina->ofd_id, 'cursando', $polo); + + $this->assertNotEmpty($response); + } + + public function testGetAllAlunosBySituacaoWithoutDoc() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); + $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); + + foreach ($matriculas as $matricula) { + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); + $polo = $matricula->mat_pol_id; + } + + $response = $this->repo->getAllAlunosBySituacao($turma->trm_id, $ofertaDisciplina->ofd_id, 'cursando', $polo); + + $this->assertNotEmpty($response); + } + + public function testUpdate() + { + $matriculaOferta = $this->mockConf(); + + $matriculaOferta->mof_nota1 = 7; + $matriculaOferta->mof_nota2 = 7; + $matriculaOferta->mof_nota3 = 7; + + $response = $this->repo->update(['mof_nota1' => 7, + 'mof_nota2' => 7, + 'mof_nota3' => 7, + 'mof_final' => '', + 'mof_recuperacao' => '', + 'mof_conceito' => null], $matriculaOferta->mof_id); + + + $this->assertEquals($response, 1); + } + + private function mockConf() + { + $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_situacao_matricula' => 'cursando']); + $cursoId = $matriculaoferta->matriculaCurso->turma->ofertacurso->curso->crs_id; + factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_aprovacao', 'cfc_valor' => 7]); + factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_final', 'cfc_valor' => 5]); + factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_aprovacao_final', 'cfc_valor' => 5]); + factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'modo_recuperacao', 'cfc_valor' => 'substituir_media_final']); + factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'conceitos_aprovacao', 'cfc_valor' => '["Bom","Muito Bom","Excelente"]']); + + return $matriculaoferta; + } + + public function testGetAllMatriculasByAluno() + { + $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(); + + $response = $this->repo->getAllMatriculasByAluno($matriculaoferta->matriculaCurso->aluno->alu_id); + + $this->assertNotEmpty($response); + $this->assertCount(1, $response); + } + + public function testGetAllMatriculasByAlunoModuloMatriz() + { + $data = $this->mock(); + + $matriculaoferta = $data[0]; + $modulomatriz = $data[1]; + + $response = $this->repo->getAllMatriculasByAlunoModuloMatriz($matriculaoferta->matriculaCurso->aluno->alu_id, $modulomatriz->mdo_id); + + $this->assertNotEmpty($response); + } + + private function mock() + { + $curso = factory(Modulos\Academico\Models\Curso::class)->create([ + 'crs_nvc_id' => 1, + ]); + + $matrizCurricular = factory(Modulos\Academico\Models\MatrizCurricular::class)->create([ + 'mtc_crs_id' => $curso->crs_id + ]); + + $oferta = factory(Modulos\Academico\Models\OfertaCurso::class)->create([ + 'ofc_crs_id' => $curso->crs_id, + 'ofc_mtc_id' => $matrizCurricular->mtc_id, + ]); + + $turma = factory(Modulos\Academico\Models\Turma::class)->create([ + 'trm_ofc_id' => $oferta->ofc_id, + ]); + + $polo = factory(Modulos\Academico\Models\Polo::class)->create(); + $oferta->polos()->attach($polo->pol_id); + + $grupo = factory(Modulos\Academico\Models\Grupo::class)->create([ + 'grp_trm_id' => $turma->trm_id, + 'grp_pol_id' => $polo->pol_id + ]); + + $moduloMatriz = factory(Modulos\Academico\Models\ModuloMatriz::class)->create([ + 'mdo_mtc_id' => $matrizCurricular->mtc_id + ]); + + $disciplina = factory(Modulos\Academico\Models\Disciplina::class)->create([ + 'dis_nvc_id' => $curso->crs_nvc_id + ]); + + $disciplina2 = factory(Modulos\Academico\Models\Disciplina::class)->create([ + 'dis_nvc_id' => $curso->crs_nvc_id + ]); + + $disciplina3 = factory(Modulos\Academico\Models\Disciplina::class)->create([ + 'dis_nvc_id' => $curso->crs_nvc_id + ]); + + $moduloDisciplina = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ + 'mdc_dis_id' => $disciplina->dis_id, + 'mdc_mdo_id' => $moduloMatriz->mdo_id, + 'mdc_tipo_disciplina' => 'obrigatoria' + ]); + + $moduloDisciplina2 = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ + 'mdc_dis_id' => $disciplina2->dis_id, + 'mdc_mdo_id' => $moduloMatriz->mdo_id, + 'mdc_tipo_disciplina' => 'obrigatoria', + 'mdc_pre_requisitos' => json_encode(['mdc_id' => $moduloDisciplina->mdc_id]) + ]); + + $moduloDisciplina3 = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ + 'mdc_dis_id' => $disciplina3->dis_id, + 'mdc_mdo_id' => $moduloMatriz->mdo_id, + 'mdc_tipo_disciplina' => 'obrigatoria', + 'mdc_pre_requisitos' => json_encode(['mdc_id' => $moduloDisciplina->mdc_id]) + ]); + + $professor = factory(Modulos\Academico\Models\Professor::class)->create(); + + $ofertaDisciplina = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ + 'ofd_mdc_id' => $moduloDisciplina->mdc_id, + 'ofd_trm_id' => $turma->trm_id, + 'ofd_per_id' => $turma->trm_per_id, + 'ofd_prf_id' => $professor->prf_id, + 'ofd_tipo_avaliacao' => 'numerica', + 'ofd_qtd_vagas' => 500 + ]); + + $ofertaDisciplinaCancelado = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ + 'ofd_mdc_id' => $moduloDisciplina2->mdc_id, + 'ofd_trm_id' => $turma->trm_id, + 'ofd_per_id' => $turma->trm_per_id, + 'ofd_prf_id' => $professor->prf_id, + 'ofd_tipo_avaliacao' => 'numerica', + 'ofd_qtd_vagas' => 0 + ]); + + $ofertaDisciplinaReprovado = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ + 'ofd_mdc_id' => $moduloDisciplina3->mdc_id, + 'ofd_trm_id' => $turma->trm_id, + 'ofd_per_id' => $turma->trm_per_id, + 'ofd_prf_id' => $professor->prf_id, + 'ofd_tipo_avaliacao' => 'numerica', + 'ofd_qtd_vagas' => 0 + ]); + + factory(\Modulos\Geral\Models\Titulacao::class, 7)->create(); + + $titulacaoProfessor = factory(Modulos\Geral\Models\TitulacaoInformacao::class)->create([ + 'tin_pes_id' => $professor->pessoa->pes_id, + 'tin_tit_id' => random_int(2, 7), + ]); + + $aluno = factory(\Modulos\Academico\Models\Aluno::class)->create(); + + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create([ + 'mat_alu_id' => $aluno->alu_id, + 'mat_trm_id' => $turma->trm_id, + 'mat_pol_id' => $polo->pol_id, + 'mat_grp_id' => $grupo->grp_id + ]); + + $matriculaOfertaDisciplina = factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplina->ofd_id, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'cursando' + ]); + + factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplinaCancelado->ofd_id, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'cancelado' + ]); + + factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplinaReprovado->ofd_id, + 'mof_tipo_matricula' => 'matriculacomum', + 'mof_situacao_matricula' => 'reprovado_media' + ]); + + + $rg = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000']); + $cpf = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 1, 'doc_conteudo' => '123456']); + + return [$matriculaOfertaDisciplina, $moduloMatriz, $ofertaDisciplina, $matricula, $moduloDisciplina]; + } + + public function testPaginateWithSearchAndOrder() + { + $this->mock(); + + $sort = [ + 'field' => 'pes_nome', + 'sort' => 'desc' + ]; + + $search = [ + [ + 'field' => 'mof_id', + 'type' => '>', + 'term' => '1' + ] + ]; + + $response = $this->repo->paginate($sort, $search); - public function testDeleteMatricula() - { - $data = factory(MatriculaOfertaDisciplina::class)->create(); - $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); - $this->assertEquals('success', $response['type']); + $this->assertGreaterThan(1, $response->total()); - $data = factory(MatriculaOfertaDisciplina::class)->create(['mof_situacao_matricula' => 'cancelada']); - $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); - $this->assertEquals('error', $response['type']); - - $data = factory(MatriculaOfertaDisciplina::class)->create(['mof_nota1' => 7.0]); - $response = $this->repo->deleteMatricula(['ofd_id' => $data->mof_ofd_id, 'mat_id' => $data->mof_mat_id]); - $this->assertEquals('error', $response['type']); - - - $response = $this->repo->deleteMatricula(['ofd_id' => 1000, 'mat_id' => 1000]); - $this->assertEquals('error', $response['type']); + $this->assertEquals(2, count($response)); + } - } + public function testPaginateWithSearchAndOrderByCpf() + { + $this->mock(); - public function testCreate() - { - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(); - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(); + $sort = [ + 'field' => 'pes_nome', + 'sort' => 'desc' + ]; - $response = $this->repo->create(['mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $oferta->ofd_id, - 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'cursando' - ]); + $search = [ + [ + 'field' => 'pes_cpf', + 'type' => 'like', + 'term' => '53743639634' + ], + [ + 'field' => 'pes_nome', + 'type' => 'like', + 'term' => 'Empty' + ] + ]; - $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $response); + $response = $this->repo->paginate($sort, $search); - $this->assertArrayHasKey('mof_id', $response); - $this->assertNotEmpty($response); - } + $this->assertEmpty($response->total()); + } - public function testFind() - { - $entry = factory(MatriculaOfertaDisciplina::class)->create(); - $id = $entry->mof_id; - $fromRepository = $this->repo->find($id); + public function testGetMatriculasOfertasDisciplinasByMatricula() + { + $data = $this->mock(); - $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $fromRepository); - $this->assertDatabaseHas($this->table, $fromRepository->toArray()); - - $this->assertEquals($entry->toArray(), $fromRepository->toArray()); - } - - public function testLists() - { - $entries = factory(MatriculaOfertaDisciplina::class, 2)->create(); - - $model = new MatriculaOfertaDisciplina(); - $expected = $model->pluck('mof_tipo_matricula', 'mof_id'); - $fromRepository = $this->repo->lists('mof_id', 'mof_tipo_matricula'); - - $this->assertEquals($expected, $fromRepository); - } - - public function testSearch() - { - factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_tipo_matricula' => 'matriculacomum' - ]); - - $searchResult = $this->repo->search(array(['mof_tipo_matricula', '=', 'matriculacomum'])); - - $this->assertInstanceOf(TableCollection::class, $searchResult); - $this->assertEquals(1, $searchResult->count()); - } - - public function testSearchWithSelect() - { - factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_tipo_matricula' => 'matriculacomum' - ]); - - $searchResult = $this->repo->search(array(['mof_tipo_matricula', '=', 'matriculacomum']), ['mof_id']); - - $this->assertInstanceOf(TableCollection::class, $searchResult); - $this->assertEquals(1, $searchResult->count()); - } - - public function testAll() - { - // With empty database - $collection = $this->repo->all(); - - $this->assertEquals(0, $collection->count()); - - // Non-empty database - $created = factory(MatriculaOfertaDisciplina::class, 10)->create(); - $collection = $this->repo->all(); - - $this->assertEquals($created->count(), $collection->count()); - } - - public function testCount() - { - $created = factory(MatriculaOfertaDisciplina::class, 10)->create(); - $collection = $this->repo->all(); - - $this->assertEquals($created->count(), $this->repo->count()); - } - - public function testGetFillableModelFields() - { - $model = new MatriculaOfertaDisciplina(); - $this->assertEquals($model->getFillable(), $this->repo->getFillableModelFields()); - } - - public function testPaginateWithoutParameters() - { - factory(MatriculaOfertaDisciplina::class, 2)->create(); - - $response = $this->repo->paginate(); - - $this->assertInstanceOf(LengthAwarePaginator::class, $response); - $this->assertGreaterThan(1, $response->total()); - } - - public function testPaginateWithSort() - { - factory(MatriculaOfertaDisciplina::class, 2)->create(); - - $sort = [ - 'field' => 'mof_id', - 'sort' => 'desc' - ]; - - $response = $this->repo->paginate($sort); - - $this->assertInstanceOf(LengthAwarePaginator::class, $response); - $this->assertEquals(2, $response->first()->mof_id); - } - - public function testPaginateWithSearch() - { - factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_tipo_matricula' => 'matriculacomum' - ]); - - $search = [ - [ - 'field' => 'mof_tipo_matricula', - 'type' => '=', - 'term' => 'matriculacomum' - ] - ]; - - $response = $this->repo->paginate(null, $search); - $this->assertInstanceOf(LengthAwarePaginator::class, $response); - $this->assertGreaterThan(0, $response->total()); - $this->assertEquals('matriculacomum', $response->first()->mof_tipo_matricula); - } - - public function testGetAllAlunosBySituacaoWithDoc() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); - $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - - foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $ofertaDisciplina, - 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'cursando' - ]); - - // RG - $this->docrepo->create([ - 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, - 'doc_tpd_id' => 2, - 'doc_conteudo' => '123456', - 'doc_data_expedicao' => '10/10/2000' - ]); - - // CPF - $this->docrepo->create([ - 'doc_pes_id' => $matricula->aluno->pessoa->pes_id, - 'doc_tpd_id' => 1, - 'doc_conteudo' => '123456' - ]); - - $polo = $matricula->mat_pol_id; - } - - $response = $this->repo->getAllAlunosBySituacao($turma->trm_id, $ofertaDisciplina->ofd_id, 'cursando', $polo); - - $this->assertNotEmpty($response); - } - - public function testGetAllAlunosBySituacaoWithoutDoc() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); - $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - - foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); - $polo = $matricula->mat_pol_id; - } - - $response = $this->repo->getAllAlunosBySituacao($turma->trm_id, $ofertaDisciplina->ofd_id, 'cursando', $polo); - - $this->assertNotEmpty($response); - } - - - private function mockConf() - { - $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_situacao_matricula' => 'cursando']); - $cursoId = $matriculaoferta->matriculaCurso->turma->ofertacurso->curso->crs_id; - factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_aprovacao', 'cfc_valor' => 7]); - factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_final', 'cfc_valor' => 5]); - factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'media_min_aprovacao_final', 'cfc_valor' => 5]); - factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'modo_recuperacao', 'cfc_valor' => 'substituir_media_final']); - factory(\Modulos\Academico\Models\ConfiguracaoCurso::class)->create(['cfc_crs_id' => $cursoId, 'cfc_nome' => 'conceitos_aprovacao', 'cfc_valor' => '["Bom","Muito Bom","Excelente"]']); - - return $matriculaoferta; - } - - public function testUpdate() - { - $matriculaOferta = $this->mockConf(); - - $matriculaOferta->mof_nota1 = 7; - $matriculaOferta->mof_nota2 = 7; - $matriculaOferta->mof_nota3 = 7; - - $response = $this->repo->update(['mof_nota1' => 7, - 'mof_nota2' => 7, - 'mof_nota3' => 7, - 'mof_final' => '', - 'mof_recuperacao' => '', - 'mof_conceito' => null], $matriculaOferta->mof_id); - - - $this->assertEquals($response, 1); - } - - public function testGetAllMatriculasByAluno() - { - $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(); - - $response = $this->repo->getAllMatriculasByAluno($matriculaoferta->matriculaCurso->aluno->alu_id); - - $this->assertNotEmpty($response); - $this->assertCount(1, $response); - } - - public function testGetAllMatriculasByAlunoModuloMatriz() - { - $data = $this->mock(); + $matriculaoferta = $data[0]; - $matriculaoferta = $data[0]; - $modulomatriz = $data[1]; + $response = $this->repo->getMatriculasOfertasDisciplinasByMatricula($matriculaoferta->matriculaCurso->mat_id, []); - $response = $this->repo->getAllMatriculasByAlunoModuloMatriz($matriculaoferta->matriculaCurso->aluno->alu_id, $modulomatriz->mdo_id); + $this->assertNotEmpty($response); - $this->assertNotEmpty($response); - } + $this->assertEquals($response[0]->mof_mat_id, $matriculaoferta->mof_mat_id); + } - public function testPaginateWithSearchAndOrder() - { - $this->mock(); + public function testGetDisciplinasCursadasByAluno() + { + $data = $this->mock(); - $sort = [ - 'field' => 'pes_nome', - 'sort' => 'desc' - ]; + $matriculaoferta = $data[0]; - $search = [ - [ - 'field' => 'mof_id', - 'type' => '>', - 'term' => '1' - ] - ]; + $response = $this->repo->getDisciplinasCursadasByAluno($matriculaoferta->matriculaCurso->aluno->alu_id, [ + 'ofd_per_id' => $matriculaoferta->ofertaDisciplina->ofd_per_id, + 'ofd_trm_id' => $matriculaoferta->ofertaDisciplina->ofd_trm_id, + 'mof_situacao_matricula' => ['cursando'] + ]); - $response = $this->repo->paginate($sort, $search); + $this->assertNotEmpty($response); + } - $this->assertGreaterThan(1, $response->total()); + public function testeVerifyIfAlunoIsMatriculadoInDisciplinaOferecida() + { + $matricula = factory(Modulos\Academico\Models\Matricula::class)->create(); - $this->assertEquals(2, count($response)); - } + $ofertaDisciplina = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create(); - public function testPaginateWithSearchAndOrderByCpf() - { - $this->mock(); + // matricular aluno nessa oferta + $matriculaDisciplina = factory(MatriculaOfertaDisciplina::class)->create([ + 'mof_mat_id' => $matricula->mat_id, + 'mof_ofd_id' => $ofertaDisciplina->ofd_id + ]); - $sort = [ - 'field' => 'pes_nome', - 'sort' => 'desc' - ]; + $data = $matriculaDisciplina->toArray(); - $search = [ - [ - 'field' => 'pes_cpf', - 'type' => 'like', - 'term' => '53743639634' - ], - [ - 'field' => 'pes_nome', - 'type' => 'like', - 'term' => 'Empty' - ] - ]; + $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $matriculaDisciplina); - $response = $this->repo->paginate($sort, $search); + $this->assertEquals($matricula->mat_id, $data['mof_mat_id']); + $this->assertEquals($ofertaDisciplina->ofd_id, $data['mof_ofd_id']); + } - $this->assertEmpty($response->total()); - } + public function testGetDisciplinasOfertadasNotCursadasByAluno() + { + $data = $this->mock(); - public function testGetMatriculasOfertasDisciplinasByMatricula() - { - $data = $this->mock(); + $matriculaoferta = $data[0]; - $matriculaoferta = $data[0]; + $response = $this->repo->getDisciplinasOfertadasNotCursadasByAluno($matriculaoferta->matriculaCurso->mat_alu_id, $matriculaoferta->matriculaCurso->mat_trm_id, $matriculaoferta->ofertaDisciplina->ofd_per_id); - $response = $this->repo->getMatriculasOfertasDisciplinasByMatricula($matriculaoferta->matriculaCurso->mat_id, []); - $this->assertNotEmpty($response); + $this->assertNotEmpty($response); + } - $this->assertEquals($response[0]->mof_mat_id, $matriculaoferta->mof_mat_id); - } + public function testCreateMatricula() + { + $data = $this->mock(); - public function testGetDisciplinasCursadasByAluno() - { - $data = $this->mock(); + list(, , $ofertaDisciplina, $matriculaCurso) = $data; - $matriculaoferta = $data[0]; + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); - $response = $this->repo->getDisciplinasCursadasByAluno($matriculaoferta->matriculaCurso->aluno->alu_id, [ - 'ofd_per_id' => $matriculaoferta->ofertaDisciplina->ofd_per_id, - 'ofd_trm_id' => $matriculaoferta->ofertaDisciplina->ofd_trm_id, - 'mof_situacao_matricula' => ['cursando'] - ]); + $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); - $this->assertNotEmpty($response); - } + $this->assertNotEmpty($response); + } - public function testeVerifyIfAlunoIsMatriculadoInDisciplinaOferecida() - { - $matricula = factory(Modulos\Academico\Models\Matricula::class)->create(); + public function testCreateMatriculaAlunoSemPreRequisitos() + { + $data = $this->mock(); - $ofertaDisciplina = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create(); + list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; - // matricular aluno nessa oferta - $matriculaDisciplina = factory(MatriculaOfertaDisciplina::class)->create([ - 'mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $ofertaDisciplina->ofd_id - ]); + $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); + $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); - $data = $matriculaDisciplina->toArray(); + $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $oferta->ofd_id]); - $this->assertInstanceOf(MatriculaOfertaDisciplina::class, $matriculaDisciplina); + $this->assertNotEmpty($response); + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Aluno possui pre-requisitos não satisfeitos'); + } - $this->assertEquals($matricula->mat_id, $data['mof_mat_id']); - $this->assertEquals($ofertaDisciplina->ofd_id, $data['mof_ofd_id']); - } + public function testCreateMatriculaAlunoReprovadoNoCurso() + { + $data = $this->mock(); - public function testGetDisciplinasOfertadasNotCursadasByAluno() - { - $data = $this->mock(); + list(, , $ofertaDisciplina, $matriculaCurso) = $data; - $matriculaoferta = $data[0]; + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'reprovado']); - $response = $this->repo->getDisciplinasOfertadasNotCursadasByAluno($matriculaoferta->matriculaCurso->mat_alu_id, $matriculaoferta->matriculaCurso->mat_trm_id, $matriculaoferta->ofertaDisciplina->ofd_per_id); + $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); - $this->assertNotEmpty($response); - } + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Aluno não está cursando o curso'); + $this->assertNotEmpty($response); + } - public function testCreateMatricula() - { - $data = $this->mock(); + public function testCreateMatriculaDisciplinaSemVagas() + { + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 0]); + $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media', 'mof_ofd_id' => $oferta->ofd_id]); - list(, , $ofertaDisciplina, $matriculaCurso) = $data; + $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); + $this->assertNotEmpty($response); - $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Sem vagas disponiveis'); + } - $this->assertNotEmpty($response); - } + public function testCreateMatriculaAlunoReprovadoDisciplina() + { + $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'reprovado_media']); - public function testCreateMatriculaAlunoSemPreRequisitos() - { - $data = $this->mock(); + $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); - list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Aluno está reprovado nesta oferta de disciplina'); + } - $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); - $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); + public function testCreateMatriculaAlunoAprovadoDisciplina() + { + $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media']); - $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $oferta->ofd_id]); + $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); - $this->assertNotEmpty($response); - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Aluno possui pre-requisitos não satisfeitos'); - } + $this->assertNotEmpty($response); - public function testCreateMatriculaAlunoReprovadoNoCurso() - { - $data = $this->mock(); + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Aluno já aprovado nessa disciplina.'); + } - list(, , $ofertaDisciplina, $matriculaCurso) = $data; + public function testCreateMatriculaDuplicada() + { + $data = $this->mock(); - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'reprovado']); + list(, , $ofertaDisciplina, $matriculaCurso) = $data; - $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); + $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); + $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Aluno não está cursando o curso'); - $this->assertNotEmpty($response); - } + $this->assertEquals($response['type'], 'error'); + $this->assertEquals($response['message'], 'Aluno está cursando essa disciplina'); + $this->assertNotEmpty($response); + } - public function testCreateMatriculaDisciplinaSemVagas() - { - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 0]); - $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media', 'mof_ofd_id' => $oferta->ofd_id]); + public function testGetAlunosMatriculasLote() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); + //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi reprovado por média + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'reprovado_media']); - $this->assertNotEmpty($response); + //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi aprovado por média + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media']); - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Sem vagas disponiveis'); - } + //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e está cursando a mesma + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); - public function testCreateMatriculaAlunoReprovadoDisciplina() - { - $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'reprovado_media']); + //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina com status de matrícula cancelado + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); + $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); - $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); + //este é para o caso em que o aluno não tem nenhuma matrícula na oferta disciplina em questão e portando ele está apto a se matricular nessa disciplina + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Aluno está reprovado nesta oferta de disciplina'); - } + $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $ofertaDisciplina->ofd_id, 'trm_id' => $turma->trm_id]); - public function testCreateMatriculaAlunoAprovadoDisciplina() - { - $matriculaoferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media']); + $this->assertArrayHasKey('nao_matriculados', $response); + $this->assertArrayHasKey('cursando', $response); + $this->assertArrayHasKey('aprovados', $response); + $this->assertArrayHasKey('reprovados', $response); + $this->assertNotEmpty($response); + } - $response = $this->repo->createMatricula(['mat_id' => $matriculaoferta->mof_mat_id, 'ofd_id' => $matriculaoferta->mof_ofd_id]); + public function testGetAlunosMatriculasLoteComPolo() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - $this->assertNotEmpty($response); + //este é para o caso em que o aluno não tem nenhuma matrícula na oferta disciplina em questão e portando ele está apto a se matricular nessa disciplina + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Aluno já aprovado nessa disciplina.'); - } + $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $ofertaDisciplina->ofd_id, 'trm_id' => $turma->trm_id, 'pol_id' => $matricula->mat_pol_id]); - public function testCreateMatriculaDuplicada() - { - $data = $this->mock(); + $this->assertArrayHasKey('nao_matriculados', $response); + $this->assertArrayHasKey('cursando', $response); + $this->assertArrayHasKey('aprovados', $response); + $this->assertArrayHasKey('reprovados', $response); + $this->assertNotEmpty($response); + } + + public function testGetAlunosMatriculasLoteSemPreRequisitos() + { + $data = $this->mock(); - list(, , $ofertaDisciplina, $matriculaCurso) = $data; - - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); - - $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); - $response = $this->repo->createMatricula(['mat_id' => $matricula->mat_id, 'ofd_id' => $ofertaDisciplina->ofd_id]); - - $this->assertEquals($response['type'], 'error'); - $this->assertEquals($response['message'], 'Aluno está cursando essa disciplina'); - $this->assertNotEmpty($response); - } - - public function testGetAlunosMatriculasLote() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - - //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi reprovado por média - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'reprovado_media']); - - //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e foi aprovado por média - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'aprovado_media']); - - //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina e está cursando a mesma - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cursando']); - - //esta matrícula em disciplina testa o caso em que o aluno já tem uma matrícula nessa disciplina com status de matrícula cancelado - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - $matriculaOferta = factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $ofertaDisciplina->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); - - //este é para o caso em que o aluno não tem nenhuma matrícula na oferta disciplina em questão e portando ele está apto a se matricular nessa disciplina - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - - $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $ofertaDisciplina->ofd_id, 'trm_id' => $turma->trm_id]); - - $this->assertArrayHasKey('nao_matriculados', $response); - $this->assertArrayHasKey('cursando', $response); - $this->assertArrayHasKey('aprovados', $response); - $this->assertArrayHasKey('reprovados', $response); - $this->assertNotEmpty($response); - } - - public function testGetAlunosMatriculasLoteComPolo() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $ofertaDisciplina = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - - //este é para o caso em que o aluno não tem nenhuma matrícula na oferta disciplina em questão e portando ele está apto a se matricular nessa disciplina - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $turma->trm_id]); - - $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $ofertaDisciplina->ofd_id, 'trm_id' => $turma->trm_id, 'pol_id' => $matricula->mat_pol_id]); - - $this->assertArrayHasKey('nao_matriculados', $response); - $this->assertArrayHasKey('cursando', $response); - $this->assertArrayHasKey('aprovados', $response); - $this->assertArrayHasKey('reprovados', $response); - $this->assertNotEmpty($response); - } - - public function testGetAlunosMatriculasLoteSemPreRequisitos() - { - $data = $this->mock(); - - list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; - - $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); - $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); - - $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $oferta->ofd_id, 'trm_id' => $matricula->mat_trm_id, 'pol_id' => $matricula->mat_pol_id]); - $this->assertArrayHasKey('nao_matriculados', $response); - $this->assertArrayHasKey('cursando', $response); - $this->assertArrayHasKey('aprovados', $response); - $this->assertArrayHasKey('reprovados', $response); - $this->assertNotEmpty($response); - - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); - $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $oferta->ofd_id, 'trm_id' => $matricula->mat_trm_id, 'pol_id' => $matricula->mat_pol_id]); - $this->assertArrayHasKey('nao_matriculados', $response); - $this->assertArrayHasKey('cursando', $response); - $this->assertArrayHasKey('aprovados', $response); - $this->assertArrayHasKey('reprovados', $response); - $this->assertNotEmpty($response); - } - - public function testpaginateRequestByParametrosNoParemeters() - { - factory(\Modulos\Academico\Models\MatriculaOfertaDisciplina::class, 10)->create(); - - $response = $this->repo->paginateRequestByParametros(); - - $this->assertEmpty($response); - } - - public function testpaginateRequestByParametrosNullParemeters() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id]); - } - - $response = $this->repo->paginateRequestByParametros(['trm_id' => null, 'ofd_id' => null]); - - $this->assertEmpty($response); - } - - public function testpaginateRequestByParametros() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); - } - - $response = $this->repo->paginateRequestByParametros(['trm_id' => $turma->trm_id, 'ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); - - $this->assertNotEmpty($response); - } - - public function testpaginateRequestByParametrosWithOrderAndSearch() - { - $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); - $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); - $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); - foreach ($matriculas as $matricula) { - factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); - } - - $response = $this->repo->paginateRequestByParametros(['trm_id' => $turma->trm_id, 'ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando', 'sort' => 'asc', 'field' => 'pes_nome', 'pol_id' => $matriculas[0]->mat_pol_id]); - - $this->assertNotEmpty($response); - } - - public function testcalculaNotasNumericaAprovadoMedia() - { - $matriculaOferta = $this->mockConf(); - - $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; - - $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { - return [$item->cfc_nome => $item->cfc_valor]; - })->toArray(); - - $response = $this->invokeMethod($this->repo, 'calculaNotas', - [ - [ - 'mof_nota1' => 7, - 'mof_nota2' => 7, - 'mof_nota3' => 7, - 'mof_final' => null, - 'mof_recuperacao' => '', - 'mof_conceito' => null - ], $configuracoesCurso - ]); - - $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); - } - - public function testcalculaNotasNumericaAprovadoFinal() - { - $matriculaOferta = $this->mockConf(); - - $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; - - $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { - return [$item->cfc_nome => $item->cfc_valor]; - })->toArray(); - - $response = $this->invokeMethod($this->repo, 'calculaNotas', - [ - [ - 'mof_nota1' => 7, - 'mof_nota2' => 4, - 'mof_nota3' => 4, - 'mof_final' => 7, - 'mof_recuperacao' => 5, - 'mof_conceito' => null - ], $configuracoesCurso - ]); - - - $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_final'); - } - - public function testcalculaNotasNumericaAprovadoRecuperacao() - { - $matriculaOferta = $this->mockConf(); - - $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; - - $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { - return [$item->cfc_nome => $item->cfc_valor]; - })->toArray(); - - $response = $this->invokeMethod($this->repo, 'calculaNotas', - [ - [ - 'mof_nota1' => 7, - 'mof_nota2' => 7, - 'mof_nota3' => 4, - 'mof_final' => null, - 'mof_recuperacao' => 7, - 'mof_conceito' => null - ], $configuracoesCurso - ]); - - - $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); - } - - public function testcalculaNotasNumericaAprovadoRecuperacaoSubstituirMenorNota() - { - $matriculaOferta = $this->mockConf(); - - $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; - - $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { - return [$item->cfc_nome => $item->cfc_valor]; - })->toArray(); - - $configuracoesCurso['modo_recuperacao'] = 'substituir_menor_nota'; - - $response = $this->invokeMethod($this->repo, 'calculaNotas', - [ - [ - 'mof_nota1' => 7, - 'mof_nota2' => 7, - 'mof_nota3' => 4, - 'mof_final' => null, - 'mof_recuperacao' => 7, - 'mof_conceito' => null - ], $configuracoesCurso - ]); - - - $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); - } - - public function testcalculaNotasConceitoAprovadoConceito() - { - $matriculaOferta = $this->mockConf(); - - $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; - - $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { - return [$item->cfc_nome => $item->cfc_valor]; - })->toArray(); - - $response = $this->invokeMethod($this->repo, 'calculaNotas', - [ - [ - 'mof_conceito' => 'Bom' - ], $configuracoesCurso - ]); - - $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); - } - - public function testDelete() - { - $data = factory(MatriculaOfertaDisciplina::class)->create(); - $matriculaOfertaDisciplinaId = $data->mof_id; - - $response = $this->repo->delete($matriculaOfertaDisciplinaId); - - $this->assertEquals(1, $response); - } - - private function mock() - { - $curso = factory(Modulos\Academico\Models\Curso::class)->create([ - 'crs_nvc_id' => 1, - ]); - - $matrizCurricular = factory(Modulos\Academico\Models\MatrizCurricular::class)->create([ - 'mtc_crs_id' => $curso->crs_id - ]); - - $oferta = factory(Modulos\Academico\Models\OfertaCurso::class)->create([ - 'ofc_crs_id' => $curso->crs_id, - 'ofc_mtc_id' => $matrizCurricular->mtc_id, - ]); - - $turma = factory(Modulos\Academico\Models\Turma::class)->create([ - 'trm_ofc_id' => $oferta->ofc_id, - ]); - - $polo = factory(Modulos\Academico\Models\Polo::class)->create(); - $oferta->polos()->attach($polo->pol_id); - - $grupo = factory(Modulos\Academico\Models\Grupo::class)->create([ - 'grp_trm_id' => $turma->trm_id, - 'grp_pol_id' => $polo->pol_id - ]); - - $moduloMatriz = factory(Modulos\Academico\Models\ModuloMatriz::class)->create([ - 'mdo_mtc_id' => $matrizCurricular->mtc_id - ]); - - $disciplina = factory(Modulos\Academico\Models\Disciplina::class)->create([ - 'dis_nvc_id' => $curso->crs_nvc_id - ]); - - $disciplina2 = factory(Modulos\Academico\Models\Disciplina::class)->create([ - 'dis_nvc_id' => $curso->crs_nvc_id - ]); - - $disciplina3 = factory(Modulos\Academico\Models\Disciplina::class)->create([ - 'dis_nvc_id' => $curso->crs_nvc_id - ]); - - $moduloDisciplina = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ - 'mdc_dis_id' => $disciplina->dis_id, - 'mdc_mdo_id' => $moduloMatriz->mdo_id, - 'mdc_tipo_disciplina' => 'obrigatoria' - ]); - - $moduloDisciplina2 = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ - 'mdc_dis_id' => $disciplina2->dis_id, - 'mdc_mdo_id' => $moduloMatriz->mdo_id, - 'mdc_tipo_disciplina' => 'obrigatoria', - 'mdc_pre_requisitos' => json_encode(['mdc_id' => $moduloDisciplina->mdc_id]) - ]); - - $moduloDisciplina3 = factory(Modulos\Academico\Models\ModuloDisciplina::class)->create([ - 'mdc_dis_id' => $disciplina3->dis_id, - 'mdc_mdo_id' => $moduloMatriz->mdo_id, - 'mdc_tipo_disciplina' => 'obrigatoria', - 'mdc_pre_requisitos' => json_encode(['mdc_id' => $moduloDisciplina->mdc_id]) - ]); - - $professor = factory(Modulos\Academico\Models\Professor::class)->create(); - - $ofertaDisciplina = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ - 'ofd_mdc_id' => $moduloDisciplina->mdc_id, - 'ofd_trm_id' => $turma->trm_id, - 'ofd_per_id' => $turma->trm_per_id, - 'ofd_prf_id' => $professor->prf_id, - 'ofd_tipo_avaliacao' => 'numerica', - 'ofd_qtd_vagas' => 500 - ]); - - $ofertaDisciplinaCancelado = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ - 'ofd_mdc_id' => $moduloDisciplina2->mdc_id, - 'ofd_trm_id' => $turma->trm_id, - 'ofd_per_id' => $turma->trm_per_id, - 'ofd_prf_id' => $professor->prf_id, - 'ofd_tipo_avaliacao' => 'numerica', - 'ofd_qtd_vagas' => 0 - ]); - - $ofertaDisciplinaReprovado = factory(Modulos\Academico\Models\OfertaDisciplina::class)->create([ - 'ofd_mdc_id' => $moduloDisciplina3->mdc_id, - 'ofd_trm_id' => $turma->trm_id, - 'ofd_per_id' => $turma->trm_per_id, - 'ofd_prf_id' => $professor->prf_id, - 'ofd_tipo_avaliacao' => 'numerica', - 'ofd_qtd_vagas' => 0 - ]); - - factory(\Modulos\Geral\Models\Titulacao::class, 7)->create(); - - $titulacaoProfessor = factory(Modulos\Geral\Models\TitulacaoInformacao::class)->create([ - 'tin_pes_id' => $professor->pessoa->pes_id, - 'tin_tit_id' => random_int(2, 7), - ]); - - $aluno = factory(\Modulos\Academico\Models\Aluno::class)->create(); - - $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create([ - 'mat_alu_id' => $aluno->alu_id, - 'mat_trm_id' => $turma->trm_id, - 'mat_pol_id' => $polo->pol_id, - 'mat_grp_id' => $grupo->grp_id - ]); - - $matriculaOfertaDisciplina = factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ - 'mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $ofertaDisciplina->ofd_id, - 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'cursando' - ]); - - factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ - 'mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $ofertaDisciplinaCancelado->ofd_id, - 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'cancelado' - ]); - - factory(Modulos\Academico\Models\MatriculaOfertaDisciplina::class)->create([ - 'mof_mat_id' => $matricula->mat_id, - 'mof_ofd_id' => $ofertaDisciplinaReprovado->ofd_id, - 'mof_tipo_matricula' => 'matriculacomum', - 'mof_situacao_matricula' => 'reprovado_media' - ]); - - - $rg = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 2, 'doc_conteudo' => '123456', 'doc_data_expedicao' => '10/10/2000']); - $cpf = $this->docrepo->create(['doc_pes_id' => $matricula->aluno->pessoa->pes_id, 'doc_tpd_id' => 1, 'doc_conteudo' => '123456']); - - return [$matriculaOfertaDisciplina, $moduloMatriz, $ofertaDisciplina, $matricula, $moduloDisciplina]; - } - - public function tearDown() - { - Artisan::call('migrate:reset'); - parent::tearDown(); - } -} + list(, $moduloMatriz, $ofertaDisciplina, $matriculaCurso, $modulodisciplina) = $data; + + $modulo = factory(\Modulos\Academico\Models\ModuloMatriz::class)->create(['mdo_mtc_id' => $moduloMatriz->mdo_mtc_id, 'mdo_nome' => 'Módulo de Teste']); + $modulodisciplina = factory(\Modulos\Academico\Models\ModuloDisciplina::class)->create(['mdc_mdo_id' => $modulo->mdo_id, 'mdc_pre_requisitos' => "[" . $modulodisciplina->mdc_id . "]"]); + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_qtd_vagas' => 100, 'ofd_mdc_id' => $modulodisciplina->mdc_id]); + $matricula = factory(\Modulos\Academico\Models\Matricula::class)->create(['mat_trm_id' => $matriculaCurso->mat_trm_id, 'mat_pol_id' => $matriculaCurso->mat_pol_id, 'mat_grp_id' => $matriculaCurso->mat_grp_id, 'mat_situacao' => 'cursando']); + + $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $oferta->ofd_id, 'trm_id' => $matricula->mat_trm_id, 'pol_id' => $matricula->mat_pol_id]); + $this->assertArrayHasKey('nao_matriculados', $response); + $this->assertArrayHasKey('cursando', $response); + $this->assertArrayHasKey('aprovados', $response); + $this->assertArrayHasKey('reprovados', $response); + $this->assertNotEmpty($response); + + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_tipo_matricula' => 'matriculacomum', 'mof_situacao_matricula' => 'cancelado']); + $response = $this->repo->getAlunosMatriculasLote(['ofd_id' => $oferta->ofd_id, 'trm_id' => $matricula->mat_trm_id, 'pol_id' => $matricula->mat_pol_id]); + $this->assertArrayHasKey('nao_matriculados', $response); + $this->assertArrayHasKey('cursando', $response); + $this->assertArrayHasKey('aprovados', $response); + $this->assertArrayHasKey('reprovados', $response); + $this->assertNotEmpty($response); + } + + public function testPaginateRequestByParametrosNoParemeters() + { + factory(\Modulos\Academico\Models\MatriculaOfertaDisciplina::class, 10)->create(); + + $response = $this->repo->paginateRequestByParametros(); + + $this->assertEmpty($response); + } + + public function testPaginateRequestByParametrosNullParemeters() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); + foreach ($matriculas as $matricula) { + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id]); + } + + $response = $this->repo->paginateRequestByParametros(['trm_id' => null, 'ofd_id' => null]); + + $this->assertEmpty($response); + } + + public function testPaginateRequestByParametros() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); + foreach ($matriculas as $matricula) { + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); + } + + $response = $this->repo->paginateRequestByParametros(['trm_id' => $turma->trm_id, 'ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); + + $this->assertNotEmpty($response); + } + + public function testPaginateRequestByParametrosWithOrderAndSearch() + { + $turma = factory(\Modulos\Academico\Models\Turma::class)->create(); + $matriculas = factory(\Modulos\Academico\Models\Matricula::class, 10)->create(['mat_trm_id' => $turma->trm_id]); + $oferta = factory(\Modulos\Academico\Models\OfertaDisciplina::class)->create(['ofd_trm_id' => $turma->trm_id]); + foreach ($matriculas as $matricula) { + factory(MatriculaOfertaDisciplina::class)->create(['mof_mat_id' => $matricula->mat_id, 'mof_ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando']); + } + + $response = $this->repo->paginateRequestByParametros(['trm_id' => $turma->trm_id, 'ofd_id' => $oferta->ofd_id, 'mof_situacao_matricula' => 'cursando', 'sort' => 'asc', 'field' => 'pes_nome', 'pol_id' => $matriculas[0]->mat_pol_id]); + + $this->assertNotEmpty($response); + } + + public function testCalculaNotasNumericaAprovadoMedia() + { + $matriculaOferta = $this->mockConf(); + + $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; + + $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { + return [$item->cfc_nome => $item->cfc_valor]; + })->toArray(); + + $response = $this->invokeMethod($this->repo, 'calculaNotas', + [ + [ + 'mof_nota1' => 7, + 'mof_nota2' => 7, + 'mof_nota3' => 7, + 'mof_final' => null, + 'mof_recuperacao' => '', + 'mof_conceito' => null + ], $configuracoesCurso + ]); + + $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); + } + + public function testCalculaNotasNumericaAprovadoFinal() + { + $matriculaOferta = $this->mockConf(); + + $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; + + $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { + return [$item->cfc_nome => $item->cfc_valor]; + })->toArray(); + + $response = $this->invokeMethod($this->repo, 'calculaNotas', + [ + [ + 'mof_nota1' => 7, + 'mof_nota2' => 4, + 'mof_nota3' => 4, + 'mof_final' => 7, + 'mof_recuperacao' => 5, + 'mof_conceito' => null + ], $configuracoesCurso + ]); + + + $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_final'); + } + + public function testCalculaNotasNumericaAprovadoRecuperacao() + { + $matriculaOferta = $this->mockConf(); + + $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; + + $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { + return [$item->cfc_nome => $item->cfc_valor]; + })->toArray(); + + $response = $this->invokeMethod($this->repo, 'calculaNotas', + [ + [ + 'mof_nota1' => 7, + 'mof_nota2' => 7, + 'mof_nota3' => 4, + 'mof_final' => null, + 'mof_recuperacao' => 7, + 'mof_conceito' => null + ], $configuracoesCurso + ]); + + + $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); + } + + public function testCalculaNotasNumericaAprovadoRecuperacaoSubstituirMenorNota() + { + $matriculaOferta = $this->mockConf(); + + $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; + + $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { + return [$item->cfc_nome => $item->cfc_valor]; + })->toArray(); + + $configuracoesCurso['modo_recuperacao'] = 'substituir_menor_nota'; + + $response = $this->invokeMethod($this->repo, 'calculaNotas', + [ + [ + 'mof_nota1' => 7, + 'mof_nota2' => 7, + 'mof_nota3' => 4, + 'mof_final' => null, + 'mof_recuperacao' => 7, + 'mof_conceito' => null + ], $configuracoesCurso + ]); + + + $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); + } + + public function testCalculaNotasConceitoAprovadoConceito() + { + $matriculaOferta = $this->mockConf(); + + $configsCurso = $matriculaOferta->ofertaDisciplina->turma->ofertaCurso->curso->configuracoes; + + $configuracoesCurso = $configsCurso->mapWithKeys(function ($item) { + return [$item->cfc_nome => $item->cfc_valor]; + })->toArray(); + + $response = $this->invokeMethod($this->repo, 'calculaNotas', + [ + [ + 'mof_conceito' => 'Bom' + ], $configuracoesCurso + ]); + + $this->assertEquals($response['mof_situacao_matricula'], 'aprovado_media'); + } + + public function testDelete() + { + $data = factory(MatriculaOfertaDisciplina::class)->create(); + $matriculaOfertaDisciplinaId = $data->mof_id; + + $response = $this->repo->delete($matriculaOfertaDisciplinaId); + + $this->assertEquals(1, $response); + } + + public function tearDown() + { + Artisan::call('migrate:reset'); + parent::tearDown(); + } + } From aa0bbb0636517864c3e29563413e0ecdcd43de3a Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Thu, 27 Sep 2018 19:19:32 -0300 Subject: [PATCH 17/17] =?UTF-8?q?Revis=C3=A3o=20de=20teste=20de=20AlunoRep?= =?UTF-8?q?ository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modulos/Academico/tests/Repositories/AlunoRepositoryTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php b/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php index 5a3c1a43..060b8b8f 100755 --- a/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php +++ b/modulos/Academico/tests/Repositories/AlunoRepositoryTest.php @@ -136,9 +136,8 @@ public function testDelete() public function testLists() { - $entries = factory(Aluno::class, 2)->create(); + factory(Aluno::class, 2)->create(); - $model = new Aluno(); $expected = Aluno::all()->pluck('alu_pes_id', 'alu_id'); $fromRepository = $this->repo->lists('alu_pes_id', 'alu_id'); @@ -147,7 +146,7 @@ public function testLists() public function testSearch() { - $entries = factory(Aluno::class, 2)->create(); + factory(Aluno::class, 2)->create(); $pessoa = factory(Pessoa::class)->create([ 'pes_nome' => 'Irineu',