diff --git a/app/Console/Commands/LocationCreateOrUpdateCommand.php b/app/Console/Commands/LocationCreateOrUpdateCommand.php index c7c8c24..2a83670 100644 --- a/app/Console/Commands/LocationCreateOrUpdateCommand.php +++ b/app/Console/Commands/LocationCreateOrUpdateCommand.php @@ -6,12 +6,13 @@ use App\Models\Country; use App\Models\State; +use Exception; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; -class LocationCreateOrUpdateCommand extends Command +final class LocationCreateOrUpdateCommand extends Command { /** * The name and signature of the console command. @@ -29,10 +30,8 @@ class LocationCreateOrUpdateCommand extends Command /** * Base API URL for the countries and states data. - * - * @var string */ - protected $baseApiUrl = 'https://countriesnow.space/api/v0.1'; + private string $baseApiUrl = 'https://countriesnow.space/api/v0.1'; /** * Execute the console command. @@ -57,29 +56,31 @@ public function handle(): void } DB::commit(); - } catch (\Exception $e) { + } catch (Exception $exception) { DB::rollBack(); - $this->error('Command failed: ' . $e->getMessage()); + $this->error('Command failed: '.$exception->getMessage()); } } /** * Get the countries data from the API. + * + * @return list> */ - private function getCountries(): array + private function getCountries() { try { - $response = Http::get("{$this->baseApiUrl}/countries/iso"); + $response = Http::get($this->baseApiUrl.'/countries/iso'); if ($response->successful()) { return $response->json('data'); } - $this->error('Failed to fetch countries data from API and the error is: ' . ($response->json('msg') ?? 'unknown error')); + $this->error('Failed to fetch countries data from API and the error is: '.($response->json('msg') ?? 'unknown error')); return []; - } catch (\Exception $e) { - $this->error('Error fetching countries: ' . $e->getMessage()); + } catch (Exception $exception) { + $this->error('Error fetching countries: '.$exception->getMessage()); return []; } @@ -92,13 +93,11 @@ private function createOrUpdateCountries(array $countries): void { $this->info('Creating or updating country data...'); - $countryData = array_map(function ($country) { - return [ - 'name' => Str::lower($country['name']), - 'iso2' => $country['Iso2'], - 'iso3' => $country['Iso3'], - ]; - }, $countries); + $countryData = array_map(fn (array $country): array => [ + 'name' => Str::lower($country['name']), + 'iso2' => $country['Iso2'], + 'iso3' => $country['Iso3'], + ], $countries); Country::upsert( $countryData, @@ -114,21 +113,23 @@ private function createOrUpdateCountries(array $countries): void /** * Get the states data from the API. + * + * @return list>>> */ - private function getStates(): array + private function getStates() { try { - $response = Http::get("{$this->baseApiUrl}/countries/states"); + $response = Http::get($this->baseApiUrl.'/countries/states'); if ($response->successful()) { return $response->json('data'); } - $this->error('Failed to fetch states data from API and the error is: ' . ($response->json('msg') ?? 'unknown error')); + $this->error('Failed to fetch states data from API and the error is: '.($response->json('msg') ?? 'unknown error')); return []; - } catch (\Exception $e) { - $this->error('Error fetching states: ' . $e->getMessage()); + } catch (Exception $exception) { + $this->error('Error fetching states: '.$exception->getMessage()); return []; } @@ -152,13 +153,11 @@ private function createOrUpdateStates(array $states): void continue; } - $stateData = array_map(function ($state) use ($countries, $countryIsoCode) { - return [ - 'name' => Str::lower($state['name']), - 'code' => $state['state_code'], - 'country_id' => $countries[$countryIsoCode], - ]; - }, $stateData); + $stateData = array_map(fn (array $state): array => [ + 'name' => Str::lower($state['name']), + 'code' => $state['state_code'], + 'country_id' => $countries[$countryIsoCode], + ], $stateData); State::upsert( $stateData, diff --git a/app/Console/Commands/MakeAdmin.php b/app/Console/Commands/MakeAdmin.php index 9fc4617..aaef708 100644 --- a/app/Console/Commands/MakeAdmin.php +++ b/app/Console/Commands/MakeAdmin.php @@ -7,7 +7,7 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\Hash; -class MakeAdmin extends Command +final class MakeAdmin extends Command { /** * The name and signature of the console command. @@ -26,7 +26,7 @@ class MakeAdmin extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { $email = $this->option('email'); $password = $this->option('password'); diff --git a/app/Helpers/GeneralHelper.php b/app/Helpers/GeneralHelper.php index 16a95fc..058314e 100644 --- a/app/Helpers/GeneralHelper.php +++ b/app/Helpers/GeneralHelper.php @@ -10,7 +10,7 @@ */ function getVoterNumber() { - $voterNumber = 'VO' . str_pad((string) rand(0, 99999999), 8, '0', STR_PAD_LEFT); + $voterNumber = 'VO'.mb_str_pad((string) random_int(0, 99999999), 8, '0', STR_PAD_LEFT); $existingVoter = Voter::where('voter_number', $voterNumber)->first(); if ($existingVoter) { diff --git a/app/Http/Controllers/Api/LocationController.php b/app/Http/Controllers/Api/LocationController.php index 57f1fd0..4b4a9b2 100644 --- a/app/Http/Controllers/Api/LocationController.php +++ b/app/Http/Controllers/Api/LocationController.php @@ -6,16 +6,12 @@ use App\Http\Controllers\Controller; use App\Services\LocationService; +use Exception; use Illuminate\Http\JsonResponse; -class LocationController extends Controller +final class LocationController extends Controller { - protected LocationService $locationService; - - public function __construct(LocationService $locationService) - { - $this->locationService = $locationService; - } + public function __construct(private readonly LocationService $locationService) {} /** * Get all countries @@ -34,7 +30,7 @@ public function statesByCountry(string $countryName): JsonResponse { try { $states = $this->locationService->getStatesByCountry($countryName); - } catch (\Exception $e) { + } catch (Exception) { return response()->json(['error' => 'Country not found'], 404); } diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php index a1e427d..77d25e3 100644 --- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php +++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php @@ -13,7 +13,7 @@ use Inertia\Inertia; use Inertia\Response; -class AuthenticatedSessionController extends Controller +final class AuthenticatedSessionController extends Controller { /** * Display the login view. diff --git a/app/Http/Controllers/Auth/ConfirmablePasswordController.php b/app/Http/Controllers/Auth/ConfirmablePasswordController.php index 0f4e3b6..9154261 100644 --- a/app/Http/Controllers/Auth/ConfirmablePasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmablePasswordController.php @@ -12,7 +12,7 @@ use Inertia\Inertia; use Inertia\Response; -class ConfirmablePasswordController extends Controller +final class ConfirmablePasswordController extends Controller { /** * Show the confirm password view. diff --git a/app/Http/Controllers/Auth/EmailVerificationNotificationController.php b/app/Http/Controllers/Auth/EmailVerificationNotificationController.php index ec5c0fc..f4196aa 100644 --- a/app/Http/Controllers/Auth/EmailVerificationNotificationController.php +++ b/app/Http/Controllers/Auth/EmailVerificationNotificationController.php @@ -8,7 +8,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -class EmailVerificationNotificationController extends Controller +final class EmailVerificationNotificationController extends Controller { /** * Send a new email verification notification. diff --git a/app/Http/Controllers/Auth/EmailVerificationPromptController.php b/app/Http/Controllers/Auth/EmailVerificationPromptController.php index 8823e2e..2004734 100644 --- a/app/Http/Controllers/Auth/EmailVerificationPromptController.php +++ b/app/Http/Controllers/Auth/EmailVerificationPromptController.php @@ -10,7 +10,7 @@ use Inertia\Inertia; use Inertia\Response; -class EmailVerificationPromptController extends Controller +final class EmailVerificationPromptController extends Controller { /** * Display the email verification prompt. diff --git a/app/Http/Controllers/Auth/NewPasswordController.php b/app/Http/Controllers/Auth/NewPasswordController.php index 0763fa3..5b4349b 100644 --- a/app/Http/Controllers/Auth/NewPasswordController.php +++ b/app/Http/Controllers/Auth/NewPasswordController.php @@ -16,7 +16,7 @@ use Inertia\Inertia; use Inertia\Response; -class NewPasswordController extends Controller +final class NewPasswordController extends Controller { /** * Display the password reset view. @@ -47,7 +47,7 @@ public function store(Request $request): RedirectResponse // database. Otherwise we will parse the error and return the response. $status = Password::reset( $request->only('email', 'password', 'password_confirmation', 'token'), - function ($user) use ($request) { + function ($user) use ($request): void { $user->forceFill([ 'password' => Hash::make($request->password), 'remember_token' => Str::random(60), @@ -60,7 +60,7 @@ function ($user) use ($request) { // If the password was successfully reset, we will redirect the user back to // the application's home authenticated view. If there is an error we can // redirect them back to where they came from with their error message. - if ($status == Password::PASSWORD_RESET) { + if ($status === Password::PASSWORD_RESET) { return redirect()->route('login')->with('status', __($status)); } diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index 451d8e9..3a7c96d 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Hash; use Illuminate\Validation\Rules\Password; -class PasswordController extends Controller +final class PasswordController extends Controller { /** * Update the user's password. diff --git a/app/Http/Controllers/Auth/PasswordResetLinkController.php b/app/Http/Controllers/Auth/PasswordResetLinkController.php index c5f1f87..363be20 100644 --- a/app/Http/Controllers/Auth/PasswordResetLinkController.php +++ b/app/Http/Controllers/Auth/PasswordResetLinkController.php @@ -12,7 +12,7 @@ use Inertia\Inertia; use Inertia\Response; -class PasswordResetLinkController extends Controller +final class PasswordResetLinkController extends Controller { /** * Display the password reset link request view. @@ -42,7 +42,7 @@ public function store(Request $request): RedirectResponse $request->only('email') ); - if ($status == Password::RESET_LINK_SENT) { + if ($status === Password::RESET_LINK_SENT) { return back()->with('status', __($status)); } diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php index 86bf61b..3ef0edf 100644 --- a/app/Http/Controllers/Auth/RegisteredUserController.php +++ b/app/Http/Controllers/Auth/RegisteredUserController.php @@ -15,7 +15,7 @@ use Inertia\Inertia; use Inertia\Response; -class RegisteredUserController extends Controller +final class RegisteredUserController extends Controller { /** * Display the registration view. @@ -34,7 +34,7 @@ public function store(Request $request): RedirectResponse { $request->validate([ 'name' => 'required|string|max:255', - 'email' => 'required|string|lowercase|email|max:255|unique:' . User::class, + 'email' => 'required|string|lowercase|email|max:255|unique:'.User::class, 'password' => ['required', 'confirmed', Rules\Password::defaults()], ]); diff --git a/app/Http/Controllers/Auth/VerifyEmailController.php b/app/Http/Controllers/Auth/VerifyEmailController.php index df92ab9..2b0ad19 100644 --- a/app/Http/Controllers/Auth/VerifyEmailController.php +++ b/app/Http/Controllers/Auth/VerifyEmailController.php @@ -9,7 +9,7 @@ use Illuminate\Foundation\Auth\EmailVerificationRequest; use Illuminate\Http\RedirectResponse; -class VerifyEmailController extends Controller +final class VerifyEmailController extends Controller { /** * Mark the authenticated user's email address as verified. @@ -17,13 +17,13 @@ class VerifyEmailController extends Controller public function __invoke(EmailVerificationRequest $request): RedirectResponse { if ($request->user()->hasVerifiedEmail()) { - return redirect()->intended(route('dashboard', absolute: false) . '?verified=1'); + return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); } if ($request->user()->markEmailAsVerified()) { event(new Verified($request->user())); } - return redirect()->intended(route('dashboard', absolute: false) . '?verified=1'); + return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); } } diff --git a/app/Http/Controllers/CandidateController.php b/app/Http/Controllers/CandidateController.php index cd48263..6da0272 100644 --- a/app/Http/Controllers/CandidateController.php +++ b/app/Http/Controllers/CandidateController.php @@ -9,7 +9,7 @@ use App\Models\Election; use Inertia\Inertia; -class CandidateController extends Controller +final class CandidateController extends Controller { /** * Display the specified candidate. diff --git a/app/Http/Controllers/CandidateRequestController.php b/app/Http/Controllers/CandidateRequestController.php index b352978..eaafe16 100644 --- a/app/Http/Controllers/CandidateRequestController.php +++ b/app/Http/Controllers/CandidateRequestController.php @@ -12,7 +12,7 @@ use Illuminate\Http\Request; use Inertia\Inertia; -class CandidateRequestController extends Controller +final class CandidateRequestController extends Controller { /** * Show the form for creating a candidate request. @@ -26,6 +26,7 @@ public function create(Election $election, Request $request) // Check if the user is an admin abort(403, 'Unauthorized action.'); } + if ($candidate && $candidate->user_id !== $user->id) { // Check if the user is authorized to create the request abort(403, 'Unauthorized action.'); @@ -60,6 +61,7 @@ public function store(Election $election, StoreCandidateRequest $request) // Check if the user is an admin abort(403, 'Unauthorized action.'); } + if ($candidate && $candidate->user_id !== $user->id) { // Check if the user is authorized to create the request abort(403, 'Unauthorized action.'); diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 18cf459..7ed9477 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -11,7 +11,7 @@ use Illuminate\Http\Request; use Inertia\Inertia; -class DashboardController extends Controller +final class DashboardController extends Controller { /** * Handle the incoming request. diff --git a/app/Http/Controllers/ElectionController.php b/app/Http/Controllers/ElectionController.php index e60a40e..a22bdfd 100644 --- a/app/Http/Controllers/ElectionController.php +++ b/app/Http/Controllers/ElectionController.php @@ -13,7 +13,7 @@ use Illuminate\Http\Request; use Inertia\Inertia; -class ElectionController extends Controller +final class ElectionController extends Controller { /** * Display a listing of the election. @@ -26,9 +26,10 @@ public function index(Request $request) $query->whereAny( ['name', 'description'], 'like', - '%' . $request->search . '%' + '%'.$request->search.'%' ); } + $elections = $query->latest()->paginate(15)->onEachSide(1); return Inertia::render('Elections/Index', [ @@ -85,6 +86,7 @@ public function show(Election $election) $query->withCount('votes'); $election->loadCount('votes'); } + // dd($election, $query->get()); $candidates = $query->oldest()->paginate(15)->onEachSide(1); diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 80aa6a5..f3a313e 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -13,7 +13,7 @@ use Inertia\Inertia; use Inertia\Response; -class ProfileController extends Controller +final class ProfileController extends Controller { /** * Display the user's profile form. diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php index 6984160..6a2f360 100644 --- a/app/Http/Controllers/RequestController.php +++ b/app/Http/Controllers/RequestController.php @@ -10,12 +10,13 @@ use App\Http\Resources\VoterResource; use App\Models\RequestModel; use App\Models\Voter; +use Exception; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use Inertia\Inertia; -class RequestController extends Controller +final class RequestController extends Controller { /** * Display a listing of the request. @@ -30,6 +31,7 @@ public function index(Request $formRequest) if ($formRequest->has('type')) { $query->where('type', $formRequest->type); } + if ($formRequest->has('status')) { $query->where('status', $formRequest->status); } @@ -78,10 +80,12 @@ public function store(StoreVoterRequest $formRequest) if ($voter && $formRequest->request_type === RequestModel::TYPE_EXIST_VOTER && ! $voter->active) { return redirect()->route('requests.index')->with('error', "Can't create update-voter-request because voter is inactivated."); } + if ($voter && $voter->user_id !== $formRequest->user()->id) { // Check if the user is authorized to create the request abort(403, 'Unauthorized action.'); } + // Validate and store the request data $validatedData = RequestModel::getVoterRequestData($formRequest, $voter); @@ -105,7 +109,7 @@ public function store(StoreVoterRequest $formRequest) public function show(RequestModel $request) { $user = request()->user(); - if (! ($user->is_admin || $user->id == $request->user_id)) { + if (! $user->is_admin && $user->id !== $request->user_id) { // Check if the user is authorized to delete the request abort(403, 'Unauthorized action.'); } @@ -130,10 +134,12 @@ public function update(UpdateRequestRequest $formRequest, RequestModel $request) // Check if the user is authorized to update the request abort(403, 'Unauthorized action.'); } + // Check if the request is already approved or rejected if ($request->status !== RequestModel::STATUS_PENDING) { return redirect()->route('requests.show', $request)->with('error', 'Already request is approved or rejected.'); } + try { DB::beginTransaction(); // Update the request with the validated data @@ -144,7 +150,7 @@ public function update(UpdateRequestRequest $formRequest, RequestModel $request) DB::rollBack(); return redirect()->route('requests.show', $request)->with('error', Str::before($e->getMessage(), '(Connection:')); - } catch (\Exception $e) { + } catch (Exception $e) { DB::rollBack(); return redirect()->route('requests.show', $request)->with('error', $e->getMessage()); @@ -160,14 +166,16 @@ public function update(UpdateRequestRequest $formRequest, RequestModel $request) public function destroy(RequestModel $request) { $user = request()->user(); - if (! ($user->is_admin || $user->id == $request->user_id)) { + if (! $user->is_admin && $user->id !== $request->user_id) { // Check if the user is authorized to delete the request abort(403, 'Unauthorized action.'); } + // Check if the request is already approved or rejected if ($request->status !== RequestModel::STATUS_PENDING) { return redirect()->route('requests.show', $request)->with('error', 'Cannot delete an approved or rejected request.'); } + // Delete the specified request $request->delete(); diff --git a/app/Http/Controllers/VoteController.php b/app/Http/Controllers/VoteController.php index 83e09a1..3aa7a06 100644 --- a/app/Http/Controllers/VoteController.php +++ b/app/Http/Controllers/VoteController.php @@ -8,9 +8,10 @@ use App\Http\Resources\CandidateResource; use App\Http\Resources\ElectionResource; use App\Models\Election; +use App\Models\Vote; use Inertia\Inertia; -class VoteController extends Controller +final class VoteController extends Controller { /** * Show the form for creating a new vote. @@ -39,7 +40,8 @@ public function store(Election $election, StoreVoteRequest $request) { $validated = $request->validated(); - $vote = $request->user()->voter->votes()->create([ + $vote = Vote::create([ + 'voter_id' => $request->user()->voter->id, 'election_id' => $election->id, 'candidate_id' => $validated['candidate_id'], ]); diff --git a/app/Http/Controllers/VoterController.php b/app/Http/Controllers/VoterController.php index 95951f1..1fa8861 100644 --- a/app/Http/Controllers/VoterController.php +++ b/app/Http/Controllers/VoterController.php @@ -8,7 +8,7 @@ use App\Models\Voter; use Illuminate\Http\Request; -class VoterController extends Controller +final class VoterController extends Controller { /** * Display a listing of the voter. @@ -26,12 +26,14 @@ public function index(Request $request) $query->whereAny( ['voter_number', 'name', 'aadhar_number', 'address', 'city', 'state', 'country', 'religion', 'pin_code'], 'like', - '%' . $request->search . '%' + '%'.$request->search.'%' ); } + if ($request->has('active')) { $query->where('active', $request['active']); } + $voters = $query->latest()->paginate(15)->onEachSide(1); return inertia('Voters/Index', [ @@ -48,7 +50,7 @@ public function index(Request $request) public function show(Voter $voter) { $user = request()->user(); - if (! ($user->is_admin || $user->id == $voter->user_id)) { + if (! $user->is_admin && $user->id !== $voter->user_id) { // Check if the user is authorized to delete the request abort(403, 'Unauthorized action.'); } diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index eb13da3..3ce0441 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -9,7 +9,7 @@ use Inertia\Middleware; use Tighten\Ziggy\Ziggy; -class HandleInertiaRequests extends Middleware +final class HandleInertiaRequests extends Middleware { /** * The root template that is loaded on the first page visit. diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php index f7547de..cb2fa38 100644 --- a/app/Http/Requests/Auth/LoginRequest.php +++ b/app/Http/Requests/Auth/LoginRequest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; -class LoginRequest extends FormRequest +final class LoginRequest extends FormRequest { /** * Determine if the user is authorized to make this request. @@ -82,6 +82,6 @@ public function ensureIsNotRateLimited(): void */ public function throttleKey(): string { - return Str::transliterate(Str::lower($this->string('email')) . '|' . $this->ip()); + return Str::transliterate(Str::lower($this->email).'|'.$this->ip()); } } diff --git a/app/Http/Requests/ProfileUpdateRequest.php b/app/Http/Requests/ProfileUpdateRequest.php index df2e5d1..eb319ac 100644 --- a/app/Http/Requests/ProfileUpdateRequest.php +++ b/app/Http/Requests/ProfileUpdateRequest.php @@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rule; -class ProfileUpdateRequest extends FormRequest +final class ProfileUpdateRequest extends FormRequest { /** * Get the validation rules that apply to the request. diff --git a/app/Http/Requests/StoreCandidateRequest.php b/app/Http/Requests/StoreCandidateRequest.php index e04c86a..cf1edce 100644 --- a/app/Http/Requests/StoreCandidateRequest.php +++ b/app/Http/Requests/StoreCandidateRequest.php @@ -7,7 +7,7 @@ use App\Models\RequestModel; use Illuminate\Foundation\Http\FormRequest; -class StoreCandidateRequest extends FormRequest +final class StoreCandidateRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -20,7 +20,7 @@ public function rules(): array 'request_type' => [ 'required', 'string', - 'in:' . implode(',', [RequestModel::TYPE_NEW_CANDIDATE, RequestModel::TYPE_EXIST_CANDIDATE]), + 'in:'.implode(',', [RequestModel::TYPE_NEW_CANDIDATE, RequestModel::TYPE_EXIST_CANDIDATE]), ], 'name' => [ 'required', diff --git a/app/Http/Requests/StoreElectionRequest.php b/app/Http/Requests/StoreElectionRequest.php index dff60c2..6d008ad 100644 --- a/app/Http/Requests/StoreElectionRequest.php +++ b/app/Http/Requests/StoreElectionRequest.php @@ -6,7 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; -class StoreElectionRequest extends FormRequest +final class StoreElectionRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -30,7 +30,7 @@ public function rules(): array 'level' => [ 'required', 'string', - 'in:' . implode(',', \App\Models\Election::LEVELS), + 'in:'.implode(',', \App\Models\Election::LEVELS), ], 'level_name' => [ 'required', diff --git a/app/Http/Requests/StoreVoteRequest.php b/app/Http/Requests/StoreVoteRequest.php index 2ac94f4..31be0c7 100644 --- a/app/Http/Requests/StoreVoteRequest.php +++ b/app/Http/Requests/StoreVoteRequest.php @@ -11,7 +11,7 @@ use Illuminate\Validation\Rule; use Illuminate\Validation\Validator; -class StoreVoteRequest extends FormRequest +final class StoreVoteRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -32,11 +32,12 @@ public function rules(): array /** * Configure the validator instance. */ - public function withValidator(Validator $validator) + public function withValidator(Validator $validator): void { if ($validator->errors()->count()) { return; // Skip if there are already errors } + $validator->after(function ($validator): void { // Only check for duplicate products when creating, not updating $voter = Voter::where('user_id', $this->user()->id) @@ -63,18 +64,20 @@ public function withValidator(Validator $validator) return; } + if ($election->end_on->lessThan(now())) { $validator->errors()->add('vote', 'Voting has ended.'); return; } + if ($election->level === Election::LEVEL_OTHER) { return; } - if (strtolower($voter[$election->level]) !== strtolower($election->level_name)) { - $validator->errors()->add('vote', 'You are not eligible to vote in this election.' . - ' Your ' . $election->level . ' is ' . $voter[$election->level] . ' but the election is for ' . $election->level_name . '.'); + if (mb_strtolower((string) $voter[$election->level]) !== mb_strtolower((string) $election->level_name)) { + $validator->errors()->add('vote', 'You are not eligible to vote in this election.'. + ' Your '.$election->level.' is '.$voter[$election->level].' but the election is for '.$election->level_name.'.'); return; } diff --git a/app/Http/Requests/StoreVoterRequest.php b/app/Http/Requests/StoreVoterRequest.php index 7b7a8cd..c907ffc 100644 --- a/app/Http/Requests/StoreVoterRequest.php +++ b/app/Http/Requests/StoreVoterRequest.php @@ -7,7 +7,7 @@ use App\Models\RequestModel; use Illuminate\Foundation\Http\FormRequest; -class StoreVoterRequest extends FormRequest +final class StoreVoterRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -20,7 +20,7 @@ public function rules(): array 'request_type' => [ 'required', 'string', - 'in:' . implode(',', [RequestModel::TYPE_NEW_VOTER, RequestModel::TYPE_EXIST_VOTER]), + 'in:'.implode(',', [RequestModel::TYPE_NEW_VOTER, RequestModel::TYPE_EXIST_VOTER]), ], 'name' => [ 'required', @@ -30,7 +30,7 @@ public function rules(): array 'date_of_birth' => [ 'required', 'date_format:Y-m-d', - 'before:' . now()->subYears(18)->format('Y-m-d'), + 'before:'.now()->subYears(18)->format('Y-m-d'), ], 'aadhar_number' => [ 'required', diff --git a/app/Http/Requests/UpdateElectionRequest.php b/app/Http/Requests/UpdateElectionRequest.php index ef50d9c..4636c80 100644 --- a/app/Http/Requests/UpdateElectionRequest.php +++ b/app/Http/Requests/UpdateElectionRequest.php @@ -6,7 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; -class UpdateElectionRequest extends FormRequest +final class UpdateElectionRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -20,7 +20,7 @@ public function rules(): array 'required', 'string', 'max:255', - 'unique:elections,name,' . $this->election->id, + 'unique:elections,name,'.$this->election->id, ], 'description' => [ 'required', @@ -30,7 +30,7 @@ public function rules(): array 'level' => [ 'required', 'string', - 'in:' . implode(',', \App\Models\Election::LEVELS), + 'in:'.implode(',', \App\Models\Election::LEVELS), ], 'level_name' => [ 'required', diff --git a/app/Http/Requests/UpdateRequestRequest.php b/app/Http/Requests/UpdateRequestRequest.php index d8bf0d5..c966e92 100644 --- a/app/Http/Requests/UpdateRequestRequest.php +++ b/app/Http/Requests/UpdateRequestRequest.php @@ -6,7 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; -class UpdateRequestRequest extends FormRequest +final class UpdateRequestRequest extends FormRequest { /** * Get the validation rules that apply to the request. @@ -19,10 +19,10 @@ public function rules(): array 'status' => [ 'required', 'string', - 'in:' . implode(',', \App\Models\RequestModel::STATUSES), + 'in:'.implode(',', \App\Models\RequestModel::STATUSES), ], 'comment' => [ - 'required_if:status,' . \App\Models\RequestModel::STATUS_REJECTED, + 'required_if:status,'.\App\Models\RequestModel::STATUS_REJECTED, 'string', ], ]; diff --git a/app/Http/Resources/CandidateResource.php b/app/Http/Resources/CandidateResource.php index 2a466a3..4b4a221 100644 --- a/app/Http/Resources/CandidateResource.php +++ b/app/Http/Resources/CandidateResource.php @@ -8,7 +8,10 @@ use Illuminate\Http\Resources\Json\JsonResource; use Illuminate\Support\Facades\Storage; -class CandidateResource extends JsonResource +/** + * @mixin \App\Models\Candidate + */ +final class CandidateResource extends JsonResource { /** * Transform the resource into an array. diff --git a/app/Http/Resources/ElectionResource.php b/app/Http/Resources/ElectionResource.php index 01e96fb..8beb045 100644 --- a/app/Http/Resources/ElectionResource.php +++ b/app/Http/Resources/ElectionResource.php @@ -7,7 +7,10 @@ use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; -class ElectionResource extends JsonResource +/** + * @mixin \App\Models\Election + */ +final class ElectionResource extends JsonResource { /** * Transform the resource into an array. diff --git a/app/Http/Resources/RequestResource.php b/app/Http/Resources/RequestResource.php index 3a0760d..1b5c321 100644 --- a/app/Http/Resources/RequestResource.php +++ b/app/Http/Resources/RequestResource.php @@ -8,7 +8,10 @@ use Illuminate\Http\Resources\Json\JsonResource; use Illuminate\Support\Facades\Storage; -class RequestResource extends JsonResource +/** + * @mixin \App\Models\RequestModel + */ +final class RequestResource extends JsonResource { /** * Transform the resource into an array. diff --git a/app/Http/Resources/UserResource.php b/app/Http/Resources/UserResource.php index ad089bf..ed3bf98 100644 --- a/app/Http/Resources/UserResource.php +++ b/app/Http/Resources/UserResource.php @@ -7,14 +7,17 @@ use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; -class UserResource extends JsonResource +/** + * @mixin \App\Models\User + */ +final class UserResource extends JsonResource { /** * The "data" wrapper that should be applied. * * @var string|null */ - public static $wrap = null; + public static $wrap; /** * Transform the resource into an array. diff --git a/app/Http/Resources/VoterResource.php b/app/Http/Resources/VoterResource.php index 5ce77f2..491a014 100644 --- a/app/Http/Resources/VoterResource.php +++ b/app/Http/Resources/VoterResource.php @@ -8,7 +8,10 @@ use Illuminate\Http\Resources\Json\JsonResource; use Illuminate\Support\Facades\Storage; -class VoterResource extends JsonResource +/** + * @mixin \App\Models\Voter + */ +final class VoterResource extends JsonResource { /** * Transform the resource into an array. diff --git a/app/Models/Candidate.php b/app/Models/Candidate.php index aaeb464..7d593ec 100644 --- a/app/Models/Candidate.php +++ b/app/Models/Candidate.php @@ -9,7 +9,53 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; -class Candidate extends Model +/** + * Class Candidate + * + * Represents a candidate in an election with various attributes and relationships. + * + * @property int $id + * @property int $user_id + * @property string $name + * @property int $election_id + * @property string|null $candidate_image + * @property string|null $description + * @property string|null $qualification + * @property string|null $property + * @property string|null $address + * @property string|null $city + * @property string|null $state + * @property string|null $country + * @property string|null $pin_code + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read Election|null $election + * @property-read User|null $user + * @property-read \Illuminate\Database\Eloquent\Collection $votes + * @property-read int|null $votes_count + * + * @method static \Illuminate\Database\Eloquent\Builder|Candidate newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Candidate newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Candidate query() + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereAddress($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereCandidateImage($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereCity($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereElectionId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate wherePinCode($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereProperty($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereQualification($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereState($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Candidate whereUserId($value) + * + * @mixin \Eloquent + */ +final class Candidate extends Model { use HasFactory; @@ -35,8 +81,6 @@ class Candidate extends Model /** * Get user - * - * @return void */ public function user(): BelongsTo { diff --git a/app/Models/Country.php b/app/Models/Country.php index 53de548..5f38745 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -8,14 +8,40 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; -class Country extends Model +/** + * Class Country + * + * Represents a country with various attributes and relationships. + * + * @property int $id + * @property string $name + * @property string $iso2 + * @property string $iso3 + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read \Illuminate\Database\Eloquent\Collection $states + * @property-read int|null $states_count + * + * @method static \Illuminate\Database\Eloquent\Builder|Country newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Country newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Country query() + * @method static \Illuminate\Database\Eloquent\Builder|Country whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Country whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Country whereIso2($value) + * @method static \Illuminate\Database\Eloquent\Builder|Country whereIso3($value) + * @method static \Illuminate\Database\Eloquent\Builder|Country whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|Country whereUpdatedAt($value) + * + * @mixin \Eloquent + */ +final class Country extends Model { use HasFactory; /** * The attributes that are mass assignable. * - * @var array + * @var list */ protected $fillable = [ 'name', diff --git a/app/Models/Election.php b/app/Models/Election.php index 303bcfc..b95dfbf 100644 --- a/app/Models/Election.php +++ b/app/Models/Election.php @@ -9,7 +9,44 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; -class Election extends Model +/** + * Class Election + * + * Represents an election with various attributes and relationships. + * + * @property int $id + * @property string $name + * @property string $description + * @property string $level + * @property string $level_name + * @property \Illuminate\Support\Carbon $start_on + * @property \Illuminate\Support\Carbon $end_on + * @property int|null $last_updated_by + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read User|null $lastUpdatedBy + * @property-read \Illuminate\Database\Eloquent\Collection $candidates + * @property-read int|null $candidates_count + * @property-read \Illuminate\Database\Eloquent\Collection $votes + * @property-read int|null $votes_count + * + * @method static \Illuminate\Database\Eloquent\Builder|Election newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Election newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Election query() + * @method static \Illuminate\Database\Eloquent\Builder|Election whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereEndOn($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereLastUpdatedBy($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereLevel($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereLevelName($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereStartOn($value) + * @method static \Illuminate\Database\Eloquent\Builder|Election whereUpdatedAt($value) + * + * @mixin \Eloquent + */ +final class Election extends Model { use HasFactory; @@ -49,19 +86,6 @@ class Election extends Model 'last_updated_by', ]; - /** - * Get the attributes that should be cast. - * - * @return array - */ - protected function casts(): array - { - return [ - 'start_on' => 'datetime', - 'end_on' => 'datetime', - ]; - } - /** * Get last updated by user */ @@ -85,4 +109,17 @@ public function votes(): HasMany { return $this->hasMany(Vote::class); } + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'start_on' => 'datetime', + 'end_on' => 'datetime', + ]; + } } diff --git a/app/Models/RequestModel.php b/app/Models/RequestModel.php index 8d3461e..38cb741 100644 --- a/app/Models/RequestModel.php +++ b/app/Models/RequestModel.php @@ -13,11 +13,43 @@ use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; +/** + * Class RequestModel + * + * Represents a request made by a user for voter or candidate registration. + * + * @property int $id + * @property int $user_id + * @property string $type + * @property array $data + * @property array $old_data + * @property string $status + * @property string|null $comment + * @property int|null $last_updated_by + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read User $user + * @property-read User|null $lastUpdatedBy + * + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel query() + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereData($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereLastUpdatedBy($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereOldData($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereType($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereComment($value) + * @method static \Illuminate\Database\Eloquent\Builder|RequestModel whereUpdatedAt($value) + * + * @mixin \Eloquent + */ #[ObservedBy([RequestObserver::class])] -class RequestModel extends Model +final class RequestModel extends Model { - protected $table = 'requests'; - use HasFactory; /** @@ -49,6 +81,8 @@ class RequestModel extends Model public const TYPE_EXIST_CANDIDATE = 'exist_candidate'; + protected $table = 'requests'; + /** * The attributes that are mass assignable. * @@ -64,46 +98,34 @@ class RequestModel extends Model 'last_updated_by', ]; - /** - * Get user - */ - public function user(): BelongsTo - { - return $this->belongsTo(User::class); - } - - /** - * Get last updated by user - */ - public function lastUpdatedBy(): BelongsTo - { - return $this->belongsTo(User::class, 'last_updated_by'); - } - /** * Prepare the data for voter request. */ public static function getVoterRequestData(Request $request, ?Voter $model = null): array { - if ($model) { + if ($model instanceof Voter) { $keys = ['name', 'date_of_birth', 'aadhar_number', 'address', 'city', 'state', 'country', 'pin_code', 'religion', 'voter_alive']; foreach ($keys as $key) { if ($key === 'voter_alive' && ! $request[$key]) { $data['data'][$key] = (bool) $request[$key]; $data['old_data'][$key] = true; } - if ($key === 'date_of_birth' && date('Y-m-d', strtotime($request[$key])) != $model->{$key}->format('Y-m-d')) { + + if ($key === 'date_of_birth' && date('Y-m-d', strtotime((string) $request[$key])) !== $model->{$key}->format('Y-m-d')) { $data['data'][$key] = $request[$key]; $data['old_data'][$key] = $model->{$key}->format('Y-m-d'); } + if (in_array($key, ['voter_alive', 'date_of_birth'])) { continue; } - if (isset($request[$key]) && $request[$key] != $model->{$key}) { + + if (isset($request[$key]) && $request[$key] !== $model->{$key}) { $data['data'][$key] = $request[$key]; $data['old_data'][$key] = $model->{$key}; } } + $data['data']['voter_id'] = $model->id; $data += [ 'user_id' => $request->user()->id, @@ -128,9 +150,10 @@ public static function getVoterRequestData(Request $request, ?Voter $model = nul 'status' => self::STATUS_PENDING, ]; } + if ($request->hasFile('aadhar_image')) { // Store the uploaded file and get the path - $data['data']['aadhar_image_path'] = $request->file('aadhar_image')->store('aadhar_images/' . Str::random(), 'public'); + $data['data']['aadhar_image_path'] = $request->file('aadhar_image')->store('aadhar_images/'.Str::random(), 'public'); } return $data; @@ -141,14 +164,15 @@ public static function getVoterRequestData(Request $request, ?Voter $model = nul */ public static function getCandidateRequestData(Request $request, ?Candidate $model = null): array { - if ($model) { + if ($model instanceof Candidate) { $keys = ['name', 'description', 'qualification', 'property', 'address', 'city', 'state', 'country', 'pin_code']; foreach ($keys as $key) { - if (isset($request[$key]) && $request[$key] != $model->{$key}) { + if (isset($request[$key]) && $request[$key] !== $model->{$key}) { $data['data'][$key] = $request[$key]; $data['old_data'][$key] = $model->{$key}; } } + $data['data']['election_id'] = $model->election_id; $data['data']['candidate_id'] = $model->id; $data += [ @@ -175,25 +199,29 @@ public static function getCandidateRequestData(Request $request, ?Candidate $mod 'status' => self::STATUS_PENDING, ]; } + if ($request->hasFile('candidate_image')) { // Store the uploaded file and get the path - $data['data']['candidate_image'] = $request->file('candidate_image')->store('candidate_images/' . Str::random(), 'public'); + $data['data']['candidate_image'] = $request->file('candidate_image')->store('candidate_images/'.Str::random(), 'public'); } return $data; } /** - * Get the attributes that should be cast. - * - * @return array + * Get user */ - protected function casts(): array + public function user(): BelongsTo { - return [ - 'data' => 'json', - 'old_data' => 'json', - ]; + return $this->belongsTo(User::class); + } + + /** + * Get last updated by user + */ + public function lastUpdatedBy(): BelongsTo + { + return $this->belongsTo(User::class, 'last_updated_by'); } /** @@ -205,6 +233,7 @@ public function delete(): bool // Delete the request return parent::delete(); } + if (isset($this->data['candidate_image']) && Storage::disk('public')->deleteDirectory(dirname($this->data['candidate_image']))) { // Delete the request return parent::delete(); @@ -212,4 +241,17 @@ public function delete(): bool return false; } + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'data' => 'json', + 'old_data' => 'json', + ]; + } } diff --git a/app/Models/State.php b/app/Models/State.php index 9ea4f1d..b4e5b24 100644 --- a/app/Models/State.php +++ b/app/Models/State.php @@ -7,14 +7,38 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -class State extends Model +/** + * Class State + * + * Represents a state with various attributes and relationships. + * + * @property int $id + * @property string $name + * @property string $code + * @property int $country_id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * + * @method static \Illuminate\Database\Eloquent\Builder|State newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|State newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|State query() + * @method static \Illuminate\Database\Eloquent\Builder|State whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|State whereCode($value) + * @method static \Illuminate\Database\Eloquent\Builder|State whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|State whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|State whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|State whereUpdatedAt($value) + * + * @mixin \Eloquent + */ +final class State extends Model { use HasFactory; /** * The attributes that are mass assignable. * - * @var array + * @var list */ protected $fillable = [ 'name', diff --git a/app/Models/User.php b/app/Models/User.php index e7e62bc..fc7c719 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -10,10 +10,41 @@ use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -class User extends Authenticatable implements MustVerifyEmail +/** + * Class User + * + * Represents a user in the system with various attributes and relationships. + * + * @property int $id + * @property string $name + * @property string $email + * @property string|null $profile_image_path + * @property \Illuminate\Support\Carbon|null $email_verified_at + * @property string $password + * @property string|null $remember_token + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read Voter|null $voter + * + * @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|User newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|User query() + * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereEmailVerifiedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereProfileImagePath($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value) + * @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value) + * + * @mixin \Eloquent + */ +final class User extends Authenticatable implements MustVerifyEmail { - /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, Notifiable; + use HasFactory; + use Notifiable; /** * The attributes that are mass assignable. @@ -37,6 +68,11 @@ class User extends Authenticatable implements MustVerifyEmail 'remember_token', ]; + public function voter(): HasOne + { + return $this->hasOne(Voter::class); + } + /** * Get the attributes that should be cast. * @@ -50,9 +86,4 @@ protected function casts(): array 'is_admin' => 'boolean', ]; } - - public function voter(): HasOne - { - return $this->hasOne(Voter::class); - } } diff --git a/app/Models/Vote.php b/app/Models/Vote.php index 7a243e3..84f0f9f 100644 --- a/app/Models/Vote.php +++ b/app/Models/Vote.php @@ -8,7 +8,34 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; -class Vote extends Model +/** + * Class Vote + * + * Represents a vote in an election with various attributes and relationships. + * + * @property int $id + * @property int $election_id + * @property int $candidate_id + * @property int $voter_id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read Candidate|null $candidate + * @property-read Election|null $election + * @property-read Voter|null $voter + * + * @method static \Illuminate\Database\Eloquent\Builder|Vote newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Vote newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Vote query() + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereCandidateId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereElectionId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Vote whereVoterId($value) + * + * @mixin \Eloquent + */ +final class Vote extends Model { use HasFactory; diff --git a/app/Models/Voter.php b/app/Models/Voter.php index c937ec8..4b11c0b 100644 --- a/app/Models/Voter.php +++ b/app/Models/Voter.php @@ -9,7 +9,54 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; -class Voter extends Model +/** + * Class Voter + * + * Represents a voter with various attributes and relationships. + * + * @property int $id + * @property int $user_id + * @property string $name + * @property string $voter_number + * @property \Illuminate\Support\Carbon|null $date_of_birth + * @property bool $active + * @property string|null $aadhar_number + * @property string|null $address + * @property string|null $city + * @property string|null $state + * @property string|null $country + * @property string|null $pin_code + * @property string|null $religion + * @property string|null $aadhar_image_path + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read \Illuminate\Database\Eloquent\Collection $votes + * @property-read int|null $votes_count + * @property-read User|null $user + * + * @method static \Illuminate\Database\Eloquent\Builder|Voter newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Voter newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Voter query() + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereAadharImagePath($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereAadharNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereAddress($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereCity($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereDateOfBirth($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter wherePinCode($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereReligion($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereState($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Voter whereVoterNumber($value) + * + * @mixin \Eloquent + */ +final class Voter extends Model { use HasFactory; @@ -49,6 +96,11 @@ public function user(): BelongsTo return $this->belongsTo(User::class); } + public function votes(): HasMany + { + return $this->hasMany(Vote::class); + } + /** * Get the attributes that should be cast. * @@ -61,9 +113,4 @@ protected function casts(): array 'active' => 'boolean', ]; } - - public function votes(): HasMany - { - return $this->hasMany(Vote::class); - } } diff --git a/app/Notifications/RequestApproved.php b/app/Notifications/RequestApproved.php index 9e18e2b..4ad5747 100644 --- a/app/Notifications/RequestApproved.php +++ b/app/Notifications/RequestApproved.php @@ -10,22 +10,19 @@ use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -class RequestApproved extends Notification implements ShouldQueue +final class RequestApproved extends Notification implements ShouldQueue { use Queueable; - /** - * The request model instance. - */ - protected RequestModel $requestModel; - /** * Create a new notification instance. */ - public function __construct(RequestModel $requestModel) - { - $this->requestModel = $requestModel; - } + public function __construct( + /** + * The request model instance. + */ + private RequestModel $requestModel + ) {} /** * Get the notification's delivery channels. @@ -48,7 +45,7 @@ public function toMail(object $notifiable): MailMessage return (new MailMessage()) ->subject('Request Approved') ->greeting('Hello!') - ->line("Your {$requestTypeLabel} request has been approved.") + ->line(sprintf('Your %s request has been approved.', $requestTypeLabel)) ->action('View Request', $url) ->line('Thank you for using our application!'); } diff --git a/app/Notifications/RequestRejected.php b/app/Notifications/RequestRejected.php index 61c2eb0..e1ef877 100644 --- a/app/Notifications/RequestRejected.php +++ b/app/Notifications/RequestRejected.php @@ -10,22 +10,19 @@ use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -class RequestRejected extends Notification implements ShouldQueue +final class RequestRejected extends Notification implements ShouldQueue { use Queueable; - /** - * The request model instance. - */ - protected RequestModel $requestModel; - /** * Create a new notification instance. */ - public function __construct(RequestModel $requestModel) - { - $this->requestModel = $requestModel; - } + public function __construct( + /** + * The request model instance. + */ + private RequestModel $requestModel + ) {} /** * Get the notification's delivery channels. @@ -48,7 +45,7 @@ public function toMail(object $notifiable): MailMessage return (new MailMessage()) ->subject('Request Rejected') ->greeting('Hello!') - ->line("Your {$requestTypeLabel} request has been rejected.") + ->line(sprintf('Your %s request has been rejected.', $requestTypeLabel)) ->action('View Request', $url) ->line('Thank you for using our application!'); } diff --git a/app/Observers/RequestObserver.php b/app/Observers/RequestObserver.php index d5eb876..de2a7dd 100644 --- a/app/Observers/RequestObserver.php +++ b/app/Observers/RequestObserver.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Notification; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -class RequestObserver +final class RequestObserver { /** * Handle the RequestModel "updated" event. @@ -36,6 +36,7 @@ public function updated(RequestModel $requestModel): void if (Voter::where(['user_id' => $requestModel->user_id, 'active' => true])->exists()) { throw new BadRequestHttpException('User already has a voter'); } + // Create a new voter if the request is of type new_voter $voter = Voter::create(array_merge([ 'user_id' => $requestModel->user_id, @@ -44,14 +45,16 @@ public function updated(RequestModel $requestModel): void } else { // Update the existing voter if the request is of type exist_voter $voter = Voter::findOrFail($requestModel->data['voter_id']); - if ($voter->state === Voter::STATUS_INACTIVE) { + if (! $voter->active) { throw new BadRequestHttpException('Voter is inactive'); } + // Update the voter's details $data = $requestModel->data; if (isset($data['voter_alive']) && ! $data['voter_alive']) { $data = ['active' => false]; } + unset($data['voter_id'], $data['voter_alive']); $voter->update($data); } @@ -63,15 +66,19 @@ public function updated(RequestModel $requestModel): void if (! $election) { throw new BadRequestHttpException('Election not found'); } + if ($election->end_on->isPast()) { throw new BadRequestHttpException('Election has already ended'); } + if ($election->start_on->isPast()) { throw new BadRequestHttpException('Election is ongoing'); } + if ($election->candidates()->where('user_id', $requestModel->user_id)->exists()) { throw new BadRequestHttpException('User already has a candidate'); } + if ($requestModel->type === RequestModel::TYPE_NEW_CANDIDATE) { // Create a new Candidate if request is of type new_candidate $candidate = Candidate::create(array_merge([ @@ -86,6 +93,7 @@ public function updated(RequestModel $requestModel): void unset($data['candidate_id']); $candidate->update($data); } + // Send notification to the user Notification::send($requestModel->user, new RequestApproved($requestModel)); } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 33c420d..2a357ce 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Vite; use Illuminate\Support\ServiceProvider; -class AppServiceProvider extends ServiceProvider +final class AppServiceProvider extends ServiceProvider { /** * Register any application services. diff --git a/app/Services/LocationService.php b/app/Services/LocationService.php index 7a134b6..3e1a25b 100644 --- a/app/Services/LocationService.php +++ b/app/Services/LocationService.php @@ -6,7 +6,7 @@ use App\Models\Country; -class LocationService +final class LocationService { /** * Get all countries diff --git a/bootstrap/app.php b/bootstrap/app.php index 29ec3d9..3ce0bce 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -8,19 +8,19 @@ return Application::configure(basePath: dirname(__DIR__)) ->withRouting( - web: __DIR__ . '/../routes/web.php', - api: __DIR__ . '/../routes/api.php', - commands: __DIR__ . '/../routes/console.php', + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', health: '/up', ) - ->withMiddleware(function (Middleware $middleware) { + ->withMiddleware(function (Middleware $middleware): void { $middleware->web(append: [ - \App\Http\Middleware\HandleInertiaRequests::class, - \Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class, + App\Http\Middleware\HandleInertiaRequests::class, + Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class, ]); // }) - ->withExceptions(function (Exceptions $exceptions) { + ->withExceptions(function (Exceptions $exceptions): void { // })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php index ef936a6..84c7d4d 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -3,5 +3,5 @@ declare(strict_types=1); return [ - \App\Providers\AppServiceProvider::class, + App\Providers\AppServiceProvider::class, ]; diff --git a/composer.json b/composer.json index 2d1149d..0fde306 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,16 @@ { - "$schema": "https://getcomposer.org/schema.json", - "name": "laravel/laravel", + "name": "voting/system", "type": "project", - "description": "The skeleton application for the Laravel framework.", - "keywords": ["laravel", "framework"], + "description": "This application is written in laravel php framwork for online voting system.", + "keywords": [ + "laravel", + "framework", + "voting", + "system", + "online", + "election", + "vote" + ], "license": "MIT", "require": { "php": "^8.2", @@ -15,14 +22,15 @@ }, "require-dev": { "fakerphp/faker": "^1.23", - "laravel/breeze": "^2.3", + "larastan/larastan": "^3.0", "laravel/pail": "^1.1", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.1", - "pestphp/pest": "^2.34", - "pestphp/pest-plugin-laravel": "^2.2" + "pestphp/pest": "^3.7", + "pestphp/pest-plugin-type-coverage": "^3.2", + "rector/rector": "^2.0" }, "autoload": { "psr-4": { @@ -58,6 +66,20 @@ "dev": [ "Composer\\Config::disableProcessTimeout", "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite" + ], + "rector": "rector", + "lint": "pint", + "test:rector": "rector --dry-run", + "test:lint": "pint --test", + "test:types": "phpstan analyse", + "test:unit": "pest --colors=always --parallel --coverage --min=90", + "test:type-coverage": "pest --type-coverage --min=90", + "test": [ + "@test:type-coverage", + "@test:rector", + "@test:lint", + "@test:types", + "@test:unit" ] }, "extra": { diff --git a/composer.lock b/composer.lock index 56c8af4..f7774d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "76d01a03bc2a9bd69716268106ea7180", + "content-hash": "65647502cfbb997d3e362a01f47545d9", "packages": [ { "name": "brick/math", @@ -1124,16 +1124,16 @@ }, { "name": "laravel/framework", - "version": "v11.44.7", + "version": "v11.45.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "00bc6ac91a6d577bf051c18ddaa638c0d221e1c7" + "reference": "b09ba32795b8e71df10856a2694706663984a239" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/00bc6ac91a6d577bf051c18ddaa638c0d221e1c7", - "reference": "00bc6ac91a6d577bf051c18ddaa638c0d221e1c7", + "url": "https://api.github.com/repos/laravel/framework/zipball/b09ba32795b8e71df10856a2694706663984a239", + "reference": "b09ba32795b8e71df10856a2694706663984a239", "shasum": "" }, "require": { @@ -1154,7 +1154,7 @@ "guzzlehttp/uri-template": "^1.0", "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", "laravel/serializable-closure": "^1.3|^2.0", - "league/commonmark": "^2.6", + "league/commonmark": "^2.7", "league/flysystem": "^3.25.1", "league/flysystem-local": "^3.25.1", "league/uri": "^7.5.1", @@ -1241,7 +1241,7 @@ "league/flysystem-read-only": "^3.25.1", "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", - "orchestra/testbench-core": "^9.11.2", + "orchestra/testbench-core": "^9.13.2", "pda/pheanstalk": "^5.0.6", "php-http/discovery": "^1.15", "phpstan/phpstan": "^2.0", @@ -1335,7 +1335,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2025-04-25T12:40:47+00:00" + "time": "2025-06-03T14:01:40+00:00" }, { "name": "laravel/prompts", @@ -2411,16 +2411,16 @@ }, { "name": "nette/utils", - "version": "v4.0.6", + "version": "v4.0.7", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "ce708655043c7050eb050df361c5e313cf708309" + "reference": "e67c4061eb40b9c113b218214e42cb5a0dda28f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", - "reference": "ce708655043c7050eb050df361c5e313cf708309", + "url": "https://api.github.com/repos/nette/utils/zipball/e67c4061eb40b9c113b218214e42cb5a0dda28f2", + "reference": "e67c4061eb40b9c113b218214e42cb5a0dda28f2", "shasum": "" }, "require": { @@ -2491,22 +2491,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.6" + "source": "https://github.com/nette/utils/tree/v4.0.7" }, - "time": "2025-03-30T21:06:30+00:00" + "time": "2025-06-03T04:55:08+00:00" }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -2549,9 +2549,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "nunomaduro/termwind", @@ -3328,20 +3328,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.6", + "version": "4.8.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "91039bc1faa45ba123c4328958e620d382ec7088" + "reference": "fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", - "reference": "91039bc1faa45ba123c4328958e620d382ec7088", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28", + "reference": "fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -3350,26 +3350,23 @@ "rhumsaa/uuid": "self.version" }, "require-dev": { - "captainhook/captainhook": "^5.10", + "captainhook/captainhook": "^5.25", "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.8", - "ergebnis/composer-normalize": "^2.15", - "mockery/mockery": "^1.3", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "ergebnis/composer-normalize": "^2.47", + "mockery/mockery": "^1.6", "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.2", - "php-mock/php-mock-mockery": "^1.3", - "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^8.5 || ^9", - "ramsey/composer-repl": "^1.4", - "slevomat/coding-standard": "^8.4", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9" + "php-mock/php-mock": "^2.6", + "php-mock/php-mock-mockery": "^1.5", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpbench/phpbench": "^1.2.14", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6", + "slevomat/coding-standard": "^8.18", + "squizlabs/php_codesniffer": "^3.13" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", @@ -3404,23 +3401,13 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.6" + "source": "https://github.com/ramsey/uuid/tree/4.8.1" }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", - "type": "tidelift" - } - ], - "time": "2024-04-27T21:32:50+00:00" + "time": "2025-06-01T06:28:46+00:00" }, { "name": "symfony/clock", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", @@ -3474,7 +3461,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v7.2.0" + "source": "https://github.com/symfony/clock/tree/v7.3.0" }, "funding": [ { @@ -3494,23 +3481,24 @@ }, { "name": "symfony/console", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^7.2" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -3567,7 +3555,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.6" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -3583,11 +3571,11 @@ "type": "tidelift" } ], - "time": "2025-04-07T19:09:28+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/css-selector", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3632,7 +3620,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.2.0" + "source": "https://github.com/symfony/css-selector/tree/v7.3.0" }, "funding": [ { @@ -3652,16 +3640,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -3674,7 +3662,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -3699,7 +3687,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -3715,20 +3703,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/error-handler", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b" + "reference": "cf68d225bc43629de4ff54778029aee6dc191b83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", - "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/cf68d225bc43629de4ff54778029aee6dc191b83", + "reference": "cf68d225bc43629de4ff54778029aee6dc191b83", "shasum": "" }, "require": { @@ -3741,9 +3729,11 @@ "symfony/http-kernel": "<6.4" }, "require-dev": { + "symfony/console": "^6.4|^7.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0" + "symfony/serializer": "^6.4|^7.0", + "symfony/webpack-encore-bundle": "^1.0|^2.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -3774,7 +3764,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.2.5" + "source": "https://github.com/symfony/error-handler/tree/v7.3.0" }, "funding": [ { @@ -3790,20 +3780,20 @@ "type": "tidelift" } ], - "time": "2025-03-03T07:12:39+00:00" + "time": "2025-05-29T07:19:49+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" + "reference": "497f73ac996a598c92409b44ac43b6690c4f666d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/497f73ac996a598c92409b44ac43b6690c4f666d", + "reference": "497f73ac996a598c92409b44ac43b6690c4f666d", "shasum": "" }, "require": { @@ -3854,7 +3844,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.0" }, "funding": [ { @@ -3870,20 +3860,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2025-04-22T09:11:45+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", "shasum": "" }, "require": { @@ -3897,7 +3887,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -3930,7 +3920,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" }, "funding": [ { @@ -3946,20 +3936,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/finder", - "version": "v7.2.2", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb" + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb", + "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", "shasum": "" }, "require": { @@ -3994,7 +3984,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.2" + "source": "https://github.com/symfony/finder/tree/v7.3.0" }, "funding": [ { @@ -4010,20 +4000,20 @@ "type": "tidelift" } ], - "time": "2024-12-30T19:00:17+00:00" + "time": "2024-12-30T19:00:26+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "6023ec7607254c87c5e69fb3558255aca440d72b" + "reference": "4236baf01609667d53b20371486228231eb135fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6023ec7607254c87c5e69fb3558255aca440d72b", - "reference": "6023ec7607254c87c5e69fb3558255aca440d72b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4236baf01609667d53b20371486228231eb135fd", + "reference": "4236baf01609667d53b20371486228231eb135fd", "shasum": "" }, "require": { @@ -4040,6 +4030,7 @@ "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "symfony/cache": "^6.4.12|^7.1.5", + "symfony/clock": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/expression-language": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", @@ -4072,7 +4063,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.6" + "source": "https://github.com/symfony/http-foundation/tree/v7.3.0" }, "funding": [ { @@ -4088,20 +4079,20 @@ "type": "tidelift" } ], - "time": "2025-04-09T08:14:01+00:00" + "time": "2025-05-12T14:48:23+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec" + "reference": "ac7b8e163e8c83dce3abcc055a502d4486051a9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f9dec01e6094a063e738f8945ef69c0cfcf792ec", - "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ac7b8e163e8c83dce3abcc055a502d4486051a9f", + "reference": "ac7b8e163e8c83dce3abcc055a502d4486051a9f", "shasum": "" }, "require": { @@ -4109,8 +4100,8 @@ "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/event-dispatcher": "^7.3", + "symfony/http-foundation": "^7.3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -4186,7 +4177,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.2.6" + "source": "https://github.com/symfony/http-kernel/tree/v7.3.0" }, "funding": [ { @@ -4202,20 +4193,20 @@ "type": "tidelift" } ], - "time": "2025-05-02T09:04:03+00:00" + "time": "2025-05-29T07:47:32+00:00" }, { "name": "symfony/mailer", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356" + "reference": "0f375bbbde96ae8c78e4aa3e63aabd486e33364c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/998692469d6e698c6eadc7ef37a6530a9eabb356", - "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356", + "url": "https://api.github.com/repos/symfony/mailer/zipball/0f375bbbde96ae8c78e4aa3e63aabd486e33364c", + "reference": "0f375bbbde96ae8c78e4aa3e63aabd486e33364c", "shasum": "" }, "require": { @@ -4266,7 +4257,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.2.6" + "source": "https://github.com/symfony/mailer/tree/v7.3.0" }, "funding": [ { @@ -4282,20 +4273,20 @@ "type": "tidelift" } ], - "time": "2025-04-04T09:50:51+00:00" + "time": "2025-04-04T09:51:09+00:00" }, { "name": "symfony/mime", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1" + "reference": "0e7b19b2f399c31df0cdbe5d8cbf53f02f6cfcd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/706e65c72d402539a072d0d6ad105fff6c161ef1", - "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1", + "url": "https://api.github.com/repos/symfony/mime/zipball/0e7b19b2f399c31df0cdbe5d8cbf53f02f6cfcd9", + "reference": "0e7b19b2f399c31df0cdbe5d8cbf53f02f6cfcd9", "shasum": "" }, "require": { @@ -4350,7 +4341,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.2.6" + "source": "https://github.com/symfony/mime/tree/v7.3.0" }, "funding": [ { @@ -4366,7 +4357,7 @@ "type": "tidelift" } ], - "time": "2025-04-27T13:34:41+00:00" + "time": "2025-02-19T08:51:26+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5007,16 +4998,16 @@ }, { "name": "symfony/process", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", + "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", "shasum": "" }, "require": { @@ -5048,7 +5039,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.5" + "source": "https://github.com/symfony/process/tree/v7.3.0" }, "funding": [ { @@ -5064,20 +5055,20 @@ "type": "tidelift" } ], - "time": "2025-03-13T12:21:46+00:00" + "time": "2025-04-17T09:11:12+00:00" }, { "name": "symfony/routing", - "version": "v7.2.3", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996" + "reference": "8e213820c5fea844ecea29203d2a308019007c15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ee9a67edc6baa33e5fae662f94f91fd262930996", - "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996", + "url": "https://api.github.com/repos/symfony/routing/zipball/8e213820c5fea844ecea29203d2a308019007c15", + "reference": "8e213820c5fea844ecea29203d2a308019007c15", "shasum": "" }, "require": { @@ -5129,7 +5120,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.2.3" + "source": "https://github.com/symfony/routing/tree/v7.3.0" }, "funding": [ { @@ -5145,20 +5136,20 @@ "type": "tidelift" } ], - "time": "2025-01-17T10:56:55+00:00" + "time": "2025-05-24T20:43:28+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -5176,7 +5167,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -5212,7 +5203,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -5228,20 +5219,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { @@ -5299,7 +5290,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.6" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -5315,20 +5306,20 @@ "type": "tidelift" } ], - "time": "2025-04-20T20:18:16+00:00" + "time": "2025-04-20T20:19:01+00:00" }, { "name": "symfony/translation", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6" + "reference": "4aba29076a29a3aa667e09b791e5f868973a8667" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", - "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", + "url": "https://api.github.com/repos/symfony/translation/zipball/4aba29076a29a3aa667e09b791e5f868973a8667", + "reference": "4aba29076a29a3aa667e09b791e5f868973a8667", "shasum": "" }, "require": { @@ -5338,6 +5329,7 @@ "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { + "nikic/php-parser": "<5.0", "symfony/config": "<6.4", "symfony/console": "<6.4", "symfony/dependency-injection": "<6.4", @@ -5351,7 +5343,7 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "nikic/php-parser": "^4.18|^5.0", + "nikic/php-parser": "^5.0", "psr/log": "^1|^2|^3", "symfony/config": "^6.4|^7.0", "symfony/console": "^6.4|^7.0", @@ -5394,7 +5386,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.2.6" + "source": "https://github.com/symfony/translation/tree/v7.3.0" }, "funding": [ { @@ -5410,20 +5402,20 @@ "type": "tidelift" } ], - "time": "2025-04-07T19:09:28+00:00" + "time": "2025-05-29T07:19:49+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", "shasum": "" }, "require": { @@ -5436,7 +5428,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -5472,7 +5464,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" }, "funding": [ { @@ -5488,20 +5480,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-27T08:32:26+00:00" }, { "name": "symfony/uid", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "2d294d0c48df244c71c105a169d0190bfb080426" + "reference": "7beeb2b885cd584cd01e126c5777206ae4c3c6a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/2d294d0c48df244c71c105a169d0190bfb080426", - "reference": "2d294d0c48df244c71c105a169d0190bfb080426", + "url": "https://api.github.com/repos/symfony/uid/zipball/7beeb2b885cd584cd01e126c5777206ae4c3c6a3", + "reference": "7beeb2b885cd584cd01e126c5777206ae4c3c6a3", "shasum": "" }, "require": { @@ -5546,7 +5538,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.2.0" + "source": "https://github.com/symfony/uid/tree/v7.3.0" }, "funding": [ { @@ -5562,24 +5554,25 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2025-05-24T14:28:13+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb" + "reference": "548f6760c54197b1084e1e5c71f6d9d523f2f78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9c46038cd4ed68952166cf7001b54eb539184ccb", - "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/548f6760c54197b1084e1e5c71f6d9d523f2f78e", + "reference": "548f6760c54197b1084e1e5c71f6d9d523f2f78e", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -5629,7 +5622,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.2.6" + "source": "https://github.com/symfony/var-dumper/tree/v7.3.0" }, "funding": [ { @@ -5645,20 +5638,20 @@ "type": "tidelift" } ], - "time": "2025-04-09T08:14:01+00:00" + "time": "2025-04-27T18:39:23+00:00" }, { "name": "tightenco/ziggy", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/tighten/ziggy.git", - "reference": "d59dbb61dc0a1d9abb2130451b9e5e0f264bfe1c" + "reference": "0b3b521d2c55fbdb04b6721532f7f5f49d32f52b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/ziggy/zipball/d59dbb61dc0a1d9abb2130451b9e5e0f264bfe1c", - "reference": "d59dbb61dc0a1d9abb2130451b9e5e0f264bfe1c", + "url": "https://api.github.com/repos/tighten/ziggy/zipball/0b3b521d2c55fbdb04b6721532f7f5f49d32f52b", + "reference": "0b3b521d2c55fbdb04b6721532f7f5f49d32f52b", "shasum": "" }, "require": { @@ -5713,9 +5706,9 @@ ], "support": { "issues": "https://github.com/tighten/ziggy/issues", - "source": "https://github.com/tighten/ziggy/tree/v2.5.2" + "source": "https://github.com/tighten/ziggy/tree/v2.5.3" }, - "time": "2025-02-27T15:43:52+00:00" + "time": "2025-05-17T18:15:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5992,16 +5985,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.4.8", + "version": "v7.8.3", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "cf16fcbb9b8107a7df6b97e497fc91e819774d8b" + "reference": "a585c346ddf1bec22e51e20b5387607905604a71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/cf16fcbb9b8107a7df6b97e497fc91e819774d8b", - "reference": "cf16fcbb9b8107a7df6b97e497fc91e819774d8b", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/a585c346ddf1bec22e51e20b5387607905604a71", + "reference": "a585c346ddf1bec22e51e20b5387607905604a71", "shasum": "" }, "require": { @@ -6010,26 +6003,26 @@ "ext-reflection": "*", "ext-simplexml": "*", "fidry/cpu-core-counter": "^1.2.0", - "jean85/pretty-package-versions": "^2.0.6", + "jean85/pretty-package-versions": "^2.1.0", "php": "~8.2.0 || ~8.3.0 || ~8.4.0", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-timer": "^6.0.0", - "phpunit/phpunit": "^10.5.36", - "sebastian/environment": "^6.1.0", - "symfony/console": "^6.4.7 || ^7.1.5", - "symfony/process": "^6.4.7 || ^7.1.5" + "phpunit/php-code-coverage": "^11.0.9 || ^12.0.4", + "phpunit/php-file-iterator": "^5.1.0 || ^6", + "phpunit/php-timer": "^7.0.1 || ^8", + "phpunit/phpunit": "^11.5.11 || ^12.0.6", + "sebastian/environment": "^7.2.0 || ^8", + "symfony/console": "^6.4.17 || ^7.2.1", + "symfony/process": "^6.4.19 || ^7.2.4" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^1.12.6", - "phpstan/phpstan-deprecation-rules": "^1.2.1", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.1", - "squizlabs/php_codesniffer": "^3.10.3", - "symfony/filesystem": "^6.4.3 || ^7.1.5" + "phpstan/phpstan": "^2.1.6", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.4", + "phpstan/phpstan-strict-rules": "^2.0.3", + "squizlabs/php_codesniffer": "^3.11.3", + "symfony/filesystem": "^6.4.13 || ^7.2.0" }, "bin": [ "bin/paratest", @@ -6069,7 +6062,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.4.8" + "source": "https://github.com/paratestphp/paratest/tree/v7.8.3" }, "funding": [ { @@ -6081,7 +6074,7 @@ "type": "paypal" } ], - "time": "2024-10-15T12:45:19+00:00" + "time": "2025-03-05T08:29:11+00:00" }, { "name": "doctrine/deprecations", @@ -6257,16 +6250,16 @@ }, { "name": "filp/whoops", - "version": "2.18.0", + "version": "2.18.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e" + "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", - "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "url": "https://api.github.com/repos/filp/whoops/zipball/8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", + "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", "shasum": "" }, "require": { @@ -6316,7 +6309,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.0" + "source": "https://github.com/filp/whoops/tree/2.18.1" }, "funding": [ { @@ -6324,7 +6317,7 @@ "type": "github" } ], - "time": "2025-03-15T12:00:00+00:00" + "time": "2025-06-03T18:56:14+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6377,6 +6370,47 @@ }, "time": "2025-04-30T06:54:44+00:00" }, + { + "name": "iamcal/sql-parser", + "version": "v0.6", + "source": { + "type": "git", + "url": "https://github.com/iamcal/SQLParser.git", + "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/947083e2dca211a6f12fb1beb67a01e387de9b62", + "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62", + "shasum": "" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^5|^6|^7|^8|^9" + }, + "type": "library", + "autoload": { + "psr-4": { + "iamcal\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cal Henderson", + "email": "cal@iamcal.com" + } + ], + "description": "MySQL schema parser", + "support": { + "issues": "https://github.com/iamcal/SQLParser/issues", + "source": "https://github.com/iamcal/SQLParser/tree/v0.6" + }, + "time": "2025-03-17T16:59:46+00:00" + }, { "name": "jean85/pretty-package-versions", "version": "2.1.1", @@ -6438,43 +6472,59 @@ "time": "2025-03-19T14:43:43+00:00" }, { - "name": "laravel/breeze", - "version": "v2.3.6", + "name": "larastan/larastan", + "version": "v3.4.1", "source": { "type": "git", - "url": "https://github.com/laravel/breeze.git", - "reference": "390cbc433cb72fa6050965000b2d56c9ba6fd713" + "url": "https://github.com/larastan/larastan.git", + "reference": "dc20d24871d5a2138b292b0430d94d18da3dbc53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/breeze/zipball/390cbc433cb72fa6050965000b2d56c9ba6fd713", - "reference": "390cbc433cb72fa6050965000b2d56c9ba6fd713", + "url": "https://api.github.com/repos/larastan/larastan/zipball/dc20d24871d5a2138b292b0430d94d18da3dbc53", + "reference": "dc20d24871d5a2138b292b0430d94d18da3dbc53", "shasum": "" }, "require": { - "illuminate/console": "^11.0|^12.0", - "illuminate/filesystem": "^11.0|^12.0", - "illuminate/support": "^11.0|^12.0", - "illuminate/validation": "^11.0|^12.0", - "php": "^8.2.0", - "symfony/console": "^7.0" + "ext-json": "*", + "iamcal/sql-parser": "^0.6.0", + "illuminate/console": "^11.44.2 || ^12.4.1", + "illuminate/container": "^11.44.2 || ^12.4.1", + "illuminate/contracts": "^11.44.2 || ^12.4.1", + "illuminate/database": "^11.44.2 || ^12.4.1", + "illuminate/http": "^11.44.2 || ^12.4.1", + "illuminate/pipeline": "^11.44.2 || ^12.4.1", + "illuminate/support": "^11.44.2 || ^12.4.1", + "php": "^8.2", + "phpstan/phpstan": "^2.1.11" }, "require-dev": { - "laravel/framework": "^11.0|^12.0", - "orchestra/testbench-core": "^9.0|^10.0", - "phpstan/phpstan": "^2.0" + "doctrine/coding-standard": "^13", + "laravel/framework": "^11.44.2 || ^12.7.2", + "mockery/mockery": "^1.6.12", + "nikic/php-parser": "^5.4", + "orchestra/canvas": "^v9.2.2 || ^10.0.1", + "orchestra/testbench-core": "^9.12.0 || ^10.1", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpunit/phpunit": "^10.5.35 || ^11.5.15" }, - "type": "library", + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", "extra": { - "laravel": { - "providers": [ - "Laravel\\Breeze\\BreezeServiceProvider" + "phpstan": { + "includes": [ + "extension.neon" ] + }, + "branch-alias": { + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { - "Laravel\\Breeze\\": "src/" + "Larastan\\Larastan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -6483,33 +6533,45 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Can Vural", + "email": "can9119@gmail.com" } ], - "description": "Minimal Laravel authentication scaffolding with Blade and Tailwind.", + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel", "keywords": [ - "auth", - "laravel" + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" ], "support": { - "issues": "https://github.com/laravel/breeze/issues", - "source": "https://github.com/laravel/breeze" + "issues": "https://github.com/larastan/larastan/issues", + "source": "https://github.com/larastan/larastan/tree/v3.4.1" }, - "time": "2025-03-06T14:02:32+00:00" + "funding": [ + { + "url": "https://github.com/canvural", + "type": "github" + } + ], + "time": "2025-06-09T21:23:36+00:00" }, { "name": "laravel/pail", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/laravel/pail.git", - "reference": "f31f4980f52be17c4667f3eafe034e6826787db2" + "reference": "8cc3d575c1f0e57eeb923f366a37528c50d2385a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pail/zipball/f31f4980f52be17c4667f3eafe034e6826787db2", - "reference": "f31f4980f52be17c4667f3eafe034e6826787db2", + "url": "https://api.github.com/repos/laravel/pail/zipball/8cc3d575c1f0e57eeb923f366a37528c50d2385a", + "reference": "8cc3d575c1f0e57eeb923f366a37528c50d2385a", "shasum": "" }, "require": { @@ -6529,7 +6591,7 @@ "orchestra/testbench-core": "^8.13|^9.0|^10.0", "pestphp/pest": "^2.20|^3.0", "pestphp/pest-plugin-type-coverage": "^2.3|^3.0", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^1.12.27", "symfony/var-dumper": "^6.3|^7.0" }, "type": "library", @@ -6565,6 +6627,7 @@ "description": "Easily delve into your Laravel application's log files directly from the command line.", "homepage": "https://github.com/laravel/pail", "keywords": [ + "dev", "laravel", "logs", "php", @@ -6574,7 +6637,7 @@ "issues": "https://github.com/laravel/pail/issues", "source": "https://github.com/laravel/pail" }, - "time": "2025-01-28T15:15:15+00:00" + "time": "2025-06-05T13:55:57+00:00" }, { "name": "laravel/pint", @@ -6644,16 +6707,16 @@ }, { "name": "laravel/sail", - "version": "v1.42.0", + "version": "v1.43.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "2edaaf77f3c07a4099965bb3d7dfee16e801c0f6" + "reference": "3e7d899232a8c5e3ea4fc6dee7525ad583887e72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/2edaaf77f3c07a4099965bb3d7dfee16e801c0f6", - "reference": "2edaaf77f3c07a4099965bb3d7dfee16e801c0f6", + "url": "https://api.github.com/repos/laravel/sail/zipball/3e7d899232a8c5e3ea4fc6dee7525ad583887e72", + "reference": "3e7d899232a8c5e3ea4fc6dee7525ad583887e72", "shasum": "" }, "require": { @@ -6703,7 +6766,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2025-04-29T14:26:46+00:00" + "time": "2025-05-19T13:19:21+00:00" }, { "name": "mockery/mockery", @@ -6850,38 +6913,39 @@ }, { "name": "nunomaduro/collision", - "version": "v8.5.0", + "version": "v8.8.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "f5c101b929c958e849a633283adff296ed5f38f5" + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f5c101b929c958e849a633283adff296ed5f38f5", - "reference": "f5c101b929c958e849a633283adff296ed5f38f5", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/4cf9f3b47afff38b139fb79ce54fc71799022ce8", + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8", "shasum": "" }, "require": { - "filp/whoops": "^2.16.0", - "nunomaduro/termwind": "^2.1.0", + "filp/whoops": "^2.18.0", + "nunomaduro/termwind": "^2.3.0", "php": "^8.2.0", - "symfony/console": "^7.1.5" + "symfony/console": "^7.2.5" }, "conflict": { - "laravel/framework": "<11.0.0 || >=12.0.0", - "phpunit/phpunit": "<10.5.1 || >=12.0.0" + "laravel/framework": "<11.44.2 || >=13.0.0", + "phpunit/phpunit": "<11.5.15 || >=13.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.8", - "laravel/framework": "^11.28.0", - "laravel/pint": "^1.18.1", - "laravel/sail": "^1.36.0", - "laravel/sanctum": "^4.0.3", - "laravel/tinker": "^2.10.0", - "orchestra/testbench-core": "^9.5.3", - "pestphp/pest": "^2.36.0 || ^3.4.0", - "sebastian/environment": "^6.1.0 || ^7.2.0" + "brianium/paratest": "^7.8.3", + "larastan/larastan": "^3.2", + "laravel/framework": "^11.44.2 || ^12.6", + "laravel/pint": "^1.21.2", + "laravel/sail": "^1.41.0", + "laravel/sanctum": "^4.0.8", + "laravel/tinker": "^2.10.1", + "orchestra/testbench-core": "^9.12.0 || ^10.1", + "pestphp/pest": "^3.8.0", + "sebastian/environment": "^7.2.0 || ^8.0" }, "type": "library", "extra": { @@ -6918,6 +6982,7 @@ "cli", "command-line", "console", + "dev", "error", "handling", "laravel", @@ -6943,41 +7008,42 @@ "type": "patreon" } ], - "time": "2024-10-15T16:06:32+00:00" + "time": "2025-04-03T14:33:09+00:00" }, { "name": "pestphp/pest", - "version": "v2.36.0", + "version": "v3.8.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "f8c88bd14dc1772bfaf02169afb601ecdf2724cd" + "reference": "c6244a8712968dbac88eb998e7ff3b5caa556b0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/f8c88bd14dc1772bfaf02169afb601ecdf2724cd", - "reference": "f8c88bd14dc1772bfaf02169afb601ecdf2724cd", + "url": "https://api.github.com/repos/pestphp/pest/zipball/c6244a8712968dbac88eb998e7ff3b5caa556b0d", + "reference": "c6244a8712968dbac88eb998e7ff3b5caa556b0d", "shasum": "" }, "require": { - "brianium/paratest": "^7.3.1", - "nunomaduro/collision": "^7.11.0|^8.4.0", - "nunomaduro/termwind": "^1.16.0|^2.1.0", - "pestphp/pest-plugin": "^2.1.1", - "pestphp/pest-plugin-arch": "^2.7.0", - "php": "^8.1.0", - "phpunit/phpunit": "^10.5.36" + "brianium/paratest": "^7.8.3", + "nunomaduro/collision": "^8.8.0", + "nunomaduro/termwind": "^2.3.0", + "pestphp/pest-plugin": "^3.0.0", + "pestphp/pest-plugin-arch": "^3.1.0", + "pestphp/pest-plugin-mutate": "^3.0.5", + "php": "^8.2.0", + "phpunit/phpunit": "^11.5.15" }, "conflict": { "filp/whoops": "<2.16.0", - "phpunit/phpunit": ">10.5.36", - "sebastian/exporter": "<5.1.0", + "phpunit/phpunit": ">11.5.15", + "sebastian/exporter": "<6.0.0", "webmozart/assert": "<1.11.0" }, "require-dev": { - "pestphp/pest-dev-tools": "^2.17.0", - "pestphp/pest-plugin-type-coverage": "^2.8.7", - "symfony/process": "^6.4.0|^7.1.5" + "pestphp/pest-dev-tools": "^3.4.0", + "pestphp/pest-plugin-type-coverage": "^3.5.0", + "symfony/process": "^7.2.5" }, "bin": [ "bin/pest" @@ -6986,6 +7052,8 @@ "extra": { "pest": { "plugins": [ + "Pest\\Mutate\\Plugins\\Mutate", + "Pest\\Plugins\\Configuration", "Pest\\Plugins\\Bail", "Pest\\Plugins\\Cache", "Pest\\Plugins\\Coverage", @@ -7040,7 +7108,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.36.0" + "source": "https://github.com/pestphp/pest/tree/v3.8.2" }, "funding": [ { @@ -7052,34 +7120,34 @@ "type": "github" } ], - "time": "2024-10-15T15:30:56+00:00" + "time": "2025-04-17T10:53:02+00:00" }, { "name": "pestphp/pest-plugin", - "version": "v2.1.1", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin.git", - "reference": "e05d2859e08c2567ee38ce8b005d044e72648c0b" + "reference": "e79b26c65bc11c41093b10150c1341cc5cdbea83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/e05d2859e08c2567ee38ce8b005d044e72648c0b", - "reference": "e05d2859e08c2567ee38ce8b005d044e72648c0b", + "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/e79b26c65bc11c41093b10150c1341cc5cdbea83", + "reference": "e79b26c65bc11c41093b10150c1341cc5cdbea83", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", "composer-runtime-api": "^2.2.2", - "php": "^8.1" + "php": "^8.2" }, "conflict": { - "pestphp/pest": "<2.2.3" + "pestphp/pest": "<3.0.0" }, "require-dev": { - "composer/composer": "^2.5.8", - "pestphp/pest": "^2.16.0", - "pestphp/pest-dev-tools": "^2.16.0" + "composer/composer": "^2.7.9", + "pestphp/pest": "^3.0.0", + "pestphp/pest-dev-tools": "^3.0.0" }, "type": "composer-plugin", "extra": { @@ -7106,7 +7174,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin/tree/v2.1.1" + "source": "https://github.com/pestphp/pest-plugin/tree/v3.0.0" }, "funding": [ { @@ -7122,31 +7190,30 @@ "type": "patreon" } ], - "time": "2023-08-22T08:40:06+00:00" + "time": "2024-09-08T23:21:41+00:00" }, { "name": "pestphp/pest-plugin-arch", - "version": "v2.7.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-arch.git", - "reference": "d23b2d7498475354522c3818c42ef355dca3fcda" + "reference": "db7bd9cb1612b223e16618d85475c6f63b9c8daa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/d23b2d7498475354522c3818c42ef355dca3fcda", - "reference": "d23b2d7498475354522c3818c42ef355dca3fcda", + "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/db7bd9cb1612b223e16618d85475c6f63b9c8daa", + "reference": "db7bd9cb1612b223e16618d85475c6f63b9c8daa", "shasum": "" }, "require": { - "nunomaduro/collision": "^7.10.0|^8.1.0", - "pestphp/pest-plugin": "^2.1.1", - "php": "^8.1", + "pestphp/pest-plugin": "^3.0.0", + "php": "^8.2", "ta-tikoma/phpunit-architecture-test": "^0.8.4" }, "require-dev": { - "pestphp/pest": "^2.33.0", - "pestphp/pest-dev-tools": "^2.16.0" + "pestphp/pest": "^3.8.1", + "pestphp/pest-dev-tools": "^3.4.0" }, "type": "library", "extra": { @@ -7181,7 +7248,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-arch/tree/v2.7.0" + "source": "https://github.com/pestphp/pest-plugin-arch/tree/v3.1.1" }, "funding": [ { @@ -7193,73 +7260,139 @@ "type": "github" } ], - "time": "2024-01-26T09:46:42+00:00" + "time": "2025-04-16T22:59:48+00:00" }, { - "name": "pestphp/pest-plugin-laravel", - "version": "v2.4.0", + "name": "pestphp/pest-plugin-mutate", + "version": "v3.0.5", "source": { "type": "git", - "url": "https://github.com/pestphp/pest-plugin-laravel.git", - "reference": "53df51169a7f9595e06839cce638c73e59ace5e8" + "url": "https://github.com/pestphp/pest-plugin-mutate.git", + "reference": "e10dbdc98c9e2f3890095b4fe2144f63a5717e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/53df51169a7f9595e06839cce638c73e59ace5e8", - "reference": "53df51169a7f9595e06839cce638c73e59ace5e8", + "url": "https://api.github.com/repos/pestphp/pest-plugin-mutate/zipball/e10dbdc98c9e2f3890095b4fe2144f63a5717e08", + "reference": "e10dbdc98c9e2f3890095b4fe2144f63a5717e08", "shasum": "" }, "require": { - "laravel/framework": "^10.48.9|^11.5.0", - "pestphp/pest": "^2.34.7", - "php": "^8.1.0" + "nikic/php-parser": "^5.2.0", + "pestphp/pest-plugin": "^3.0.0", + "php": "^8.2", + "psr/simple-cache": "^3.0.0" }, "require-dev": { - "laravel/dusk": "^7.13.0", - "orchestra/testbench": "^8.22.3|^9.0.4", - "pestphp/pest-dev-tools": "^2.16.0" + "pestphp/pest": "^3.0.8", + "pestphp/pest-dev-tools": "^3.0.0", + "pestphp/pest-plugin-type-coverage": "^3.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pest\\Mutate\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sandro Gehri", + "email": "sandrogehri@gmail.com" + } + ], + "description": "Mutates your code to find untested cases", + "keywords": [ + "framework", + "mutate", + "mutation", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-mutate/tree/v3.0.5" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/gehrisandro", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + } + ], + "time": "2024-09-22T07:54:40+00:00" + }, + { + "name": "pestphp/pest-plugin-type-coverage", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-type-coverage.git", + "reference": "78d65c9c4f0a77e0aab5c0d70991bda20e7821d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-type-coverage/zipball/78d65c9c4f0a77e0aab5c0d70991bda20e7821d9", + "reference": "78d65c9c4f0a77e0aab5c0d70991bda20e7821d9", + "shasum": "" + }, + "require": { + "pestphp/pest-plugin": "^3.0.0", + "php": "^8.2", + "phpstan/phpstan": "^1.12.21|^2.1.12", + "tomasvotruba/type-coverage": "^1.0.0|^2.0.2" + }, + "require-dev": { + "pestphp/pest": "^3.8.2", + "pestphp/pest-dev-tools": "^3.4.0" }, "type": "library", "extra": { "pest": { "plugins": [ - "Pest\\Laravel\\Plugin" - ] - }, - "laravel": { - "providers": [ - "Pest\\Laravel\\PestServiceProvider" + "Pest\\TypeCoverage\\Plugin" ] } }, "autoload": { - "files": [ - "src/Autoload.php" - ], "psr-4": { - "Pest\\Laravel\\": "src/" + "Pest\\TypeCoverage\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "The Pest Laravel Plugin", + "description": "The Type Coverage plugin for Pest PHP.", "keywords": [ + "coverage", "framework", - "laravel", "pest", "php", + "plugin", "test", "testing", + "type-coverage", "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-laravel/tree/v2.4.0" + "source": "https://github.com/pestphp/pest-plugin-type-coverage/tree/v3.5.1" }, "funding": [ { - "url": "https://www.paypal.com/paypalme/enunomaduro", + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", "type": "custom" }, { @@ -7267,7 +7400,7 @@ "type": "github" } ], - "time": "2024-04-27T10:41:54+00:00" + "time": "2025-04-20T21:49:49+00:00" }, { "name": "phar-io/manifest", @@ -7609,37 +7742,95 @@ }, "time": "2025-02-19T13:28:12+00:00" }, + { + "name": "phpstan/phpstan", + "version": "2.1.17", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2025-05-21T20:55:28+00:00" + }, { "name": "phpunit/php-code-coverage", - "version": "10.1.16", + "version": "11.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77" + "reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/14d63fbcca18457e49c6f8bebaa91a87e8e188d7", + "reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-text-template": "^3.0.1", - "sebastian/code-unit-reverse-lookup": "^3.0.0", - "sebastian/complexity": "^3.2.0", - "sebastian/environment": "^6.1.0", - "sebastian/lines-of-code": "^2.0.2", - "sebastian/version": "^4.0.1", + "nikic/php-parser": "^5.4.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^11.5.2" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -7648,7 +7839,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -7677,7 +7868,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.9" }, "funding": [ { @@ -7685,32 +7876,32 @@ "type": "github" } ], - "time": "2024-08-22T04:31:57+00:00" + "time": "2025-02-25T13:26:39+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.1.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -7738,7 +7929,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -7746,28 +7937,28 @@ "type": "github" } ], - "time": "2023-08-31T06:24:48+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "4.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -7775,7 +7966,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -7801,7 +7992,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -7809,32 +8001,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:09+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "3.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7861,7 +8053,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -7869,32 +8061,32 @@ "type": "github" } ], - "time": "2023-08-31T14:07:24+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "6.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -7920,7 +8112,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -7928,20 +8121,20 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "10.5.36", + "version": "11.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870" + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870", - "reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", "shasum": "" }, "require": { @@ -7951,26 +8144,26 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.13.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-invoker": "^4.0.0", - "phpunit/php-text-template": "^3.0.1", - "phpunit/php-timer": "^6.0.0", - "sebastian/cli-parser": "^2.0.1", - "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.2", - "sebastian/diff": "^5.1.1", - "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.2", - "sebastian/global-state": "^6.0.2", - "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.0", - "sebastian/type": "^4.0.0", - "sebastian/version": "^4.0.1" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.9", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.2", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -7981,7 +8174,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.5-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -8013,7 +8206,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.36" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.15" }, "funding": [ { @@ -8029,32 +8222,91 @@ "type": "tidelift" } ], - "time": "2024-10-08T15:36:51+00:00" + "time": "2025-03-23T16:02:11+00:00" + }, + { + "name": "rector/rector", + "version": "2.0.17", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "caa4ffda1d48bde44434e6ba95d132ec32e7fd40" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/caa4ffda1d48bde44434e6ba95d132ec32e7fd40", + "reference": "caa4ffda1d48bde44434e6ba95d132ec32e7fd40", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "phpstan/phpstan": "^2.1.17" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/2.0.17" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2025-05-30T10:59:08+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -8078,7 +8330,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -8086,32 +8338,32 @@ "type": "github" } ], - "time": "2024-03-02T07:12:49+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "2.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -8134,7 +8386,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -8142,32 +8395,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:43+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -8189,7 +8442,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -8197,36 +8451,39 @@ "type": "github" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "5.0.3", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/24b8fbc2c8e201bb1308e7b05148d6ab393b6959", + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -8266,7 +8523,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.1" }, "funding": [ { @@ -8274,33 +8531,33 @@ "type": "github" } ], - "time": "2024-10-18T14:56:07+00:00" + "time": "2025-03-07T06:57:01+00:00" }, { "name": "sebastian/complexity", - "version": "3.2.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68ff824baeae169ec9f2137158ee529584553799" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", - "reference": "68ff824baeae169ec9f2137158ee529584553799", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -8324,7 +8581,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -8332,33 +8589,33 @@ "type": "github" } ], - "time": "2023-12-21T08:37:17+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "5.1.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0", - "symfony/process": "^6.4" + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8391,7 +8648,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -8399,27 +8656,27 @@ "type": "github" } ], - "time": "2024-03-02T07:15:17+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "6.1.0", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" @@ -8427,7 +8684,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -8455,42 +8712,54 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2024-03-23T08:47:14+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", - "version": "5.1.2", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -8533,7 +8802,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -8541,35 +8810,35 @@ "type": "github" } ], - "time": "2024-03-02T07:17:12+00:00" + "time": "2024-12-05T09:17:50+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.2", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -8595,7 +8864,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -8603,33 +8872,33 @@ "type": "github" } ], - "time": "2024-03-02T07:19:19+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.2", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -8653,7 +8922,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -8661,34 +8930,34 @@ "type": "github" } ], - "time": "2023-12-21T08:38:20+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "5.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8710,7 +8979,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -8718,32 +8988,32 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "3.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -8765,7 +9035,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -8773,32 +9044,32 @@ "type": "github" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "5.0.0", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8828,7 +9099,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -8836,32 +9108,32 @@ "type": "github" } ], - "time": "2023-02-03T07:05:40+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "4.0.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -8884,7 +9156,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.2" }, "funding": [ { @@ -8892,29 +9165,29 @@ "type": "github" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2025-03-18T13:35:50+00:00" }, { "name": "sebastian/version", - "version": "4.0.1", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -8937,7 +9210,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -8945,20 +9219,72 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" }, { "name": "symfony/yaml", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23" + "reference": "cea40a48279d58dc3efee8112634cb90141156c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0feafffb843860624ddfd13478f481f4c3cd8b23", - "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23", + "url": "https://api.github.com/repos/symfony/yaml/zipball/cea40a48279d58dc3efee8112634cb90141156c2", + "reference": "cea40a48279d58dc3efee8112634cb90141156c2", "shasum": "" }, "require": { @@ -9001,7 +9327,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.2.6" + "source": "https://github.com/symfony/yaml/tree/v7.3.0" }, "funding": [ { @@ -9017,7 +9343,7 @@ "type": "tidelift" } ], - "time": "2025-04-04T10:10:11+00:00" + "time": "2025-04-04T10:10:33+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", @@ -9127,6 +9453,63 @@ } ], "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "tomasvotruba/type-coverage", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/TomasVotruba/type-coverage.git", + "reference": "d033429580f2c18bda538fa44f2939236a990e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/d033429580f2c18bda538fa44f2939236a990e0c", + "reference": "d033429580f2c18bda538fa44f2939236a990e0c", + "shasum": "" + }, + "require": { + "nette/utils": "^3.2 || ^4.0", + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "config/extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "TomasVotruba\\TypeCoverage\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Measure type coverage of your project", + "keywords": [ + "phpstan-extension", + "static analysis" + ], + "support": { + "issues": "https://github.com/TomasVotruba/type-coverage/issues", + "source": "https://github.com/TomasVotruba/type-coverage/tree/2.0.2" + }, + "funding": [ + { + "url": "https://www.paypal.me/rectorphp", + "type": "custom" + }, + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2025-01-07T00:10:26+00:00" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index 706439d..c96c38e 100644 --- a/config/app.php +++ b/config/app.php @@ -103,7 +103,7 @@ 'previous_keys' => [ ...array_filter( - explode(',', env('APP_PREVIOUS_KEYS', '')) + explode(',', (string) env('APP_PREVIOUS_KEYS', '')) ), ], diff --git a/config/auth.php b/config/auth.php index 7a1baaf..2ce066d 100644 --- a/config/auth.php +++ b/config/auth.php @@ -64,7 +64,7 @@ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => env('AUTH_MODEL', \App\Models\User::class), + 'model' => env('AUTH_MODEL', App\Models\User::class), ], // 'users' => [ diff --git a/config/cache.php b/config/cache.php index d794318..9f39702 100644 --- a/config/cache.php +++ b/config/cache.php @@ -105,6 +105,6 @@ | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/config/database.php b/config/database.php index 450151c..dcab623 100644 --- a/config/database.php +++ b/config/database.php @@ -60,7 +60,7 @@ 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ - \PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ], @@ -80,7 +80,7 @@ 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ - \PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ], @@ -149,7 +149,7 @@ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), ], 'default' => [ diff --git a/config/filesystems.php b/config/filesystems.php index d4be6ce..8f05061 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -43,7 +43,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, 'report' => false, diff --git a/config/logging.php b/config/logging.php index 9ee0cf9..93c8e7b 100644 --- a/config/logging.php +++ b/config/logging.php @@ -56,7 +56,7 @@ 'stack' => [ 'driver' => 'stack', - 'channels' => explode(',', env('LOG_STACK', 'single')), + 'channels' => explode(',', (string) env('LOG_STACK', 'single')), 'ignore_exceptions' => false, ], @@ -91,7 +91,7 @@ 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), ], 'processors' => [PsrLogMessageProcessor::class], ], diff --git a/config/mail.php b/config/mail.php index 9e54733..73a7841 100644 --- a/config/mail.php +++ b/config/mail.php @@ -48,7 +48,7 @@ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), + 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)), ], 'ses' => [ diff --git a/config/session.php b/config/session.php index 3568158..e3cddec 100644 --- a/config/session.php +++ b/config/session.php @@ -131,7 +131,7 @@ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* diff --git a/database/factories/RequestModelFactory.php b/database/factories/RequestModelFactory.php index 291845b..04e3b52 100644 --- a/database/factories/RequestModelFactory.php +++ b/database/factories/RequestModelFactory.php @@ -11,7 +11,7 @@ /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Model> */ -class RequestModelFactory extends Factory +final class RequestModelFactory extends Factory { /** * Define the model's default state. @@ -45,7 +45,7 @@ public function definition(): array public function existTypeRequest(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn (array $attributes): array => [ 'type' => fake()->randomElement([ RequestModel::TYPE_EXIST_VOTER, RequestModel::TYPE_EXIST_CANDIDATE, @@ -65,7 +65,7 @@ public function existTypeRequest(): static public function approved(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn (array $attributes): array => [ 'status' => RequestModel::STATUS_APPROVED, 'last_updated_by' => User::where('is_admin', true)->get()->random()->id, ]); @@ -73,7 +73,7 @@ public function approved(): static public function rejected(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn (array $attributes): array => [ 'status' => RequestModel::STATUS_REJECTED, 'comment' => fake()->sentence(), 'last_updated_by' => User::where('is_admin', true)->get()->random()->id, diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index d332a76..6885932 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -11,12 +11,12 @@ /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> */ -class UserFactory extends Factory +final class UserFactory extends Factory { /** * The current password being used by the factory. */ - protected static ?string $password; + private static ?string $password = null; /** * Define the model's default state. @@ -29,7 +29,7 @@ public function definition(): array 'name' => fake()->name(), 'email' => fake()->unique()->safeEmail(), 'email_verified_at' => now(), - 'password' => static::$password ??= Hash::make('password'), + 'password' => self::$password ??= Hash::make('password'), 'remember_token' => Str::random(10), 'is_admin' => false, 'profile_image_path' => fake()->imageUrl(640, 480, 'people', true), @@ -41,14 +41,14 @@ public function definition(): array */ public function unverified(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn (array $attributes): array => [ 'email_verified_at' => null, ]); } public function makeAdmin(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn (array $attributes): array => [ 'is_admin' => true, ]); } diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 38f2b04..5e7b2a4 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('users', function (Blueprint $table) { + Schema::create('users', function (Blueprint $table): void { $table->id(); $table->string('name'); $table->string('email')->unique(); @@ -25,13 +25,13 @@ public function up(): void $table->timestamps(); }); - Schema::create('password_reset_tokens', function (Blueprint $table) { + Schema::create('password_reset_tokens', function (Blueprint $table): void { $table->string('email')->primary(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); - Schema::create('sessions', function (Blueprint $table) { + Schema::create('sessions', function (Blueprint $table): void { $table->string('id')->primary(); $table->foreignId('user_id')->nullable()->index(); $table->string('ip_address', 45)->nullable(); diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php index 09b92f9..0f07ecf 100644 --- a/database/migrations/0001_01_01_000001_create_cache_table.php +++ b/database/migrations/0001_01_01_000001_create_cache_table.php @@ -13,13 +13,13 @@ */ public function up(): void { - Schema::create('cache', function (Blueprint $table) { + Schema::create('cache', function (Blueprint $table): void { $table->string('key')->primary(); $table->mediumText('value'); $table->integer('expiration'); }); - Schema::create('cache_locks', function (Blueprint $table) { + Schema::create('cache_locks', function (Blueprint $table): void { $table->string('key')->primary(); $table->string('owner'); $table->integer('expiration'); diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php index d62dda6..64087f4 100644 --- a/database/migrations/0001_01_01_000002_create_jobs_table.php +++ b/database/migrations/0001_01_01_000002_create_jobs_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('jobs', function (Blueprint $table) { + Schema::create('jobs', function (Blueprint $table): void { $table->id(); $table->string('queue')->index(); $table->longText('payload'); @@ -23,7 +23,7 @@ public function up(): void $table->unsignedInteger('created_at'); }); - Schema::create('job_batches', function (Blueprint $table) { + Schema::create('job_batches', function (Blueprint $table): void { $table->string('id')->primary(); $table->string('name'); $table->integer('total_jobs'); @@ -36,7 +36,7 @@ public function up(): void $table->integer('finished_at')->nullable(); }); - Schema::create('failed_jobs', function (Blueprint $table) { + Schema::create('failed_jobs', function (Blueprint $table): void { $table->id(); $table->string('uuid')->unique(); $table->text('connection'); diff --git a/database/migrations/2023_10_01_000000_create_countries_table.php b/database/migrations/2023_10_01_000000_create_countries_table.php index 6cc97dd..fd831b7 100644 --- a/database/migrations/2023_10_01_000000_create_countries_table.php +++ b/database/migrations/2023_10_01_000000_create_countries_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('countries', function (Blueprint $table) { + Schema::create('countries', function (Blueprint $table): void { $table->id(); $table->string('name'); $table->string('iso2', 2)->index(); diff --git a/database/migrations/2023_10_01_000001_create_states_table.php b/database/migrations/2023_10_01_000001_create_states_table.php index 125a309..d1dc7ef 100644 --- a/database/migrations/2023_10_01_000001_create_states_table.php +++ b/database/migrations/2023_10_01_000001_create_states_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('states', function (Blueprint $table) { + Schema::create('states', function (Blueprint $table): void { $table->id(); $table->string('name'); $table->string('code'); diff --git a/database/migrations/2025_02_02_162834_create_voters_table.php b/database/migrations/2025_02_02_162834_create_voters_table.php index 38f82c4..9d9d8f5 100644 --- a/database/migrations/2025_02_02_162834_create_voters_table.php +++ b/database/migrations/2025_02_02_162834_create_voters_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('voters', function (Blueprint $table) { + Schema::create('voters', function (Blueprint $table): void { $table->id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('voter_number')->unique(); diff --git a/database/migrations/2025_02_02_162941_create_elections_table.php b/database/migrations/2025_02_02_162941_create_elections_table.php index 1839302..a00791b 100644 --- a/database/migrations/2025_02_02_162941_create_elections_table.php +++ b/database/migrations/2025_02_02_162941_create_elections_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('elections', function (Blueprint $table) { + Schema::create('elections', function (Blueprint $table): void { $table->id(); $table->string('name'); $table->text('description')->nullable(); diff --git a/database/migrations/2025_02_02_163049_create_candidates_table.php b/database/migrations/2025_02_02_163049_create_candidates_table.php index 540a8bf..50e9279 100644 --- a/database/migrations/2025_02_02_163049_create_candidates_table.php +++ b/database/migrations/2025_02_02_163049_create_candidates_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('candidates', function (Blueprint $table) { + Schema::create('candidates', function (Blueprint $table): void { $table->id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('name'); diff --git a/database/migrations/2025_02_02_163139_create_requests_table.php b/database/migrations/2025_02_02_163139_create_requests_table.php index 310812d..10e351c 100644 --- a/database/migrations/2025_02_02_163139_create_requests_table.php +++ b/database/migrations/2025_02_02_163139_create_requests_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('requests', function (Blueprint $table) { + Schema::create('requests', function (Blueprint $table): void { $table->id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('type'); diff --git a/database/migrations/2025_02_02_163152_create_votes_table.php b/database/migrations/2025_02_02_163152_create_votes_table.php index 6658e46..2e5aba7 100644 --- a/database/migrations/2025_02_02_163152_create_votes_table.php +++ b/database/migrations/2025_02_02_163152_create_votes_table.php @@ -13,7 +13,7 @@ */ public function up(): void { - Schema::create('votes', function (Blueprint $table) { + Schema::create('votes', function (Blueprint $table): void { $table->id(); $table->foreignId('election_id'); $table->foreignId('candidate_id'); diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 392c776..b275081 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -8,7 +8,7 @@ // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; -class DatabaseSeeder extends Seeder +final class DatabaseSeeder extends Seeder { /** * Seed the application's database. diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..1117a07 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,10 @@ +includes: + - vendor/larastan/larastan/extension.neon + - vendor/nesbot/carbon/extension.neon + +parameters: + + paths: + - app/ + + level: 5 diff --git a/pint.json b/pint.json index 091dbec..e9d4133 100644 --- a/pint.json +++ b/pint.json @@ -1,33 +1,61 @@ { "preset": "laravel", "rules": { - "simplified_null_return": true, - "new_with_parentheses": { - "anonymous_class": true, - "named_class": true - }, - "combine_consecutive_issets": true, - "combine_consecutive_unsets": true, - "concat_space": { - "spacing": "one" - }, + "array_push": true, + "backtick_to_shell_exec": true, + "date_time_immutable": true, "declare_strict_types": true, - "fully_qualified_strict_types":{ - "leading_backslash_in_global_namespace": true + "lowercase_keywords": true, + "lowercase_static_reference": true, + "final_class": true, + "final_internal_class": true, + "final_public_method_for_abstract_class": true, + "fully_qualified_strict_types": true, + "global_namespace_import": { + "import_classes": true, + "import_constants": true, + "import_functions": true + }, + "mb_str_functions": true, + "modernize_types_casting": true, + "new_with_parentheses": false, + "no_superfluous_elseif": true, + "no_useless_else": true, + "no_multiple_statements_per_line": true, + "ordered_class_elements": { + "order": [ + "use_trait", + "case", + "constant", + "constant_public", + "constant_protected", + "constant_private", + "property_public", + "property_protected", + "property_private", + "construct", + "destruct", + "magic", + "phpunit", + "method_abstract", + "method_public_static", + "method_public", + "method_protected_static", + "method_protected", + "method_private_static", + "method_private" + ], + "sort_algorithm": "none" }, - "assign_null_coalescing_to_coalesce_equal": true - }, - "exclude": [ - "public", - "node_modules", - "vendor", - "storage", - "bootstrap/cache" - ], - "notPath": [ - "*.blade.php", - "*.js", - "*.css", - "*.jsx" - ] + "ordered_interfaces": true, + "ordered_traits": true, + "protected_to_private": true, + "self_accessor": true, + "self_static_accessor": true, + "strict_comparison": true, + "visibility_required": true, + "increment_style": { + "style": "pre" + } + } } diff --git a/public/index.php b/public/index.php index 947d989..d55a3b2 100644 --- a/public/index.php +++ b/public/index.php @@ -1,5 +1,7 @@ withPaths([ + __DIR__.'/app', + __DIR__.'/bootstrap/app.php', + __DIR__.'/config', + __DIR__.'/public', + __DIR__.'/routes', + __DIR__.'/tests', + __DIR__.'/database', + ]) + ->withPreparedSets( + deadCode: true, + codeQuality: true, + codingStyle: true, + typeDeclarations: true, + privatization: true, + earlyReturn: true, + strictBooleans: true, + rectorPreset: true, + ) + ->withPhpSets(php82: true); diff --git a/routes/api.php b/routes/api.php index 6826969..125d246 100644 --- a/routes/api.php +++ b/routes/api.php @@ -5,7 +5,7 @@ use App\Http\Controllers\Api\LocationController; use Illuminate\Support\Facades\Route; -Route::middleware('cache.headers:public;max_age=86400;etag')->group(function () { +Route::middleware('cache.headers:public;max_age=86400;etag')->group(function (): void { Route::get('/countries', [LocationController::class, 'countries'])->name('countries'); Route::get('/countries/{country}/states', [LocationController::class, 'statesByCountry'])->name('states'); }); diff --git a/routes/auth.php b/routes/auth.php index d2fe44b..43e9c2d 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -13,7 +13,7 @@ use App\Http\Controllers\Auth\VerifyEmailController; use Illuminate\Support\Facades\Route; -Route::middleware('guest')->group(function () { +Route::middleware('guest')->group(function (): void { Route::get('register', [RegisteredUserController::class, 'create']) ->name('register'); @@ -37,7 +37,7 @@ ->name('password.store'); }); -Route::middleware('auth')->group(function () { +Route::middleware('auth')->group(function (): void { Route::get('verify-email', EmailVerificationPromptController::class) ->name('verification.notice'); diff --git a/routes/console.php b/routes/console.php index c428e20..05f18f2 100644 --- a/routes/console.php +++ b/routes/console.php @@ -5,6 +5,6 @@ use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; -Artisan::command('inspire', function () { +Artisan::command('inspire', function (): void { $this->comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); diff --git a/routes/web.php b/routes/web.php index e1ecea7..d4d52f5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,15 +11,13 @@ use Illuminate\Support\Facades\Route; use Inertia\Inertia; -Route::get('/', function () { - return Inertia::render('Welcome', [ - 'canLogin' => Route::has('login'), - 'canRegister' => Route::has('register'), - ]); -}); +Route::get('/', fn () => Inertia::render('Welcome', [ + 'canLogin' => Route::has('login'), + 'canRegister' => Route::has('register'), +])); -Route::middleware(['auth', 'verified'])->group(function () { - Route::get('/dashboard', \App\Http\Controllers\DashboardController::class)->name('dashboard'); +Route::middleware(['auth', 'verified'])->group(function (): void { + Route::get('/dashboard', App\Http\Controllers\DashboardController::class)->name('dashboard'); Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); @@ -40,10 +38,10 @@ Route::resource('elections/{election}/candidates', CandidateController::class)->only(['show', 'destroy']); // Vote routes - Route::get('elections/{election}/votes', [\App\Http\Controllers\VoteController::class, 'create']) + Route::get('elections/{election}/votes', [App\Http\Controllers\VoteController::class, 'create']) ->middleware('password.confirm')->name('votes.create'); - Route::post('elections/{election}/votes', [\App\Http\Controllers\VoteController::class, 'store']) + Route::post('elections/{election}/votes', [App\Http\Controllers\VoteController::class, 'store']) ->name('votes.store'); }); -require __DIR__ . '/auth.php'; +require __DIR__.'/auth.php'; diff --git a/tests/Feature/Auth/AuthenticationTest.php b/tests/Feature/Auth/AuthenticationTest.php index d4fdf7c..622edb9 100644 --- a/tests/Feature/Auth/AuthenticationTest.php +++ b/tests/Feature/Auth/AuthenticationTest.php @@ -7,13 +7,13 @@ uses(RefreshDatabase::class); -test('login screen can be rendered', function () { +test('login screen can be rendered', function (): void { $response = $this->get('/login'); $response->assertStatus(200); }); -test('users can authenticate using the login screen', function () { +test('users can authenticate using the login screen', function (): void { $user = User::factory()->create(); $response = $this->post('/login', [ @@ -25,7 +25,7 @@ $response->assertRedirect(route('dashboard', absolute: false)); }); -test('users can not authenticate with invalid password', function () { +test('users can not authenticate with invalid password', function (): void { $user = User::factory()->create(); $this->post('/login', [ @@ -36,7 +36,7 @@ $this->assertGuest(); }); -test('users can logout', function () { +test('users can logout', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user)->post('/logout'); diff --git a/tests/Feature/Auth/EmailVerificationTest.php b/tests/Feature/Auth/EmailVerificationTest.php index e252c0b..61be2d6 100644 --- a/tests/Feature/Auth/EmailVerificationTest.php +++ b/tests/Feature/Auth/EmailVerificationTest.php @@ -10,7 +10,7 @@ uses(RefreshDatabase::class); -test('email verification screen can be rendered', function () { +test('email verification screen can be rendered', function (): void { $user = User::factory()->unverified()->create(); $response = $this->actingAs($user)->get('/verify-email'); @@ -18,7 +18,7 @@ $response->assertStatus(200); }); -test('email can be verified', function () { +test('email can be verified', function (): void { $user = User::factory()->unverified()->create(); Event::fake(); @@ -26,17 +26,17 @@ $verificationUrl = URL::temporarySignedRoute( 'verification.verify', now()->addMinutes(60), - ['id' => $user->id, 'hash' => sha1($user->email)] + ['id' => $user->id, 'hash' => sha1((string) $user->email)] ); $response = $this->actingAs($user)->get($verificationUrl); Event::assertDispatched(Verified::class); $this->assertTrue($user->fresh()->hasVerifiedEmail()); - $response->assertRedirect(route('dashboard', absolute: false) . '?verified=1'); + $response->assertRedirect(route('dashboard', absolute: false).'?verified=1'); }); -test('email is not verified with invalid hash', function () { +test('email is not verified with invalid hash', function (): void { $user = User::factory()->unverified()->create(); $verificationUrl = URL::temporarySignedRoute( diff --git a/tests/Feature/Auth/PasswordConfirmationTest.php b/tests/Feature/Auth/PasswordConfirmationTest.php index dd76c9f..f8d5e88 100644 --- a/tests/Feature/Auth/PasswordConfirmationTest.php +++ b/tests/Feature/Auth/PasswordConfirmationTest.php @@ -7,7 +7,7 @@ uses(RefreshDatabase::class); -test('confirm password screen can be rendered', function () { +test('confirm password screen can be rendered', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user)->get('/confirm-password'); @@ -15,7 +15,7 @@ $response->assertStatus(200); }); -test('password can be confirmed', function () { +test('password can be confirmed', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user)->post('/confirm-password', [ @@ -26,7 +26,7 @@ $response->assertSessionHasNoErrors(); }); -test('password is not confirmed with invalid password', function () { +test('password is not confirmed with invalid password', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user)->post('/confirm-password', [ diff --git a/tests/Feature/Auth/PasswordResetTest.php b/tests/Feature/Auth/PasswordResetTest.php index 28582bc..b55a1b0 100644 --- a/tests/Feature/Auth/PasswordResetTest.php +++ b/tests/Feature/Auth/PasswordResetTest.php @@ -9,13 +9,13 @@ uses(RefreshDatabase::class); -test('reset password link screen can be rendered', function () { +test('reset password link screen can be rendered', function (): void { $response = $this->get('/forgot-password'); $response->assertStatus(200); }); -test('reset password link can be requested', function () { +test('reset password link can be requested', function (): void { Notification::fake(); $user = User::factory()->create(); @@ -25,15 +25,15 @@ Notification::assertSentTo($user, ResetPassword::class); }); -test('reset password screen can be rendered', function () { +test('reset password screen can be rendered', function (): void { Notification::fake(); $user = User::factory()->create(); $this->post('/forgot-password', ['email' => $user->email]); - Notification::assertSentTo($user, ResetPassword::class, function ($notification) { - $response = $this->get('/reset-password/' . $notification->token); + Notification::assertSentTo($user, ResetPassword::class, function ($notification): true { + $response = $this->get('/reset-password/'.$notification->token); $response->assertStatus(200); @@ -41,14 +41,14 @@ }); }); -test('password can be reset with valid token', function () { +test('password can be reset with valid token', function (): void { Notification::fake(); $user = User::factory()->create(); $this->post('/forgot-password', ['email' => $user->email]); - Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) { + Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user): true { $response = $this->post('/reset-password', [ 'token' => $notification->token, 'email' => $user->email, diff --git a/tests/Feature/Auth/PasswordUpdateTest.php b/tests/Feature/Auth/PasswordUpdateTest.php index 11091f1..efd5276 100644 --- a/tests/Feature/Auth/PasswordUpdateTest.php +++ b/tests/Feature/Auth/PasswordUpdateTest.php @@ -8,7 +8,7 @@ uses(RefreshDatabase::class); -test('password can be updated', function () { +test('password can be updated', function (): void { $user = User::factory()->create(); $response = $this @@ -27,7 +27,7 @@ $this->assertTrue(Hash::check('new-password', $user->refresh()->password)); }); -test('correct password must be provided to update password', function () { +test('correct password must be provided to update password', function (): void { $user = User::factory()->create(); $response = $this diff --git a/tests/Feature/Auth/RegistrationTest.php b/tests/Feature/Auth/RegistrationTest.php index 7da2251..3717a7b 100644 --- a/tests/Feature/Auth/RegistrationTest.php +++ b/tests/Feature/Auth/RegistrationTest.php @@ -6,13 +6,13 @@ uses(RefreshDatabase::class); -test('registration screen can be rendered', function () { +test('registration screen can be rendered', function (): void { $response = $this->get('/register'); $response->assertStatus(200); }); -test('new users can register', function () { +test('new users can register', function (): void { $response = $this->post('/register', [ 'name' => 'Test User', 'email' => 'test@example.com', diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 5c9c611..5db4db4 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -test('the application returns a successful response', function () { +test('the application returns a successful response', function (): void { $response = $this->get('/'); $response->assertStatus(200); }); diff --git a/tests/Feature/ProfileTest.php b/tests/Feature/ProfileTest.php index 9f19dbd..ae24650 100644 --- a/tests/Feature/ProfileTest.php +++ b/tests/Feature/ProfileTest.php @@ -7,7 +7,7 @@ uses(RefreshDatabase::class); -test('profile page is displayed', function () { +test('profile page is displayed', function (): void { $user = User::factory()->create(); $response = $this @@ -17,7 +17,7 @@ $response->assertOk(); }); -test('profile information can be updated', function () { +test('profile information can be updated', function (): void { $user = User::factory()->create(); $response = $this @@ -38,7 +38,7 @@ $this->assertNull($user->email_verified_at); }); -test('email verification status is unchanged when the email address is unchanged', function () { +test('email verification status is unchanged when the email address is unchanged', function (): void { $user = User::factory()->create(); $response = $this @@ -55,7 +55,7 @@ $this->assertNotNull($user->refresh()->email_verified_at); }); -test('user can delete their account', function () { +test('user can delete their account', function (): void { $user = User::factory()->create(); $response = $this @@ -72,7 +72,7 @@ $this->assertNull($user->fresh()); }); -test('correct password must be provided to delete account', function () { +test('correct password must be provided to delete account', function (): void { $user = User::factory()->create(); $response = $this diff --git a/tests/Pest.php b/tests/Pest.php index 28bfa52..caedfa8 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -14,7 +14,7 @@ */ uses( - \Tests\TestCase::class, + Tests\TestCase::class, )->in('Feature', 'Unit'); /* @@ -28,9 +28,7 @@ | */ -expect()->extend('toBeOne', function () { - return $this->toBe(1); -}); +expect()->extend('toBeOne', fn () => $this->toBe(1)); /* |-------------------------------------------------------------------------- @@ -43,7 +41,7 @@ | */ -function something() +function something(): void { // .. } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 247f6fb..d7755fa 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -2,6 +2,6 @@ declare(strict_types=1); -test('true is true', function () { +test('true is true', function (): void { expect(true)->toBeTrue(); });