Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[2.2] Upgrade #525

Merged
merged 584 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
584 commits
Select commit Hold shift + click to select a range
a457ac9
Merge pull request #545 from edersoares/remove-font
edersoares Mar 24, 2019
678502d
Remove arquivo xml_acervo_geral.php e xml_escola.php
edersoares Mar 24, 2019
240aa02
Remove: urbano_cep_logradouro_bairro_xml.php
edersoares Mar 24, 2019
e10f956
Remove arquivos _xml.php não referenciados
edersoares Mar 24, 2019
d4ca92e
Merge pull request #546 from edersoares/remove-xml
edersoares Mar 24, 2019
1c07b2d
Utiliza helper config ao invés de $coreExt
edersoares Mar 24, 2019
5c3d087
Remove referências a clsConfig
edersoares Mar 24, 2019
93898e9
Corrige teste ViewTest
edersoares Mar 24, 2019
091127a
Remove arquivos clsConfig
edersoares Mar 24, 2019
d3d3d18
Remove arquivo de constantes
edersoares Mar 24, 2019
ffd4d0d
Merge pull request #547 from edersoares/remove-config
edersoares Mar 24, 2019
1282f7d
Merge branch 'version-2.1.7' into 2.2
edersoares Apr 8, 2019
9c2e36f
Migrations da versão 2.1.7
edersoares Apr 9, 2019
a7cabd7
Altera views para funcionar corretamente as migrations
edersoares Apr 9, 2019
2d2f968
Merge pull request #555 from portabilis/version-2.1.7
edersoares Apr 9, 2019
8c30b4f
Merge branch '2.2' into version-2.1.8
edersoares Apr 15, 2019
0732c88
Remove dependência não necessária
edersoares Apr 15, 2019
0e726bb
Migrations 2.1.8
edersoares Apr 15, 2019
898defd
Merge pull request #558 from edersoares/version-2.1.8
edersoares Apr 15, 2019
09889b8
Merge branch 'portabilis-patch-2019-04-26' into 2.2
edersoares Apr 28, 2019
c1876b6
Desabilita Dusk
edersoares Apr 28, 2019
237076e
Migration da versão 2.1.9
edersoares Apr 28, 2019
b6ec982
Corrige problemas de merge
edersoares Apr 28, 2019
ee261fb
Ajuste ao carregar configurações
edersoares Apr 28, 2019
ba8f383
Merge branch 'master' into version-2.1.9
edersoares Apr 29, 2019
9758463
Merge pull request #562 from portabilis/version-2.1.9
edersoares Apr 29, 2019
bc99d38
Remove migrations de inserções
edersoares May 6, 2019
c50700c
Corrige diretório dos arquivos SQLs
edersoares May 6, 2019
7a701ec
Define o seeder inicial
edersoares May 6, 2019
446d140
converte migrations de insert em seeders
DaniloBenevides Apr 20, 2019
91f2d68
Merge branch 'master' into version-2.1.10
edersoares May 7, 2019
36bff34
Migration da versão 2.1.10
edersoares May 7, 2019
158af34
Merge pull request #566 from portabilis/version-2.1.10
edersoares May 7, 2019
5bd5c86
Revert "Remove função commacat_ignore_nulls"
edersoares May 7, 2019
99212f1
Aggregates
edersoares May 7, 2019
f2c0801
Corrige método down dos aggregates
edersoares May 7, 2019
1313154
Corrige rollback de migrations
edersoares May 7, 2019
5295ab3
Merge pull request #559 from DaniloBenevides/converte-migrations-de-i…
edersoares May 8, 2019
29c51ce
Atualiza comando de nova instalação
edersoares May 8, 2019
36726c1
Merge pull request #567 from portabilis/seeder
edersoares May 8, 2019
c6042a5
Substitui as ocorrências da variável global $coreExt
edersoares May 8, 2019
4da8789
Substitui as ocorrências de $GLOBALS
edersoares May 8, 2019
dbb861b
Merge pull request #568 from edersoares/core-ext
edersoares May 8, 2019
4c200ad
Revert "Remove função count_weekdays"
edersoares May 8, 2019
4dd6e6c
Merge branch 'master' into version-2.1.11
edersoares May 14, 2019
b4d7aee
Remove menu do Educacenso
edersoares May 17, 2019
28ce3a3
Insere dados padrões via migration
edersoares May 17, 2019
e82fdac
Corrige acentuação de municípios
edersoares May 17, 2019
b990444
Corrige acentuação de distritos
edersoares May 17, 2019
4d74b53
Menus
edersoares May 17, 2019
31421b4
Novos seeders
edersoares May 17, 2019
6fda6a4
Ajusta seeder dos menus
edersoares May 17, 2019
7d262e9
Migrations da versão 2.1.11
edersoares May 17, 2019
2ddc8c1
Migration para os dados padrões
edersoares May 17, 2019
76db75e
Merge pull request #571 from edersoares/version-2.1.11
edersoares May 19, 2019
6dfddcc
Merge branch 'portabilis-patch-2019-05-19' into 2.2
edersoares May 19, 2019
d7b6005
Migrations da versão 2.1.12
edersoares May 19, 2019
bdae223
Seeders da versão 2.1.12
edersoares May 19, 2019
1fc4559
Merge branch 'master' into version-2.1.12
edersoares May 20, 2019
87dcf5f
Merge pull request #574 from edersoares/version-2.1.12
edersoares May 20, 2019
796f357
Próximo ID do menu
edersoares May 21, 2019
2c58a92
Remove referências da tabela cadastro.documento
edersoares May 21, 2019
ae0e59b
Remove referências da tabela cadastro.endereco_externo
edersoares May 21, 2019
921caf7
Remove referências da tabela cadastro.endereco_pessoa
edersoares May 21, 2019
fbbbd53
Remove referências da tabela cadastro.fisica_cpf
edersoares May 21, 2019
f2cd7a5
Remove referências da tabela cadastro.fisica
edersoares May 21, 2019
1aecca5
Remove referências da tabela cadastro.fone_pessoa
edersoares May 21, 2019
65d78cc
Remove referências da tabela cadastro.funcionario
edersoares May 21, 2019
7e3fef4
Remove referências da tabela cadastro.juridica
edersoares May 21, 2019
e6a958b
Remove referências da tabela cadastro.pessoa
edersoares May 21, 2019
6074fc4
Remove referências da tabela cadastro.socio
edersoares May 21, 2019
1fb2a53
Remove referências da tabela public.bairro
edersoares May 21, 2019
02e7fec
Remove referências da tabela public.distrito
edersoares May 21, 2019
d2a1d2d
Remove referências da tabela public.logradouro
edersoares May 21, 2019
e1ff93b
Remove referências da tabela public.municipio
edersoares May 21, 2019
0d4cec8
Remove referências da tabela public.cep_logradouro_bairro
edersoares May 21, 2019
e788a32
Remove referências da tabela public.cep_logradouro
edersoares May 21, 2019
a72a84c
Remove referências de idsis_cad e idsis_rev
edersoares May 21, 2019
8ba88dc
Remove referências não utilizadas de idsis_cad e idsis_rev
edersoares May 21, 2019
2da8a34
Remove referências de idsis_cad
edersoares May 21, 2019
488b8e9
Remove referência esquecida de idins
edersoares May 21, 2019
ad493c5
Remove inserts do schema acesso
edersoares May 21, 2019
089a971
Remove migrations do schema acesso
edersoares May 21, 2019
3f29ca3
Remove seeders do schema acesso
edersoares May 21, 2019
a4ab56d
Remove últimas referências do schema acesso
edersoares May 21, 2019
1b7ce8c
Remove referências dos inserts
edersoares May 21, 2019
2b77cb7
Remove schema acesso
edersoares May 21, 2019
f656f95
Merge pull request #576 from edersoares/schema-acesso
edersoares May 21, 2019
b113a42
Merge branch 'master' into version-2.1.13
edersoares May 27, 2019
db86db2
Migrations da versão 2.1.13
edersoares May 27, 2019
e22740d
Merge pull request #580 from edersoares/version-2.1.13
edersoares May 29, 2019
d4b2280
Merge branch 'master' into version-2.1.14
edersoares Jun 4, 2019
20f554f
Migrations da versão 2.1.14
edersoares Jun 4, 2019
501daaf
Merge pull request #583 from edersoares/version-2.1.14
edersoares Jun 4, 2019
dbb3a1d
Remove a chave estrangeira do código da língua indigena
edersoares Jun 4, 2019
709dc46
Merge pull request #584 from edersoares/codigo-lingua-indigena
edersoares Jun 4, 2019
ddcc783
Laravel 5.8
edersoares Jun 4, 2019
d6b4558
Atualiza dependências para versão 5.8 do Laravel
edersoares Jun 4, 2019
3c626f7
Ajusta assinatura dos métodos de testes
edersoares Jun 4, 2019
d53e3db
Transforma LegacyRegistrationScore em Model ao invés de Pivot
edersoares Jun 4, 2019
1161a7d
Ajustas configurações esquecidas
edersoares Jun 4, 2019
a94f7e8
Reorganiza imagem do container PHP
edersoares Jun 4, 2019
c7ea2e5
Altera título de mantenedor da imagem do Nginx
edersoares Jun 4, 2019
9575ef1
Ajusta strings no arquivo de configuração
edersoares Jun 4, 2019
684e713
Testa o build da imagem docker
edersoares Jun 4, 2019
3e56a99
Merge pull request #586 from edersoares/2.2-php-upgrade
edersoares Jun 4, 2019
9008641
Merge pull request #585 from edersoares/2.2-laravel-upgrade
edersoares Jun 4, 2019
812ca0f
Testa CI com matrix
edersoares Jun 4, 2019
665ad26
Testa sem variáveis globais
edersoares Jun 4, 2019
62f9e83
Matrix complexo
edersoares Jun 4, 2019
ac81584
Faz teste mais completo com o Docker
edersoares Jun 4, 2019
476cc77
Utiliza a branch 2.2 para instalar os relatórios
edersoares Jun 4, 2019
cfe79db
Merge pull request #587 from edersoares/2.2-docker
edersoares Jun 4, 2019
31e8d08
Remove comentários das migrations
edersoares Jun 6, 2019
81120be
Merge branch 'master' into version-2.1.15
edersoares Jun 10, 2019
cb0b65a
Replica configurações do Travis
edersoares Jun 10, 2019
200868e
Migrations da versão 2.1.15
edersoares Jun 10, 2019
4031554
Merge pull request #596 from edersoares/version-2.1.15
edersoares Jun 10, 2019
5b860ae
Merge branch 'master' into version-2.1.16
edersoares Jun 18, 2019
63c3141
Migrations da versão 2.1.16
edersoares Jun 18, 2019
5f8440d
Remove chave estrangeira esquecida
edersoares Jun 18, 2019
d4dae2e
Merge pull request #600 from edersoares/version-2.1.16
edersoares Jun 18, 2019
f98bced
Remove triggers fcn_aft_update
edersoares Jun 18, 2019
94b4334
Remove função fcn_aft_update
edersoares Jun 18, 2019
4e4960d
Remove seeder da tabela historico_educar
edersoares Jun 18, 2019
94a1e67
Remove a tabela historico_educar
edersoares Jun 18, 2019
e1d8da9
Remove seeder da tabela `portal.acesso`
edersoares Jun 18, 2019
93aaa23
Merge pull request #601 from edersoares/remove-historico-educar
edersoares Jun 18, 2019
7bc2ee5
Merge pull request #602 from edersoares/remove-seeder-portal-acesso
edersoares Jun 18, 2019
d7e9754
Remove comentário de função
edersoares Jun 18, 2019
9059282
Corrige tipo da coluna codigo_lingua_indigena
edersoares Jun 19, 2019
02dff24
Merge branch 'portabilis-patch-2019-06-21' into version-2.1.17
edersoares Jun 21, 2019
c48e6ed
Migrations da versão 2.1.17
edersoares Jun 21, 2019
5667a13
Renomeia migrations que cria tabelas
edersoares Jun 21, 2019
41d368d
Move chaves estrangeiras para migrations diferentes
edersoares Jun 21, 2019
ad476bf
Corrige nome da migration
edersoares Jun 21, 2019
a173449
Remove seeder da tabela `pmieducar.menu_tipo_usuario`
edersoares Jun 21, 2019
b59486e
Corrige migrations dos menus
edersoares Jun 21, 2019
43988d9
Altera ID do menu
edersoares Jun 25, 2019
9216c15
Adiciona campos ao atributo $fillable do Menu
edersoares Jun 25, 2019
d29e48a
Merge branch 'master' into version-2.1.17
edersoares Jun 25, 2019
a50e170
Merge pull request #605 from edersoares/version-2.1.17
edersoares Jun 25, 2019
86d38ed
Remove seeder da tabela `pmicontrolesis.menu`
edersoares Jun 21, 2019
6ec4d73
Remove seeder da tabela `pmicontrolesis.tutormenu`
edersoares Jun 21, 2019
3e261ee
Remove tabelas do schema `pmicontrolesis`
edersoares Jun 21, 2019
4872aec
Remove referências do schema `pmicontrolesis`
edersoares Jun 21, 2019
50b12ed
Remove schema pmicontrolesis
edersoares Jun 21, 2019
fb71385
Merge pull request #606 from edersoares/schema-pmicontrolesis
edersoares Jun 25, 2019
5f82000
Remove seeder da tabela portal.menu_funcionario
edersoares Jun 25, 2019
dd07a3e
Remove seeder da tabela portal.menu_submenu
edersoares Jun 25, 2019
d2c0acb
Remove seeder da tabela portal.menu_menu
edersoares Jun 25, 2019
10d2513
Remove classe clsPortalMenuSubmenu
edersoares Jun 25, 2019
c059aea
Remove classe clsPortalMenuMenu
edersoares Jun 25, 2019
f354c0e
Remove tabelas do sistema de menu antigo
edersoares Jun 25, 2019
f496429
Corrige comando que cria testes de browser
edersoares Jun 25, 2019
f17beae
Merge pull request #607 from edersoares/portal-menus
edersoares Jun 25, 2019
57a8b57
Remove classes clsPortalImagem e clsPortalImagemTipo
edersoares Jun 25, 2019
9af2337
Remove seeder da tabela `portal.imagem`
edersoares Jun 25, 2019
86c527a
Remove seeder da tabela `portal.imagem_tipo`
edersoares Jun 25, 2019
bfe8f2e
Remove arquivo SQL desnecessário
edersoares Jun 25, 2019
8808a1d
Remove tabela `portal.imagem`
edersoares Jun 25, 2019
d172551
Remove tabela `portal.imagem_tipo`
edersoares Jun 25, 2019
e9d5289
Remove referências a arquivos excluídos
edersoares Jun 25, 2019
d551c6a
Merge pull request #608 from edersoares/portal-imagens
edersoares Jun 25, 2019
0a1a35f
Remove tabela `portal.intranet_segur_permissao_negada`
edersoares Jun 25, 2019
384793e
Remove arquivos acesso_indevido_*
edersoares Jun 25, 2019
45bff71
Remove a tabela `cadastro.pessoa_fonetico`
edersoares Jun 25, 2019
bf12490
Remove a tabela `cadastro.socio`
edersoares Jun 25, 2019
6b9204c
Remove a tabela `cadastro.historico_cartao`
edersoares Jun 25, 2019
ec9716f
Remove a tabela `cadastro.funcionario`
edersoares Jun 25, 2019
5924cae
Remove a tabela `cadastro.fisica_sangue`
edersoares Jun 25, 2019
eb05b7f
Remove a tabela `cadastro.aviso_nome`
edersoares Jun 25, 2019
678c48e
Remove função e trigger fcn_aft_fisica_cpf_provisorio
edersoares Jun 25, 2019
eb887a9
Remove função e trigger fcn_aft_fisica_provisorio
edersoares Jun 25, 2019
3996818
Remove função e trigger fcn_aft_fisica
edersoares Jun 25, 2019
f1c4dba
Remove view v_pessoa_fisica_simples
edersoares Jun 25, 2019
1bf3154
Merge pull request #609 from edersoares/intranet-segur
edersoares Jun 25, 2019
0d444df
Corrige rollback das migrations
edersoares Jun 25, 2019
f6ba29a
Merge pull request #611 from edersoares/fix-rollback
edersoares Jun 25, 2019
774db25
Merge pull request #610 from edersoares/schema-cadastro
edersoares Jun 25, 2019
001fa97
Version
edersoares Jun 28, 2019
3c5aba3
Merge branch 'portabilis-patch-2019-06-27' into 2.2
edersoares Jun 28, 2019
eb750fc
Corrige nome da chave estrangeira
edersoares Jun 28, 2019
287cca7
Modifica trait auxiliar para criar trigger updated_at
edersoares Jun 28, 2019
19b53b8
Adiciona coluna updated_at nas tabelas
edersoares Jun 28, 2019
7b0458e
Renomeia migrations que adiciona triggers updated_at
edersoares Jun 28, 2019
07b5514
Migrations para criar as tabelas dos registros excluídos
edersoares Jun 28, 2019
b810b5c
Renomeia migrations que cria triggers deleted_at
edersoares Jun 28, 2019
1f205e1
Renomeia migrations de criação de tabelas
edersoares Jun 28, 2019
f7cb45e
Adiciona updated_at as suas respectivas tabelas
edersoares Jun 28, 2019
b584165
Adiciona coluna turno_id na matricula_turma_excluidos
edersoares Jun 28, 2019
5ff7c28
Remove coluna duplicada
edersoares Jun 28, 2019
37cabbd
Corrige migrations das triggers updated_at
edersoares Jun 28, 2019
31f4967
Ajusta migrations das tabelas historico
edersoares Jun 28, 2019
4fde5ee
Converte migrations de menus
edersoares Jun 28, 2019
72ccb35
Corrige teste que não estava passando
edersoares Jun 28, 2019
4f69627
Merge pull request #613 from edersoares/version-2.1.18
edersoares Jun 28, 2019
07365e9
Altera views conforme repositório de relatórios
edersoares Jun 27, 2019
b2380b3
Cria extensão hstore
edersoares Jun 27, 2019
1690a35
Adiciona diretório das migrations de relatórios
edersoares Jun 27, 2019
c1c440f
Remove comando de instalação dos relatórios
edersoares Jun 27, 2019
16d3997
Corrige subquery da view_dados_aluno
edersoares Jun 28, 2019
39fa163
Adicionar or replace na criação de funções
edersoares Jun 28, 2019
8f20ba7
Corrige DDL da tabela pmieducar.historico_escolar
edersoares Jun 28, 2019
5ef81f9
Remove instalação dos relatórios
edersoares Jun 28, 2019
3788226
Faz drop antes de criar a view
edersoares Jun 28, 2019
414795d
Corrige rollback de migration
edersoares Jun 28, 2019
89e2d78
Adiciona create or replace em cada função do banco de dados
edersoares Jun 28, 2019
c23409c
Adiciona create or replace em cada view do banco de dados
edersoares Jun 28, 2019
a38716b
Merge pull request #614 from edersoares/2.2-reports
edersoares Jun 28, 2019
f9dcc0d
Corrige view_dados_escola
edersoares Jun 28, 2019
abc2ff7
Merge branch '2.2' into portabilis-patch-2019-07-02
edersoares Jul 2, 2019
855622b
Remove migration não utilizada mais
edersoares Jul 2, 2019
aaf5681
Merge branch '2.2-melhorias' into portabilis-patch-2019-07-04
edersoares Jul 4, 2019
f8c14c2
Remove migrations não usadas
edersoares Jul 4, 2019
85c4f93
Merge pull request #616 from edersoares/portabilis-patch-2019-07-04
edersoares Jul 4, 2019
bd8ca2b
Remove chave estrangeiras que referenciam a tabela usuario
edersoares Jul 4, 2019
08ee259
Merge pull request #617 from edersoares/2.2-foreign-key-usuario
edersoares Jul 4, 2019
8b68367
Renomeia migrations de chave estrangeira conforme padrão
edersoares Jul 4, 2019
30477aa
Remove comando de atualização
edersoares Jul 5, 2019
19bf316
Renomeia o nome das classes
edersoares Jul 8, 2019
e76727d
Utiliza o banco de dados atual para rodar migration
edersoares Jul 8, 2019
59f4f87
Converte migration de dados em seeder
edersoares Jul 8, 2019
401baa1
Revert "Converte migration de dados em seeder"
edersoares Jul 8, 2019
5463bd0
Quebra migrations de dados em várias
edersoares Jul 8, 2019
9cc0708
Adiciona --force ao rodar um seeder
edersoares Jul 8, 2019
aa8c734
Popula tabela de configurações
edersoares Jul 8, 2019
9dde9db
Corrige seeder
edersoares Jul 8, 2019
3c6a0e8
Merge remote-tracking branch 'community/master' into 2.2
edersoares Jul 15, 2019
081d9ba
Migrations da versão 2.1.19
edersoares Jul 15, 2019
a9b2a52
Remove coluna que não existe
edersoares Jul 15, 2019
fd11836
Remove testes com o Docker
edersoares Jul 15, 2019
8caadd2
Merge pull request #622 from edersoares/version-2.1.19
edersoares Jul 15, 2019
25d2315
Remove rota da API
edersoares Jul 17, 2019
5067e5e
Merge branch 'portabilis-patch-2019-07-19' into version-2.1.20
edersoares Jul 19, 2019
2b9d432
Migrations da versão 2.1.20
edersoares Jul 19, 2019
b63e92f
Merge pull request #625 from portabilis/version-2.1.20
edersoares Jul 19, 2019
a0e41a0
Merge branch 'master' into 2.2
edersoares Jul 22, 2019
1893d3c
Remove métodos adicionados equivocadamente
edersoares Jul 22, 2019
f81d759
Corrige vírgula que ficou sobrando em query
edersoares Jul 25, 2019
5cf6e1b
Utiliza definição de comando para Darwin
edersoares Jul 25, 2019
43787f5
Merge remote-tracking branch 'portabilis/master' into 2.2-portabilis-…
edersoares Jul 25, 2019
54d090d
Atualiza dependencias
edersoares Jul 25, 2019
f772fe8
Corrige declaração de método setUp()
edersoares Jul 25, 2019
3744729
Merge pull request #629 from edersoares/2.2-portabilis-2019-07-25
edersoares Jul 25, 2019
2f7af91
Merge remote-tracking branch 'portabilis/master' into 2.2
edersoares Jul 26, 2019
ccf797b
Atualiza dependências
edersoares Jul 26, 2019
78dd525
Merge remote-tracking branch 'community/portabilis-patch-2019-07-26' …
edersoares Jul 26, 2019
1056560
Merge pull request #631 from edersoares/version-2.1.21
edersoares Jul 26, 2019
fa9657f
Merge remote-tracking branch 'community/master' into 2.2
edersoares Jul 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ APP_DEFAULT_HOST=ieducar.com.br
API_ACCESS_KEY=
API_SECRET_KEY=

CORE_EXT_CONFIGURATION_ENV="${APP_ENV}"

LEGACY_CODE=true
LEGACY_DISPLAY_ERRORS=false
LEGACY_PATH=ieducar
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ ieducar-*.tar.gz
.env.testing
.php_cs.cache
docker-compose.override.yml
phinx.php
phinx.yml

/node_modules
/public/hot
Expand Down Expand Up @@ -45,7 +43,6 @@ yarn-error.log
/deploy
Vagrantfile
deploy/.ruby-version
ieducar/configuration/ieducar.ini
ieducar/modules/Reports
ieducar/intranet/filaunica
ieducar/intranet/reservavaga
Expand Down
76 changes: 76 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,68 @@ matrix:

- language: php

php:
- '7.1'

sudo: required

dist: xenial

addons:
postgresql: '9.5'
chrome: stable

cache:
directories:
- $HOME/.composer/cache

before_script:
- composer new-install
- php artisan dusk:chrome-driver 74
- php artisan serve > /dev/null 2>&1 &

script:
- vendor/bin/phpunit
- php artisan dusk

env:
- APP_URL=http://localhost:8000
- APP_ENV=testing
- DB_CONNECTION=pgsql
- DB_HOST=localhost
- DB_PORT=5432
- DB_DATABASE=travis
- DB_USERNAME=postgres
- DB_PASSWORD=
- API_ACCESS_KEY=ieducar-access-key
- API_SECRET_KEY=ieducar-secret-key

- language: php

php:
- '7.2'

sudo: required

dist: xenial

addons:
postgresql: '9.5'
chrome: stable

cache:
directories:
- $HOME/.composer/cache

before_script:
- composer new-install
- php artisan dusk:chrome-driver 74
- php artisan serve > /dev/null 2>&1 &

script:
- vendor/bin/phpunit
- php artisan dusk

env:
- APP_URL=http://localhost:8000
- APP_ENV=testing
Expand All @@ -27,6 +78,19 @@ matrix:
- API_ACCESS_KEY=ieducar-access-key
- API_SECRET_KEY=ieducar-secret-key

- language: php

php:
- '7.3'

sudo: required

dist: xenial

addons:
postgresql: '9.5'
chrome: stable

cache:
directories:
- $HOME/.composer/cache
Expand All @@ -39,3 +103,15 @@ matrix:
script:
- vendor/bin/phpunit
- php artisan dusk

env:
- APP_URL=http://localhost:8000
- APP_ENV=testing
- DB_CONNECTION=pgsql
- DB_HOST=localhost
- DB_PORT=5432
- DB_DATABASE=travis
- DB_USERNAME=postgres
- DB_PASSWORD=
- API_ACCESS_KEY=ieducar-access-key
- API_SECRET_KEY=ieducar-secret-key
11 changes: 8 additions & 3 deletions app/Console/Commands/DatabaseRestoreCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Str;

class DatabaseRestoreCommand extends Command
{
Expand Down Expand Up @@ -89,11 +90,15 @@ private function createDatabaseList($filename)
*/
private function removeTableDataFromDatabaseList(array $tables)
{
$definition = 'sed -i \'/TABLE DATA %s/d\' %s';

if (Str::contains(PHP_OS, 'Darwin')) {
$definition = 'sed -i \'\' \'/TABLE DATA %s/d\' %s';
}

foreach ($tables as $table) {
$table = str_replace('.', ' ', $table);

$definition = 'sed -i \'/TABLE DATA %s/d\' %s';

$command = sprintf(
$definition,
$table,
Expand Down Expand Up @@ -177,7 +182,7 @@ private function restoreDatabaseUsingBackupFile($database, $filename)
*/
private function alterSearchPathInDatabase($database)
{
$definition = 'echo "ALTER DATABASE %s SET search_path = \"\$user\", public, portal, cadastro, acesso, alimentos, consistenciacao, historico, pmiacoes, pmicontrolesis, pmidrh, pmieducar, pmiotopic, urbano, modules;" | psql -h %s -p %s -U %s';
$definition = 'echo "ALTER DATABASE %s SET search_path = \"\$user\", public, portal, cadastro, historico, pmieducar, urbano, modules;" | psql -h %s -p %s -U %s';

$command = sprintf(
$definition,
Expand Down
37 changes: 0 additions & 37 deletions app/Console/Commands/LegacyDatabaseCommand.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Console/Commands/LegacyMakeTestsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function getRoutesFromFile()
*/
private function getRoutesFromDatabase()
{
$result = DB::select("SELECT arquivo FROM portal.menu_submenu WHERE arquivo <> ''");
$result = DB::select("SELECT link FROM menus WHERE link <> ''");

return array_map(function ($value) {
return $value->arquivo;
Expand Down
71 changes: 0 additions & 71 deletions app/Console/Commands/ReportsInstallCommand.php

This file was deleted.

42 changes: 11 additions & 31 deletions app/Http/Controllers/LegacyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ private function getLegacyPath()
return base_path(config('legacy.path'));
}

/**
* Return i-Educar original bootstrap file.
*
* @return string
*/
private function getLegacyBootstrapFile()
{
return $this->getLegacyPath() . '/includes/bootstrap.php';
}

/**
* Define which errors and exceptions are shown.
*
Expand All @@ -69,26 +59,6 @@ private function configureErrorsAndExceptions()
restore_exception_handler();
}

/**
* Load bootstrap file, if not found, throw a HttpException with HTTP error
* code 500 Server Internal Error.
*
* @return void
*
* @throws HttpException
* @throws Exception
*/
private function loadLegacyBootstrapFile()
{
$filename = $this->getLegacyBootstrapFile();

if (false === file_exists($filename)) {
throw new HttpException(500, 'Legacy bootstrap file not found.');
}

$this->loadFileOrAbort($filename);
}

/**
* Load legacy route file, if not found, throw a HttpException with HTTP
* error code 404 Not Found.
Expand Down Expand Up @@ -195,6 +165,16 @@ private function getHttpStatusCode()
return http_response_code() ?: Response::HTTP_OK;
}

/**
* Change directory.
*
* @return void
*/
private function changeDirectory()
{
chdir(base_path('ieducar/intranet'));
}

/**
* Start session, configure errors and exceptions and load necessary files
* to run legacy code.
Expand All @@ -212,7 +192,7 @@ private function requireFileFromLegacy($filename)

$this->overrideGlobals();
$this->configureErrorsAndExceptions();
$this->loadLegacyBootstrapFile();
$this->changeDirectory();
$this->loadLegacyFile($filename);

$content = ob_get_contents();
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\ChangeAppName::class,
\App\Http\Middleware\ConnectTenantDatabase::class,
\App\Http\Middleware\SetLayoutVariables::class,
\App\Http\Middleware\LoadLegacyConfig::class,
\App\Http\Middleware\LoadSettings::class,
],

'api' => [
Expand Down Expand Up @@ -81,7 +81,7 @@ class Kernel extends HttpKernel
*/
protected $middlewarePriority = [
\App\Http\Middleware\ConnectTenantDatabase::class,
\App\Http\Middleware\LoadLegacyConfig::class,
\App\Http\Middleware\LoadSettings::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
Expand Down
Loading