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

Updated Laravel #89

Merged
merged 40 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5ecda79
feat: update project structure
Goodmain Jun 29, 2024
46dfcea
feat: update project configs
Goodmain Jun 30, 2024
2ee2650
feat: update project structure
Goodmain Jul 3, 2024
613c10f
chore: merge from development
Goodmain Jul 8, 2024
aa2b0dc
refactor: change password reset logic
Goodmain Jul 8, 2024
f4bb714
refactor: change password reset logic
Goodmain Jul 11, 2024
b8e22b1
feat: implemented QueueEnum
avardugin Aug 13, 2024
3eddc05
chore: merge with dev
avardugin Aug 14, 2024
8c2d939
feat: implemented Laravel resetting passwords
avardugin Aug 15, 2024
b79f16b
feat: implemeted ModelTestState
avardugin Aug 15, 2024
c665182
refactor: remove token/check endpoint
avardugin Aug 15, 2024
90aa0f8
chore: remove debug
avardugin Aug 15, 2024
49164c8
fix: added redis to test-with-coverage job
avardugin Aug 16, 2024
e4f6ef3
fix: remove redis from test-with-coverage job
avardugin Aug 16, 2024
3488d15
fix: added redis to test-with-coverage job
avardugin Aug 16, 2024
0caf8a2
fix: setup redis version for github actions
avardugin Aug 19, 2024
4c69f92
fix: setup redis envs for github actions
avardugin Aug 19, 2024
f40770e
fix: setup redis envs for github actions
avardugin Aug 19, 2024
6d26d89
fix: remove REDIS_HOST
avardugin Aug 19, 2024
25a1e47
fix: remove REDIS_PORT, DB_PORT
avardugin Aug 19, 2024
cbefc2b
fix: revert DB_PORT
avardugin Aug 19, 2024
c9fa756
fix: revert DB_PORT
avardugin Aug 19, 2024
3a9f0bc
fix: move DB_PORT to ubuntu envs
avardugin Aug 19, 2024
82ab4b0
fix: revert DB_PORT
avardugin Aug 19, 2024
513b6b4
fix: remove unused clearSetPasswordHash
avardugin Aug 20, 2024
a384fa3
feat: move middlewares setup to bootastrap/app.php
avardugin Aug 21, 2024
ca1428c
fix: remove unused throttleApi
avardugin Aug 21, 2024
df700cd
refacor: minor fixes
avardugin Aug 22, 2024
d1fd43e
chore: added fixtures to git
avardugin Aug 22, 2024
df11898
Update config/cache.php
DenTray Aug 22, 2024
921e00d
feat: updated version of laravel-helpers, laravel-swagger
avardugin Aug 23, 2024
bba4c24
Merge branch 'update-laravel-structure' of github.com:RonasIT/laravel…
avardugin Aug 23, 2024
916aefa
Apply suggestions from code review
DenTray Aug 23, 2024
e8237e4
Apply suggestions from code review
DenTray Aug 23, 2024
40791df
Apply suggestions from code review
DenTray Aug 23, 2024
9e5dd25
Apply suggestions from code review
DenTray Aug 23, 2024
7377d22
Update public/index.php
DenTray Aug 23, 2024
cd42251
chore: rename fixtures
avardugin Aug 26, 2024
1dabec6
Merge branch 'update-laravel-structure' of github.com:RonasIT/laravel…
avardugin Aug 26, 2024
67b0a10
Update tests/AuthTest.php
DenTray Aug 26, 2024
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
15 changes: 15 additions & 0 deletions .github/workflows/run-tests-with-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
DB_PASSWORD: ""
DB_USERNAME: forge
DB_DATABASE: forge
REDIS_HOST: localhost
REDIS_PASSWORD: ""
REDIS_PORT: 6379

services:
postgres:
Expand All @@ -31,6 +34,18 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.2
env:
ALLOW_EMPTY_PASSWORD: yes
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: shivammathur/setup-php@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage/documentation.json
/vendor
/.idea
/.vagrant
/.vscode
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
.env
Expand Down
20 changes: 0 additions & 20 deletions app/Console/Commands/ClearSetPasswordHash.php

This file was deleted.

13 changes: 7 additions & 6 deletions app/Console/Commands/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

use App\Models\Role;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Isolatable;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;

class Init extends Command
class Init extends Command implements Isolatable
{
public const TEMPLATES_PATH = '.templates';
public const string TEMPLATES_PATH = '.templates';

public const RESOURCES_ITEMS = [
public const array RESOURCES_ITEMS = [
'issue_tracker' => 'Issue Tracker',
'figma' => 'Figma',
'sentry' => 'Sentry',
Expand All @@ -22,17 +23,17 @@ class Init extends Command
'nova' => 'Laravel Nova',
];

public const CONTACTS_ITEMS = [
public const array CONTACTS_ITEMS = [
'manager' => 'Manager',
'team_lead' => 'Code Owner/Team Lead',
];

public const CREDENTIALS_ITEMS = [
public const array CREDENTIALS_ITEMS = [
'telescope' => 'Laravel Telescope',
'nova' => 'Laravel Nova',
];

public const DEFAULT_URLS = [
public const array DEFAULT_URLS = [
'telescope',
'nova',
];
Expand Down
23 changes: 0 additions & 23 deletions app/Console/Kernel.php

This file was deleted.

12 changes: 12 additions & 0 deletions app/Enums/QueueEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace App\Enums;

use App\Traits\EnumTrait;

enum QueueEnum: string
{
use EnumTrait;

case Mails = 'mails';
}
108 changes: 0 additions & 108 deletions app/Exceptions/Handler.php

This file was deleted.

21 changes: 11 additions & 10 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Http\Controllers;

use App\Http\Requests\Auth\CheckRestoreTokenRequest;
use App\Http\Requests\Auth\ForgotPasswordRequest;
use App\Http\Requests\Auth\LoginRequest;
use App\Http\Requests\Auth\LogoutRequest;
Expand All @@ -14,9 +13,11 @@
use Illuminate\Http\Response;
use App\Services\UserService;
use App\Traits\TokenTrait;
use Illuminate\Support\Facades\Password;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use PHPOpenSourceSaver\JWTAuth\Exceptions\JWTException;
use PHPOpenSourceSaver\JWTAuth\JWTAuth;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;

class AuthController extends Controller
{
Expand Down Expand Up @@ -85,23 +86,23 @@ public function logout(LogoutRequest $request): Response

public function forgotPassword(ForgotPasswordRequest $request, UserService $service): Response
{
$service->forgotPassword($request->input('email'));
$status = $service->forgotPassword($request->input('email'));

if ($status !== Password::RESET_LINK_SENT) {
throw new UnprocessableEntityHttpException(__($status));
}

return response('', Response::HTTP_NO_CONTENT);
}

public function restorePassword(RestorePasswordRequest $request, UserService $service): Response
{
$service->restorePassword(
$request->input('token'),
$request->input('password')
);
$status = $service->restorePassword($request->onlyValidated());

return response('', Response::HTTP_NO_CONTENT);
}
if ($status !== Password::PASSWORD_RESET) {
throw new UnprocessableEntityHttpException(__($status));
}

public function checkRestoreToken(CheckRestoreTokenRequest $request): Response
{
return response('', Response::HTTP_NO_CONTENT);
}
}
22 changes: 0 additions & 22 deletions app/Http/Controllers/StatusController.php

This file was deleted.

Loading
Loading