From 69aca16b107b0b7552eb9f25c89f55f2a24805b6 Mon Sep 17 00:00:00 2001 From: bonot Date: Wed, 20 Jan 2021 09:13:24 -0300 Subject: [PATCH 01/19] Filtra por ano matriculas do regime ciclico --- app/Services/CyclicRegimeService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/CyclicRegimeService.php b/app/Services/CyclicRegimeService.php index b4a2d70279..a0bfabd076 100644 --- a/app/Services/CyclicRegimeService.php +++ b/app/Services/CyclicRegimeService.php @@ -26,6 +26,7 @@ public function getAllRegistrationsOfCycle($registration) foreach ($grades as $grade) { $result = LegacyRegistration::where('ref_ref_cod_serie', $grade->getKey()) ->where('ref_cod_aluno', $registration->ref_cod_aluno) + ->where('ano', $registration->ano) ->active() ->get() ->first(); From 17c33a5e27bde2344dbc1c36f050a03a91e199c0 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 13:54:20 -0300 Subject: [PATCH 02/19] Altera model para acessar atributo --- app/Models/LegacyStudent.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/LegacyStudent.php b/app/Models/LegacyStudent.php index 4f3dbf186e..132444f37c 100644 --- a/app/Models/LegacyStudent.php +++ b/app/Models/LegacyStudent.php @@ -83,6 +83,11 @@ public function getInepNumberAttribute() return $this->inep ? $this->inep->number : null; } + public function setStateRegistrationIdAttribute($value) + { + return $this->aluno_estado_id = $value; + } + public function inep() { return $this->hasOne(StudentInep::class, 'cod_aluno', 'cod_aluno'); From d6c071f5a7776b8b0ab675a2cac0a681d1e19cb4 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 13:54:58 -0300 Subject: [PATCH 03/19] =?UTF-8?q?Permite=20atualizar=20o=20n=C3=BAmero=20d?= =?UTF-8?q?e=20inscri=C3=A7=C3=A3o=20estadual=20do=20aluno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/StudentController.php | 29 +++++++++++++++++++ routes/api.php | 1 + tests/Feature/Api/StudentControllerTest.php | 26 +++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 app/Http/Controllers/Api/StudentController.php create mode 100644 tests/Feature/Api/StudentControllerTest.php diff --git a/app/Http/Controllers/Api/StudentController.php b/app/Http/Controllers/Api/StudentController.php new file mode 100644 index 0000000000..37ed9149d3 --- /dev/null +++ b/app/Http/Controllers/Api/StudentController.php @@ -0,0 +1,29 @@ +state_registration_id = $request->input('state_registration_id'); + $student->saveOrFail(); + + return $student; + } +} diff --git a/routes/api.php b/routes/api.php index e2df7b9e2b..b674bd1c06 100644 --- a/routes/api.php +++ b/routes/api.php @@ -18,6 +18,7 @@ Route::get('/postal-code/{postalCode}', 'Api\PostalCodeController@search'); Route::post('/students/{student}/rotate-picture', 'Api\StudentRotatePictureController@rotate'); +Route::put('/students/{student}/update-state-registration', 'Api\StudentController@updateStateRegistration'); Route::get('/school-class/calendars', 'Api\SchoolClassController@getCalendars'); Route::get('/school-class/stages/{schoolClass}', 'Api\SchoolClassController@getStages'); diff --git a/tests/Feature/Api/StudentControllerTest.php b/tests/Feature/Api/StudentControllerTest.php new file mode 100644 index 0000000000..ecf5b84674 --- /dev/null +++ b/tests/Feature/Api/StudentControllerTest.php @@ -0,0 +1,26 @@ +create(); + + $this->put("/api/students/{$student->getKey()}/update-state-registration", [ + 'state_registration_id' => 12345, + ]); + + $this->assertDatabaseHas($student->getTable(), [ + 'aluno_estado_id' => 12345, + ]); + } +} From b84dbef49c3324054161b1e1e694c8b693be4d6a Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 14:13:29 -0300 Subject: [PATCH 04/19] =?UTF-8?q?Implementa=20uma=20camada=20de=20seguran?= =?UTF-8?q?=C3=A7a=20para=20requisi=C3=A7=C3=B5es=20REST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Kernel.php | 5 ++++ app/Http/Middleware/CheckToken.php | 29 +++++++++++++++++++++ routes/api.php | 6 ++++- tests/Feature/Api/StudentControllerTest.php | 2 +- tests/TestCase.php | 12 +++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 app/Http/Middleware/CheckToken.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index bc93747b93..db3c90345f 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -46,6 +46,11 @@ class Kernel extends HttpKernel 'api' => [ 'bindings', ], + + 'api:rest' => [ + 'bindings', + \App\Http\Middleware\CheckToken::class, + ], ]; /** diff --git a/app/Http/Middleware/CheckToken.php b/app/Http/Middleware/CheckToken.php new file mode 100644 index 0000000000..e06f6bd259 --- /dev/null +++ b/app/Http/Middleware/CheckToken.php @@ -0,0 +1,29 @@ +bearerToken(); + + if ($token && config('legacy.apis.access_key') === $token) { + return $next($request); + } + + throw new UnauthorizedException(); + } +} diff --git a/routes/api.php b/routes/api.php index b674bd1c06..04465ffc18 100644 --- a/routes/api.php +++ b/routes/api.php @@ -18,7 +18,11 @@ Route::get('/postal-code/{postalCode}', 'Api\PostalCodeController@search'); Route::post('/students/{student}/rotate-picture', 'Api\StudentRotatePictureController@rotate'); -Route::put('/students/{student}/update-state-registration', 'Api\StudentController@updateStateRegistration'); +Route::group([ + 'middleware' => 'api:rest', +], function () { + Route::put('/students/{student}/update-state-registration', 'Api\StudentController@updateStateRegistration'); +}); Route::get('/school-class/calendars', 'Api\SchoolClassController@getCalendars'); Route::get('/school-class/stages/{schoolClass}', 'Api\SchoolClassController@getStages'); diff --git a/tests/Feature/Api/StudentControllerTest.php b/tests/Feature/Api/StudentControllerTest.php index ecf5b84674..cb611a2606 100644 --- a/tests/Feature/Api/StudentControllerTest.php +++ b/tests/Feature/Api/StudentControllerTest.php @@ -17,7 +17,7 @@ public function testUpdateStateRegistration() $this->put("/api/students/{$student->getKey()}/update-state-registration", [ 'state_registration_id' => 12345, - ]); + ], $this->getAuthorizationHeader()); $this->assertDatabaseHas($student->getTable(), [ 'aluno_estado_id' => 12345, diff --git a/tests/TestCase.php b/tests/TestCase.php index dcaa47bc67..0d280c6898 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -37,6 +37,18 @@ protected function enableForeignKeys() DB::statement('SET session_replication_role = DEFAULT;'); } + /** + * Retorna o header de autorização da API. + * + * @return string[] + */ + protected function getAuthorizationHeader() + { + return [ + 'Authorization' => 'Bearer ' . env('API_ACCESS_KEY') + ]; + } + /** * Método necessário para executar testes legados. * From e28d213501a1994b5d9835ead99995bf47658687 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 15:45:02 -0300 Subject: [PATCH 05/19] =?UTF-8?q?Cria=20regras=20de=20valida=C3=A7=C3=A3o?= =?UTF-8?q?=20para=20o=20registro=20de=20aluno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Rules/StateRegistrationFormatRule.php | 31 +++++++++++++++ app/Rules/StateRegistrationUniqueRule.php | 48 +++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 app/Rules/StateRegistrationFormatRule.php create mode 100644 app/Rules/StateRegistrationUniqueRule.php diff --git a/app/Rules/StateRegistrationFormatRule.php b/app/Rules/StateRegistrationFormatRule.php new file mode 100644 index 0000000000..3f9dd18c18 --- /dev/null +++ b/app/Rules/StateRegistrationFormatRule.php @@ -0,0 +1,31 @@ +studentToIgnore = $studentToIgnore; + } + + /** + * Determine if the validation rule passes. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + public function passes($attribute, $value) + { + return LegacyStudent::query() + ->where('aluno_estado_id', $value) + ->when($this->studentToIgnore, function ($query) use ($value) { + $query->where('cod_aluno', '<>', $this->studentToIgnore->getKey()); + }) + ->doesntExist(); + } + + /** + * Get the validation error message. + * + * @return string + */ + public function message() + { + return 'Já existe uma aluno com este número de inscrição.'; + } +} From 20643c4dda53a67a4414ad993e6e573a0af2ff0e Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 15:45:47 -0300 Subject: [PATCH 06/19] =?UTF-8?q?Altera=20requisi=C3=A7=C3=A3o=20e=20respo?= =?UTF-8?q?sta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/StudentController.php | 18 ++++---- .../Api/UpdateStateRegistrationRequest.php | 43 +++++++++++++++++++ 2 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 app/Http/Requests/Api/UpdateStateRegistrationRequest.php diff --git a/app/Http/Controllers/Api/StudentController.php b/app/Http/Controllers/Api/StudentController.php index 37ed9149d3..220fa462a9 100644 --- a/app/Http/Controllers/Api/StudentController.php +++ b/app/Http/Controllers/Api/StudentController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; +use App\Http\Requests\Api\UpdateStateRegistrationRequest; use App\Models\LegacyStudent; -use Illuminate\Http\Request; use Throwable; class StudentController extends Controller @@ -12,18 +12,20 @@ class StudentController extends Controller /** * Atualiza a inscrição estadual de um aluno. * - * @param Request $request - * @param LegacyStudent $student + * @param UpdateStateRegistrationRequest $request + * @param LegacyStudent $student * * @throws Throwable - * - * @return LegacyStudent + * @return array */ - public function updateStateRegistration(Request $request, LegacyStudent $student) + public function updateStateRegistration(UpdateStateRegistrationRequest $request, LegacyStudent $student) { - $student->state_registration_id = $request->input('state_registration_id'); + $student->state_registration_id = $request->getStateRegistration(); $student->saveOrFail(); - return $student; + return [ + 'id' => $student->getKey(), + 'state_registration_id' => $student->state_registration_id, + ]; } } diff --git a/app/Http/Requests/Api/UpdateStateRegistrationRequest.php b/app/Http/Requests/Api/UpdateStateRegistrationRequest.php new file mode 100644 index 0000000000..7985bd4149 --- /dev/null +++ b/app/Http/Requests/Api/UpdateStateRegistrationRequest.php @@ -0,0 +1,43 @@ + [ + new StateRegistrationFormatRule(), + new StateRegistrationUniqueRule($this->student), + ], + ]; + } + + /** + * @return string + */ + public function getStateRegistration() + { + return $this->input('state_registration_id'); + } +} From 141c00f932fae49bb9410827711e1deb0e8ae5c5 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 15:46:01 -0300 Subject: [PATCH 07/19] Ajusta getters e setters --- app/Models/LegacyStudent.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Models/LegacyStudent.php b/app/Models/LegacyStudent.php index 132444f37c..e3726930af 100644 --- a/app/Models/LegacyStudent.php +++ b/app/Models/LegacyStudent.php @@ -83,9 +83,14 @@ public function getInepNumberAttribute() return $this->inep ? $this->inep->number : null; } + public function getStateRegistrationIdAttribute() + { + return $this->aluno_estado_id; + } + public function setStateRegistrationIdAttribute($value) { - return $this->aluno_estado_id = $value; + $this->aluno_estado_id = $value; } public function inep() From 252cd1bf25ec919bb480bfacccc5945a1d09244b Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 15:46:07 -0300 Subject: [PATCH 08/19] Adiciona mais testes --- tests/Feature/Api/StudentControllerTest.php | 75 ++++++++++++++++++++- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Api/StudentControllerTest.php b/tests/Feature/Api/StudentControllerTest.php index cb611a2606..1812ebab1c 100644 --- a/tests/Feature/Api/StudentControllerTest.php +++ b/tests/Feature/Api/StudentControllerTest.php @@ -4,6 +4,7 @@ use App\Models\LegacyStudent; use Illuminate\Foundation\Testing\DatabaseTransactions; +use Illuminate\Validation\ValidationException; use Tests\TestCase; class StudentControllerTest extends TestCase @@ -15,12 +16,80 @@ public function testUpdateStateRegistration() /** @var LegacyStudent $student */ $student = factory(LegacyStudent::class)->create(); - $this->put("/api/students/{$student->getKey()}/update-state-registration", [ - 'state_registration_id' => 12345, + $stateRegistration = '000.000.000'; + + $response = $this->put("/api/students/{$student->getKey()}/update-state-registration", [ + 'state_registration_id' => $stateRegistration, ], $this->getAuthorizationHeader()); + $response->assertSuccessful(); + $response->assertJson([ + 'id' => $student->getKey(), + 'state_registration_id' => $stateRegistration, + ]); + $this->assertDatabaseHas($student->getTable(), [ - 'aluno_estado_id' => 12345, + 'cod_aluno' => $student->getKey(), + 'aluno_estado_id' => $stateRegistration, + ]); + } + + public function testUpdateStateRegistrationWithDigit() + { + /** @var LegacyStudent $student */ + $student = factory(LegacyStudent::class)->create(); + + $stateRegistration = '000.000.000-1'; + + $response = $this->put("/api/students/{$student->getKey()}/update-state-registration", [ + 'state_registration_id' => $stateRegistration, + ], $this->getAuthorizationHeader()); + + $response->assertSuccessful(); + $response->assertJson([ + 'id' => $student->getKey(), + 'state_registration_id' => $stateRegistration, + ]); + + $this->assertDatabaseHas($student->getTable(), [ + 'cod_aluno' => $student->getKey(), + 'aluno_estado_id' => $stateRegistration, + ]); + } + + public function testUpdateStateRegistrationDuplicated() + { + $this->expectException(ValidationException::class); + + $stateRegistration = '000.000.000'; + + /** @var LegacyStudent $student */ + $student = factory(LegacyStudent::class)->create(); + + factory(LegacyStudent::class)->create([ + 'aluno_estado_id' => $stateRegistration, ]); + + $response = $this->put("/api/students/{$student->getKey()}/update-state-registration", [ + 'state_registration_id' => $stateRegistration, + ], $this->getAuthorizationHeader()); + + $response->assertJson([]); + } + + public function testUpdateStateRegistrationInvalid() + { + $this->expectException(ValidationException::class); + + /** @var LegacyStudent $student */ + $student = factory(LegacyStudent::class)->create(); + + $stateRegistration = 1234; + + $response = $this->put("/api/students/{$student->getKey()}/update-state-registration", [ + 'state_registration_id' => $stateRegistration, + ], $this->getAuthorizationHeader()); + + $response->assertJson([]); } } From c8a3684004c392baa6c0b5e5593d16d3e321bfc7 Mon Sep 17 00:00:00 2001 From: gustavomendess Date: Thu, 21 Jan 2021 10:27:04 -0300 Subject: [PATCH 09/19] =?UTF-8?q?Melhora=20view=20info=20enrollment=20para?= =?UTF-8?q?=20n=C3=A3o=20pegar=20as=20turmas=20inativas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/sqls/views/public.info_enrollment.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/sqls/views/public.info_enrollment.sql b/database/sqls/views/public.info_enrollment.sql index 7a9a2a829d..4f79e01635 100644 --- a/database/sqls/views/public.info_enrollment.sql +++ b/database/sqls/views/public.info_enrollment.sql @@ -43,4 +43,5 @@ from pmieducar.matricula_turma enturmacao inner join pmieducar.matricula matricula on true and matricula.cod_matricula = enturmacao.ref_cod_matricula inner join pmieducar.turma turma on true -and turma.cod_turma = enturmacao.ref_cod_turma; +and turma.cod_turma = enturmacao.ref_cod_turma +and turma.ativo = 1; From c57ef7247a7585d52a55e0d805167cacdc31f4d6 Mon Sep 17 00:00:00 2001 From: gustavomendess Date: Thu, 21 Jan 2021 15:14:07 -0300 Subject: [PATCH 10/19] =?UTF-8?q?Ordena=20regras=20de=20avalia=C3=A7=C3=A3?= =?UTF-8?q?o=20pelos=20ultimos=20anos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ieducar/intranet/educar_serie_cad.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ieducar/intranet/educar_serie_cad.php b/ieducar/intranet/educar_serie_cad.php index 7107daf4ff..3cbf7823a5 100644 --- a/ieducar/intranet/educar_serie_cad.php +++ b/ieducar/intranet/educar_serie_cad.php @@ -111,7 +111,7 @@ public function Inicializar() ],[ 'serie' => $this->cod_serie ], - [], + ['ano_letivo' => 'DESC'], false ); } From 7faf096d5483377dfd6c33af81f1208bdd2fe66d Mon Sep 17 00:00:00 2001 From: gustavomendess Date: Fri, 22 Jan 2021 14:51:50 -0300 Subject: [PATCH 11/19] =?UTF-8?q?Cria=20helper=20que=20traga=20todas=20as?= =?UTF-8?q?=20escolas=20sem=20restri=C3=A7=C3=B5es=20por=20usu=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../educar_transferencia_solicitacao_cad.php | 2 +- .../EscolaSemFiltroPorUsuario.php | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ieducar/lib/Portabilis/View/Helper/DynamicInput/EscolaSemFiltroPorUsuario.php diff --git a/ieducar/intranet/educar_transferencia_solicitacao_cad.php b/ieducar/intranet/educar_transferencia_solicitacao_cad.php index 47000526ab..42df793f66 100644 --- a/ieducar/intranet/educar_transferencia_solicitacao_cad.php +++ b/ieducar/intranet/educar_transferencia_solicitacao_cad.php @@ -163,7 +163,7 @@ public function Gerar() $ref_cod_instituicao = $det_matricula['ref_cod_instituicao']; $this->inputsHelper()->dynamic(['instituicao'], ['required' => false]); - $this->inputsHelper()->dynamic(['escola'], ['label_hint' => 'Destino do aluno', 'required' => false]); + $this->inputsHelper()->dynamic(['escolaSemFiltroPorUsuario'], ['label_hint' => 'Destino do aluno', 'required' => false]); $this->inputsHelper()->checkbox('escola_em_outro_municipio', ['label' => 'Escola em outro municipio?', ]); $this->campoTexto('escola_destino_externa', 'Nome da escola ', '', 30, 255, false, false, false, ''); $this->campoTexto('estado_escola_destino_externa', 'Estado da escola ', '', 20, 50, false, false, false, ''); diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/EscolaSemFiltroPorUsuario.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/EscolaSemFiltroPorUsuario.php new file mode 100644 index 0000000000..b81e571fcb --- /dev/null +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/EscolaSemFiltroPorUsuario.php @@ -0,0 +1,33 @@ +getEscolaId($value); + } + + protected function inputName() + { + return 'ref_cod_escola'; + } + + protected function inputOptions($options) + { + $instituicaoId = $this->getInstituicaoId($options['instituicaoId'] ?? null); + $resources = App_Model_IedFinder::getEscolas($instituicaoId); + + return $this->insertOption(null, 'Selecione uma escola', $resources); + } + + public function escolaSemFiltroPorUsuario($options = []) + { + $this->select($options); + Portabilis_View_Helper_Application::loadChosenLib($this->viewInstance); + Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, '/modules/DynamicInput/Assets/Javascripts/Escola.js'); + } +} From f91bfb6d9ff2a7a7e36e77218a41b384c93c3ade Mon Sep 17 00:00:00 2001 From: gustavomendess Date: Fri, 22 Jan 2021 15:37:55 -0300 Subject: [PATCH 12/19] =?UTF-8?q?Remove=20condi=C3=A7=C3=A3o=20adicionada?= =?UTF-8?q?=20para=20testar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/sqls/views/public.info_enrollment.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/database/sqls/views/public.info_enrollment.sql b/database/sqls/views/public.info_enrollment.sql index 4f79e01635..7a9a2a829d 100644 --- a/database/sqls/views/public.info_enrollment.sql +++ b/database/sqls/views/public.info_enrollment.sql @@ -43,5 +43,4 @@ from pmieducar.matricula_turma enturmacao inner join pmieducar.matricula matricula on true and matricula.cod_matricula = enturmacao.ref_cod_matricula inner join pmieducar.turma turma on true -and turma.cod_turma = enturmacao.ref_cod_turma -and turma.ativo = 1; +and turma.cod_turma = enturmacao.ref_cod_turma; From 7f4259e471a26335f10a2584ea439fb0c115150e Mon Sep 17 00:00:00 2001 From: gustavomendess Date: Fri, 22 Jan 2021 16:02:31 -0300 Subject: [PATCH 13/19] Volta como estava antes --- database/sqls/views/public.info_enrollment.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/sqls/views/public.info_enrollment.sql b/database/sqls/views/public.info_enrollment.sql index 7a9a2a829d..4f79e01635 100644 --- a/database/sqls/views/public.info_enrollment.sql +++ b/database/sqls/views/public.info_enrollment.sql @@ -43,4 +43,5 @@ from pmieducar.matricula_turma enturmacao inner join pmieducar.matricula matricula on true and matricula.cod_matricula = enturmacao.ref_cod_matricula inner join pmieducar.turma turma on true -and turma.cod_turma = enturmacao.ref_cod_turma; +and turma.cod_turma = enturmacao.ref_cod_turma +and turma.ativo = 1; From 702ae1556ecc50d0abe9c35cbb8adbf18dc9f58f Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Fri, 22 Jan 2021 18:33:15 -0300 Subject: [PATCH 14/19] =?UTF-8?q?Atualiza=20depend=C3=AAncias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 217 +++++++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 107 deletions(-) diff --git a/composer.lock b/composer.lock index 4890633dd4..72ddfef9c2 100644 --- a/composer.lock +++ b/composer.lock @@ -64,16 +64,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.171.16", + "version": "3.172.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "216ff33ce238c30cf793973262ea727f2ce41224" + "reference": "5a5e66c4d54c392042820703eeb8a6bd3d222924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/216ff33ce238c30cf793973262ea727f2ce41224", - "reference": "216ff33ce238c30cf793973262ea727f2ce41224", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/5a5e66c4d54c392042820703eeb8a6bd3d222924", + "reference": "5a5e66c4d54c392042820703eeb8a6bd3d222924", "shasum": "" }, "require": { @@ -148,9 +148,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.171.16" + "source": "https://github.com/aws/aws-sdk-php/tree/3.172.0" }, - "time": "2021-01-12T19:12:49+00:00" + "time": "2021-01-22T19:21:38+00:00" }, { "name": "aws/aws-sdk-php-laravel", @@ -228,26 +228,26 @@ }, { "name": "brick/math", - "version": "0.9.1", + "version": "0.9.2", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "283a40c901101e66de7061bd359252c013dcc43c" + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/283a40c901101e66de7061bd359252c013dcc43c", - "reference": "283a40c901101e66de7061bd359252c013dcc43c", + "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15|^8.5", - "vimeo/psalm": "^3.5" + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.3.2" }, "type": "library", "autoload": { @@ -272,7 +272,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/master" + "source": "https://github.com/brick/math/tree/0.9.2" }, "funding": [ { @@ -280,20 +280,20 @@ "type": "tidelift" } ], - "time": "2020-08-18T23:57:15+00:00" + "time": "2021-01-20T22:51:39+00:00" }, { "name": "cakephp/chronos", - "version": "2.0.6", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "30baea51824076719921c6c2d720bfd6b49e6dca" + "reference": "3f119d1eb8105ed2c43bb72e8fc5c78487620089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/30baea51824076719921c6c2d720bfd6b49e6dca", - "reference": "30baea51824076719921c6c2d720bfd6b49e6dca", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/3f119d1eb8105ed2c43bb72e8fc5c78487620089", + "reference": "3f119d1eb8105ed2c43bb72e8fc5c78487620089", "shasum": "" }, "require": { @@ -301,8 +301,7 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^4.0", - "phpbench/phpbench": "^1.0@dev", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "autoload": { @@ -340,7 +339,7 @@ "issues": "https://github.com/cakephp/chronos/issues", "source": "https://github.com/cakephp/chronos" }, - "time": "2020-08-22T02:42:12+00:00" + "time": "2021-01-16T14:35:30+00:00" }, { "name": "cocur/slugify", @@ -1917,16 +1916,16 @@ }, { "name": "laravel/framework", - "version": "v7.30.2", + "version": "v7.30.4", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "405ca2bcf532dff1ef27f9f7ff7940221c575c84" + "reference": "9dd38140dc2924daa1a020a3d7a45f9ceff03df3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/405ca2bcf532dff1ef27f9f7ff7940221c575c84", - "reference": "405ca2bcf532dff1ef27f9f7ff7940221c575c84", + "url": "https://api.github.com/repos/laravel/framework/zipball/9dd38140dc2924daa1a020a3d7a45f9ceff03df3", + "reference": "9dd38140dc2924daa1a020a3d7a45f9ceff03df3", "shasum": "" }, "require": { @@ -2075,7 +2074,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-01-13T13:37:00+00:00" + "time": "2021-01-21T14:10:48+00:00" }, { "name": "laravel/horizon", @@ -2707,16 +2706,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa" + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/353f66d7555d8a90781f6f5e7091932f9a4250aa", - "reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", "shasum": "" }, "require": { @@ -2724,8 +2723,9 @@ "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.36", - "phpunit/phpunit": "^8.5.8" + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" }, "type": "library", "autoload": { @@ -2746,7 +2746,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.5.1" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" }, "funding": [ { @@ -2758,7 +2758,7 @@ "type": "tidelift" } ], - "time": "2020-10-18T11:50:25+00:00" + "time": "2021-01-18T20:58:21+00:00" }, { "name": "maatwebsite/excel", @@ -3010,20 +3010,20 @@ }, { "name": "markbaker/matrix", - "version": "2.0.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a" + "reference": "35a2d1a919a1de732402f694925168c53c17c838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", - "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/35a2d1a919a1de732402f694925168c53c17c838", + "reference": "35a2d1a919a1de732402f694925168c53c17c838", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", @@ -3041,22 +3041,22 @@ "Matrix\\": "classes/src/" }, "files": [ - "classes/src/functions/adjoint.php", - "classes/src/functions/antidiagonal.php", - "classes/src/functions/cofactors.php", - "classes/src/functions/determinant.php", - "classes/src/functions/diagonal.php", - "classes/src/functions/identity.php", - "classes/src/functions/inverse.php", - "classes/src/functions/minors.php", - "classes/src/functions/trace.php", - "classes/src/functions/transpose.php", - "classes/src/operations/add.php", - "classes/src/operations/directsum.php", - "classes/src/operations/subtract.php", - "classes/src/operations/multiply.php", - "classes/src/operations/divideby.php", - "classes/src/operations/divideinto.php" + "classes/src/Functions/adjoint.php", + "classes/src/Functions/antidiagonal.php", + "classes/src/Functions/cofactors.php", + "classes/src/Functions/determinant.php", + "classes/src/Functions/diagonal.php", + "classes/src/Functions/identity.php", + "classes/src/Functions/inverse.php", + "classes/src/Functions/minors.php", + "classes/src/Functions/trace.php", + "classes/src/Functions/transpose.php", + "classes/src/Operations/add.php", + "classes/src/Operations/directsum.php", + "classes/src/Operations/subtract.php", + "classes/src/Operations/multiply.php", + "classes/src/Operations/divideby.php", + "classes/src/Operations/divideinto.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3078,9 +3078,9 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/PHP8" + "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.1" }, - "time": "2020-08-28T17:11:00+00:00" + "time": "2021-01-21T13:53:09+00:00" }, { "name": "mll-lab/graphql-php-scalars", @@ -4457,16 +4457,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.5", + "version": "v0.10.6", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7c710551d4a2653afa259c544508dc18a9098956" + "reference": "6f990c19f91729de8b31e639d6e204ea59f19cf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7c710551d4a2653afa259c544508dc18a9098956", - "reference": "7c710551d4a2653afa259c544508dc18a9098956", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/6f990c19f91729de8b31e639d6e204ea59f19cf3", + "reference": "6f990c19f91729de8b31e639d6e204ea59f19cf3", "shasum": "" }, "require": { @@ -4495,7 +4495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.10.x-dev" + "dev-main": "0.10.x-dev" } }, "autoload": { @@ -4527,9 +4527,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.10.5" + "source": "https://github.com/bobthecow/psysh/tree/v0.10.6" }, - "time": "2020-12-04T02:51:30+00:00" + "time": "2021-01-18T15:53:43+00:00" }, { "name": "ralouphie/getallheaders", @@ -4577,16 +4577,16 @@ }, { "name": "ramsey/collection", - "version": "1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "24d93aefb2cd786b7edd9f45b554aea20b28b9b1" + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/24d93aefb2cd786b7edd9f45b554aea20b28b9b1", - "reference": "24d93aefb2cd786b7edd9f45b554aea20b28b9b1", + "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", "shasum": "" }, "require": { @@ -4596,19 +4596,19 @@ "captainhook/captainhook": "^5.3", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.6", - "fzaninotto/faker": "^1.5", + "fakerphp/faker": "^1.5", "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.6", + "jangregor/phpstan-prophecy": "^0.8", "mockery/mockery": "^1.3", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^0.12.32", "phpstan/phpstan-mockery": "^0.12.5", "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5 || ^9", "psy/psysh": "^0.10.4", "slevomat/coding-standard": "^6.3", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^3.12.2" + "vimeo/psalm": "^4.4" }, "type": "library", "autoload": { @@ -4638,15 +4638,19 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.1.1" + "source": "https://github.com/ramsey/collection/tree/1.1.3" }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" } ], - "time": "2020-09-10T20:58:17+00:00" + "time": "2021-01-21T17:40:04+00:00" }, { "name": "ramsey/uuid", @@ -7348,16 +7352,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.1.8", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32" + "reference": "da64796370fc4eb03cc277088f6fede9fde88482" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/da64796370fc4eb03cc277088f6fede9fde88482", + "reference": "da64796370fc4eb03cc277088f6fede9fde88482", "shasum": "" }, "require": { @@ -7369,7 +7373,7 @@ "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -7410,7 +7414,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/4.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.0" }, "funding": [ { @@ -7422,7 +7426,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T19:22:52+00:00" + "time": "2021-01-20T15:11:48+00:00" }, { "name": "voku/portable-ascii", @@ -8177,16 +8181,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.17.3", + "version": "v2.18.1", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595" + "reference": "c68ff6231adb276857761e43b7ed082f164dce0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bd32f5dd72cdfc7b53f54077f980e144bfa2f595", - "reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c68ff6231adb276857761e43b7ed082f164dce0b", + "reference": "c68ff6231adb276857761e43b7ed082f164dce0b", "shasum": "" }, "require": { @@ -8208,7 +8212,6 @@ "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", "keradus/cli-executor": "^1.4", "mikey179/vfsstream": "^1.6", @@ -8217,11 +8220,11 @@ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.1", + "symfony/phpunit-bridge": "^5.2.1", "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { @@ -8269,7 +8272,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.17.3" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.1" }, "funding": [ { @@ -8277,7 +8280,7 @@ "type": "github" } ], - "time": "2020-12-24T11:14:44+00:00" + "time": "2021-01-21T18:50:42+00:00" }, { "name": "fzaninotto/faker", @@ -8526,16 +8529,16 @@ }, { "name": "maximebf/debugbar", - "version": "v1.16.4", + "version": "v1.16.5", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "c86c717e4bf3c6d98422da5c38bfa7b0f494b04c" + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/c86c717e4bf3c6d98422da5c38bfa7b0f494b04c", - "reference": "c86c717e4bf3c6d98422da5c38bfa7b0f494b04c", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62", "shasum": "" }, "require": { @@ -8585,9 +8588,9 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.16.4" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.16.5" }, - "time": "2020-12-07T10:48:48+00:00" + "time": "2020-12-07T11:07:24+00:00" }, { "name": "mockery/mockery", @@ -9685,16 +9688,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.13", + "version": "8.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8e86be391a58104ef86037ba8a846524528d784e" + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e86be391a58104ef86037ba8a846524528d784e", - "reference": "8e86be391a58104ef86037ba8a846524528d784e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c25f79895d27b6ecd5abfa63de1606b786a461a3", + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3", "shasum": "" }, "require": { @@ -9766,7 +9769,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.14" }, "funding": [ { @@ -9778,7 +9781,7 @@ "type": "github" } ], - "time": "2020-12-01T04:53:52+00:00" + "time": "2021-01-17T07:37:30+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -10894,12 +10897,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -10937,8 +10940,8 @@ "validate" ], "support": { - "issues": "https://github.com/webmozart/assert/issues", - "source": "https://github.com/webmozart/assert/tree/master" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" }, "time": "2020-07-08T17:02:28+00:00" } From 85e32a3b511094b4ee894d80ef2a2ddeea335479 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Wed, 20 Jan 2021 18:42:31 -0300 Subject: [PATCH 15/19] Corrige casts de datas dos models --- app/Models/LegacyAcademicYearStage.php | 3 +++ app/Models/LegacyEnrollment.php | 3 +++ app/Models/LegacySchoolClassStage.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/app/Models/LegacyAcademicYearStage.php b/app/Models/LegacyAcademicYearStage.php index da8edd2144..5beefda03f 100644 --- a/app/Models/LegacyAcademicYearStage.php +++ b/app/Models/LegacyAcademicYearStage.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Support\Database\DateSerializer; use Illuminate\Database\Eloquent\Model; /** @@ -11,6 +12,8 @@ */ class LegacyAcademicYearStage extends Model { + use DateSerializer; + /** * @var string */ diff --git a/app/Models/LegacyEnrollment.php b/app/Models/LegacyEnrollment.php index 96f5feea24..5659cda397 100644 --- a/app/Models/LegacyEnrollment.php +++ b/app/Models/LegacyEnrollment.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Support\Database\DateSerializer; use App\User; use DateTime; use Illuminate\Database\Eloquent\Builder; @@ -21,6 +22,8 @@ */ class LegacyEnrollment extends Model { + use DateSerializer; + /** * @var string */ diff --git a/app/Models/LegacySchoolClassStage.php b/app/Models/LegacySchoolClassStage.php index 6dc85e25d8..ef8d7d4c04 100644 --- a/app/Models/LegacySchoolClassStage.php +++ b/app/Models/LegacySchoolClassStage.php @@ -2,10 +2,13 @@ namespace App\Models; +use App\Support\Database\DateSerializer; use Illuminate\Database\Eloquent\Model; class LegacySchoolClassStage extends Model { + use DateSerializer; + /** * @var string */ From 85a63acb14d2c4bd93bcd1c001e0b9c0c7221c03 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Mon, 25 Jan 2021 09:22:58 -0300 Subject: [PATCH 16/19] =?UTF-8?q?Exibe=20observa=C3=A7=C3=B5es=20de=20tran?= =?UTF-8?q?sfer=C3=AAncia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ieducar/intranet/educar_matricula_det.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ieducar/intranet/educar_matricula_det.php b/ieducar/intranet/educar_matricula_det.php index acb1c82622..662a932f5d 100644 --- a/ieducar/intranet/educar_matricula_det.php +++ b/ieducar/intranet/educar_matricula_det.php @@ -219,7 +219,7 @@ public function Gerar() $situacao = App_Model_MatriculaSituacao::getSituacao($registro['aprovado']); $this->addDetalhe(['Situação', $situacao]); - if ($registro['aprovado'] == 4) { + if ($registro['aprovado'] == App_Model_MatriculaSituacao::TRANSFERIDO) { $obj_transferencia = new clsPmieducarTransferenciaSolicitacao(); $lst_transferencia = $obj_transferencia->lista(null, null, null, null, null, $registro['cod_matricula'], null, null, null, null, null, 1, null, null, $registro['ref_cod_aluno'], false); @@ -236,23 +236,24 @@ public function Gerar() $this->addDetalhe(['Estado escola destino', $det_transferencia['estado_escola_destino_externa']]); $this->addDetalhe(['Município escola destino', $det_transferencia['municipio_escola_destino_externa']]); } + $this->addDetalhe(['Observação', $registro['observacao']]); } if ($registro['aprovado'] == App_Model_MatriculaSituacao::FALECIDO) { - $this->addDetalhe(['Observação', Portabilis_String_Utils::toLatin1($registro['observacao'])]); + $this->addDetalhe(['Observação', $registro['observacao']]); } if ($existeSaidaEscola) { $this->addDetalhe(['Saída da escola', 'Sim']); $this->addDetalhe(['Data de saída da escola', Portabilis_Date_Utils::pgSQLToBr($registro['data_saida_escola'])]); - $this->addDetalhe(['Observação', Portabilis_String_Utils::toLatin1($registro['observacao'])]); + $this->addDetalhe(['Observação', $registro['observacao']]); } if ($registro['aprovado'] == App_Model_MatriculaSituacao::ABANDONO) { $tipoAbandono = new clsPmieducarAbandonoTipo($registro['ref_cod_abandono_tipo']); $tipoAbandono = $tipoAbandono->detalhe(); - $observacaoAbandono = Portabilis_String_Utils::toLatin1($registro['observacao']); + $observacaoAbandono = $registro['observacao']; $this->addDetalhe(['Motivo do Abandono', $tipoAbandono['nome']]); $this->addDetalhe(['Observação', $observacaoAbandono]); From 932c0803c68802346a7e130ee9bd14d1e3fddf66 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Mon, 25 Jan 2021 11:32:57 -0300 Subject: [PATCH 17/19] =?UTF-8?q?Pega=20observa=C3=A7=C3=A3o=20do=20campo?= =?UTF-8?q?=20correto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ieducar/intranet/educar_matricula_det.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ieducar/intranet/educar_matricula_det.php b/ieducar/intranet/educar_matricula_det.php index 662a932f5d..62b6c98626 100644 --- a/ieducar/intranet/educar_matricula_det.php +++ b/ieducar/intranet/educar_matricula_det.php @@ -236,7 +236,7 @@ public function Gerar() $this->addDetalhe(['Estado escola destino', $det_transferencia['estado_escola_destino_externa']]); $this->addDetalhe(['Município escola destino', $det_transferencia['municipio_escola_destino_externa']]); } - $this->addDetalhe(['Observação', $registro['observacao']]); + $this->addDetalhe(['Observação', $det_transferencia['observacao']]); } if ($registro['aprovado'] == App_Model_MatriculaSituacao::FALECIDO) { From 07609205383e41950fb5bb1d2ecd59f1b3bec2b1 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Mon, 25 Jan 2021 16:28:05 -0300 Subject: [PATCH 18/19] Roda actions na branch master --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index acbd50efb8..302133ae61 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,13 @@ name: tests on: push: - branches: 2.* + branches: + - 2.* + - master pull_request: - branches: 2.* + branches: + - 2.* + - master jobs: default: From 196e4e2792b2faa7198e45d371bb9de708161ab6 Mon Sep 17 00:00:00 2001 From: Eder Soares Date: Mon, 25 Jan 2021 17:11:36 -0300 Subject: [PATCH 19/19] Atualiza readme --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 4b1849888c..c7eeb002a9 100644 --- a/readme.md +++ b/readme.md @@ -67,7 +67,7 @@ ajudar a alcançar nossos objetivos. - [Instalação do pacote de relatórios](#instalação-do-pacote-de-relatórios) - [Upgrade](#upgrade) -### Depêndencias +### Dependência Para executar o projeto é necessário a utilização de alguns softwares para facilitar o desenvolvimento. @@ -81,8 +81,9 @@ facilitar o desenvolvimento. #### Servidor - [PHP](http://php.net/) versão 7.4 -- [Postgres](https://www.postgresql.org/) versão 9.5 (exata) +- [Postgres](https://www.postgresql.org/) versão 9.5 - [Nginx](https://www.nginx.com/) +- [Redis](https://redis.io/) As seguintes extensões do PHP são necessárias: