Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b18dbc5
Ajusta dependências do composer
vitormattos Aug 6, 2026
fd2ee98
Atualiza composer.lock
vitormattos Aug 6, 2026
6fff0f2
Adiciona matriz PHP nos testes
vitormattos Aug 6, 2026
d8555d7
Ajusta instalação do fixer
vitormattos Aug 6, 2026
660b5a3
Permite injetar cliente no ReCaptchaV3
vitormattos Aug 6, 2026
9f5a028
Adiciona testes do ReCaptchaV3
vitormattos Aug 6, 2026
a31a734
Adiciona testes do PostalCodeController
vitormattos Aug 6, 2026
b714e19
Adiciona testes do iDiarioService
vitormattos Aug 6, 2026
53def6f
Adiciona testes do CanChangeExitDate
vitormattos Aug 6, 2026
cda9446
Fortalece teste do ExportService
vitormattos Aug 6, 2026
cd57d72
Adiciona teste do ImportSchoolGradeCommand
vitormattos Aug 6, 2026
7e6e7c6
Adiciona teste do ImportDisciplineAcademicYearCommand
vitormattos Aug 6, 2026
5040e3d
Adiciona teste do ImportSchoolGradeDisciplineCommand
vitormattos Aug 6, 2026
e1b879e
Adiciona teste do ImportDisciplineCommand
vitormattos Aug 6, 2026
3f3d12b
Adiciona teste do ImportUsersCommand
vitormattos Aug 6, 2026
74acfe9
Adiciona fake do UpdateDisciplinesCommand
vitormattos Aug 6, 2026
d152ae3
Adiciona teste do UpdateDisciplinesCommand
vitormattos Aug 6, 2026
4932f43
Corrige ImportUsersService
vitormattos Aug 6, 2026
e60193e
Ajusta teste do ImportDisciplineCommand
vitormattos Aug 6, 2026
6c60f67
Fortalece teste do ImportUsersCommand
vitormattos Aug 6, 2026
76b443a
Ajusta fake do UpdateDisciplinesCommand
vitormattos Aug 6, 2026
e892f1c
Ajusta teste do PostalCodeController
vitormattos Aug 6, 2026
15bd4d7
Ajusta teste do ReCaptchaV3
vitormattos Aug 6, 2026
9bb1360
Ajusta teste do iDiarioService
vitormattos Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
php-version: "8.5"

- name: Composer
run: composer install
run: composer install --ignore-platform-req=php+

- name: Style code fixer
run: composer format
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ permissions:

jobs:
default:
name: Unit, Integration and Pages
name: Unit, Integration and Pages (PHP ${{ matrix.php-version }})

if: '! github.event.pull_request.draft'

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.4', '8.5']
env:
APP_URL: http://localhost:8000
APP_ENV: testing
Expand Down Expand Up @@ -55,7 +59,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
php-version: ${{ matrix.php-version }}
extensions: bcmath, gd, pdo, pcntl, pdo_pgsql, pgsql, zip
env:
update: true
Expand Down
14 changes: 11 additions & 3 deletions app/Rules/ReCaptchaV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@

class ReCaptchaV3 implements Rule
{
/**
* @var mixed
*/
private $client;

public function __construct($client = null)
{
$this->client = $client ?? app(Client::class);
}

/**
* Create a new rule instance.
*
Expand All @@ -20,10 +30,8 @@ public function passes($attribute, $value)
return true;
}

$client = new Client;

try {
$response = $client->post('https://www.google.com/recaptcha/api/siteverify', [
$response = $this->client->post('https://www.google.com/recaptcha/api/siteverify', [
'query' => [
'secret' => config('legacy.app.recaptcha_v3.private_key'),
'response' => $value,
Expand Down
2 changes: 1 addition & 1 deletion app/Services/ImportUsersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function createUserByConnection(string $name, string $user, string $pass
return LegacyUser::create([
'cod_usuario' => $employee->getKey(),
'ref_cod_instituicao' => app(LegacyInstitution::class)->getKey(),
'ref_funcionario_cad' => 1,
'ref_funcionario_cad' => $employee->getKey(),
'ref_cod_tipo_usuario' => LegacyUserType::LEVEL_ADMIN,
'data_cadastro' => now(),
'ativo' => 1,
Expand Down
25 changes: 7 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dex/composer-plug-and-play": "^0.26",
"dex/frontier": "^0.17.0",
"google/recaptcha": "^1.2",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/guzzle": "^7.15.2",
"honeybadger-io/honeybadger-laravel": "^5.0",
"intervention/image": "^2.6",
"laravel/framework": "^13.0",
Expand All @@ -42,7 +42,7 @@
"league/flysystem-ftp": "^3.0",
"league/flysystem-sftp-v3": "^3.0",
"maatwebsite/excel": "^3.1",
"phpoffice/phpspreadsheet": "1.30.0",
"phpoffice/phpspreadsheet": "1.30.6",
"predis/predis": "^2.3",
"psr/simple-cache": "^3.0",
"socialiteproviders/laravelpassport": "^4.3",
Expand All @@ -59,6 +59,7 @@
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^4.0",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ignition": "^2.0",
"symfony/yaml": "^7.0"
},
Expand Down Expand Up @@ -109,22 +110,22 @@
"openapi": "vendor/uderline/openapi-php-attributes/opag tests public/openapi.json",
"set-permissions": "find bootstrap/cache -type d -exec chmod 777 {} + && find storage -type d -exec chmod 777 {} +",
"new-install": [
"@composer install",
"@composer install --ignore-platform-req=php+",
"@composer plug-and-play",
"@set-permissions",
"@php artisan key:generate --ansi",
"@php artisan storage:link --ansi",
"@php artisan migrate --force --ansi"
],
"update-install": [
"@composer update",
"@composer update --ignore-platform-req=php+",
"@composer plug-and-play",
"@set-permissions",
"@php artisan storage:link --ansi",
"@php artisan migrate --force --ansi"
],
"testing-install": [
"@composer install",
"@composer install --ignore-platform-req=php+",
"@php artisan key:generate --ansi",
"@php artisan migrate --force --ansi --env=testing"
],
Expand All @@ -143,24 +144,12 @@
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"platform-check": false,
"allow-plugins": {
"dex/composer-plug-and-play": true,
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true,
"php-http/discovery": true
},
"audit": {
"ignore": [
"PKSA-gz3f-3cz3-3wsw",
"PKSA-x13r-n4wc-4gcr",
"PKSA-8cfg-tzhf-fr83",
"PKSA-hznc-gbby-6w16",
"PKSA-jtdk-dcr5-f11n",
"PKSA-r22k-87hv-mfk4",
"PKSA-m9cr-9614-rsf7",
"PKSA-dqzt-yst9-1w9y",
"PKSA-x678-4z45-v3d5"
]
}
},
"minimum-stability": "dev",
Expand Down
Loading