Skip to content

feat(phase-3): upgrade to Laravel 10 - #3872

Open
Vipul-Ydv wants to merge 7 commits into
upgrade/laravel-13from
feature/phase-3-laravel-10
Open

feat(phase-3): upgrade to Laravel 10#3872
Vipul-Ydv wants to merge 7 commits into
upgrade/laravel-13from
feature/phase-3-laravel-10

Conversation

@Vipul-Ydv

Copy link
Copy Markdown
Contributor

Summary

  • Bumps laravel/framework to ^10.0 and all required companion packages
  • Adds App\Database\DBAL\TimestampType to handle MariaDb1043Platform which doctrine/dbal 3.10+ exposes for MariaDB 10.4.x but is absent from Laravel's built-in TimestampType match list
  • Registers the custom type override in AppServiceProvider::register() so Doctrine DBAL column change migrations work on MariaDB 10.4.x dev environments

Packages updated

Package Before After
laravel/framework ^9.0 ^10.0
nwidart/laravel-modules ^9.0 ^10.0
revolution/laravel-google-sheets ^5.6 ^6.0
phpunit/phpunit ^9.0 ^10.1
nunomaduro/collision ^6.0 ^7.0
spatie/laravel-ignition ^1.0 ^2.0

Test plan

  • 136/136 PHPUnit tests pass locally (PHP 8.2, MariaDB 10.4.32)
  • php artisan --version reports Laravel Framework 10.50.2
  • No regressions from Phase 2 baseline (136 tests, same count)

🤖 Generated with Claude Code

- Bump laravel/framework to ^10.0, nwidart/laravel-modules to ^10.0
- Bump revolution/laravel-google-sheets to ^6.0 (required for L10)
- Bump phpunit/phpunit to ^10.1, nunomaduro/collision to ^7.0
- Bump spatie/laravel-ignition to ^2.0
- Add App\Database\DBAL\TimestampType to handle MariaDb1043Platform
  which is missing from Illuminate's TimestampType in doctrine/dbal 3.10+
- Register the custom type override in AppServiceProvider::register()

136 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 018b2a8d-98e6-4fd8-8399-32b52efd9ece

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/phase-3-laravel-10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cypress

cypress Bot commented Jul 10, 2026

Copy link
Copy Markdown

Employee portal    Run #9117

Run Properties:  status check passed Passed #9117  •  git commit 375d93f572 ℹ️: Merge 478c2cd950e32b7ba8bb61e2b1821fda9154a5b8 into 0815b72dbe8074a7c169c58874a8...
Project Employee portal
Branch Review refs/pull/3872/merge
Run status status check passed Passed #9117
Run duration 00m 32s
Commit git commit 375d93f572 ℹ️: Merge 478c2cd950e32b7ba8bb61e2b1821fda9154a5b8 into 0815b72dbe8074a7c169c58874a8...
Committer Vipul Yadav
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

- Remove MariaDb110700Platform from TimestampType: phpstan flags the
  instanceof as always-false because that class is not present in all
  doctrine/dbal 3.x installs used in CI (MariaDb1043Platform covers
  the local MariaDB 10.4.x dev environment)
- Regenerate phpstan baseline: 126 errors (107 from phase-2 + 19 new
  Carbon date-method-on-string errors newly surfaced by larastan 2.x
  under Laravel 10)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Coverage report for commit: 478c2cd
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 70.9%
  10% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.2%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.3%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  50% │ ██░░░░░░░░░░░░░░░░░░░░░ │  5.2%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.2%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.2%
  80% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  90% │ ██░░░░░░░░░░░░░░░░░░░░░ │  3.3%
 100% │ █████░░░░░░░░░░░░░░░░░░ │ 14.2%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 11.35% | Methods: 11.56%
FilesLinesMethodsBranches
Modules/HR/Console
   JobExpiredEmailToHr.php--100.00%
   QuarterlyReviewSystemForEmployee.php--100.00%
Modules/HR/Console/Recruitment
   ApplicationNoShow.php--100.00%
   DailyMessage.php--100.00%
   MappingOfJobsAndHrRounds.php--100.00%
   MarkApplicationForFollowUp.php--100.00%
   ResetIsLatestApplicationRound.php45.45%66.67%100.00%
   SendFollowUpThresholdMail.php--100.00%
   SendInterviewReminders.php--100.00%
Modules/HR/Contracts
   ApplicationServiceContract.php100.00%100.00%100.00%
   EvaluationServiceContract.php100.00%100.00%100.00%
   UniversityServiceContract.php100.00%100.00%100.00%
Modules/HR/Database/Factories
   HrApplicantsFactory.php100.00%100.00%100.00%
   HrApplicationEvaluationFactory.php--100.00%
   HrApplicationMetaFactory.php--100.00%
   HrApplicationRejectionFactory.php--100.00%
   HrApplicationRoundReviewFactory.php--100.00%
   HrApplicationSegmentFactory.php--100.00%
   HrApplicationsFactory.php--100.00%
   HrEmployeeFactory.php--100.00%
   HrFollowUpFactory.php--100.00%
   HrJobsFactory.php100.00%100.00%100.00%
   HrResourcesCategoriesFactory.php--100.00%
   HrResourcesFactory.php--100.00%
   HrUniversitiesContactsFactory.php100.00%100.00%100.00%
   HrUniversitiesFactory.php100.00%100.00%100.00%
   HrUniversityAliasesFactory.php100.00%100.00%100.00%
Modules/HR/Database/Migrations
   2020_07_15_110611_create_hr_application_segments_table.php91.67%50.00%100.00%
   2020_07_15_142215_rename_next_interview_comments_column.php50.00%50.00%100.00%
   2020_07_25_202622_update_segment_table_with_segment_parent.php61.54%50.00%100.00%
   2020_09_04_234639_update_application_round_with_calendar_meeting_id.php66.67%50.00%100.00%
   2020_09_06_234443_update_hr_application_round_table_with_is_latest.php50.00%50.00%100.00%
   2020_09_07_171154_create_hr_follow_ups_table.php92.31%50.00%100.00%
   2020_09_08_073438_create_hr_universities_table.php87.50%50.00%100.00%
   2020_09_08_073538_create_hr_universities_contacts_table.php90.00%50.00%100.00%
   2020_09_08_073651_add_hr_university_id_to_hr_applicants_table.php42.86%50.00%100.00%
   2020_11_24_141131_create_hr_university_aliases_table.php85.71%50.00%100.00%
   2020_12_31_112259_alter_posted_by_in_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_113149_add_status_to_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_123714_add_soft_deletes_to_hr_jobs_table.php50.00%50.00%100.00%
   2022_03_08_064931_update_hr_jobs_table.php50.00%50.00%100.00%
   2022_06_15_141424_add_parameter_slug_column_in_evaluation_parameter_table.php50.00%50.00%100.00%
   2022_07_04_165601_add_verification_status_to_application.php50.00%50.00%100.00%
   2022_07_07_075310_create_hr_job_domains_table.php85.71%50.00%100.00%
   2022_07_15_115016_create_hr_channels_table.php85.71%50.00%100.00%
   2022_07_15_115134_update_hr_applications_with_hr_channels_table.php50.00%50.00%100.00%
   2022_09_01_230847_create_job_requisition_table.php57.14%50.00%100.00%
   2022_09_06_232653_add_status_to_job_requisition.php50.00%50.00%100.00%
   2022_09_12_140344_create_hr_applicant_meta_table.php76.92%50.00%100.00%
   2022_09_19_160414_create_hr_job_designation_table.php85.71%50.00%100.00%
   2022_09_21_145858_create_batch_members_table.php57.14%50.00%100.00%
   2022_09_21_151304_create_batches_table.php83.33%50.00%100.00%
   2022_09_26_134702_alter_column_for_application_meta_value.php50.00%50.00%100.00%
   2024_03_20_161855_add_commencement_date_column_to_employee_salary_table.php50.00%50.00%100.00%
Modules/HR/Database/Seeders
   AddPreparatoryRoundsSeeder.php--100.00%
   ApplicationEvaluationTableSeeder.php--100.00%
   DomainTableSeeder.php--100.00%
   HRDatabaseSeeder.php--100.00%
   HRJobsSeederTableSeeder.php--100.00%
   HRPermissionsTableSeeder.php--100.00%
   HRRoundsTableSeeder.php--100.00%
   HrApplicantsTableSeeder.php--100.00%
   HrApplicationEvaluationSegmentTableSeeder.php--100.00%
   HrApplicationMetaTableSeeder.php--100.00%
   HrApplicationRejectionReasonTableSeeder.php--100.00%
   HrApplicationRoundReviewTableSeeder.php--100.00%
   HrApplicationRoundTableSeeder.php--100.00%
   HrApplicationSegmentTableSeeder.php--100.00%
   HrApplicationsTableSeeder.php--100.00%
   HrChannelsTableSeeder.php--100.00%
   HrDesignationTableSeeder.php100.00%100.00%100.00%
   HrDomainTableSeeder.php100.00%100.00%100.00%
   HrFollowUpTableSeeder.php--100.00%
   HrResourcesCategoriesTableSeeder.php--100.00%
   HrResourcesTableSeeder.php--100.00%
   HrUniversitiesContactsTableSeeder.php--100.00%
   HrUniversitiesTableSeeder.php--100.00%
   HrUniversityAliasesTableSeeder.php--100.00%
   ResumeScreeningEvaluationSeeder.php--100.00%
   SettingsTableSeeder.php--100.00%
   TagTableSeeder.php--100.00%
Modules/HR/Emails
   AppointmentSlotSelectionMail.php--100.00%
   SendHiringMail.php--100.00%
   SendJobExpiredMail.php--100.00%
   SendPayrollListMail.php--100.00%
   SendThreshholdFollowUp.php--100.00%
Modules/HR/Emails/Recruitment/Applicant
   ApplicantCreateAutoResponder.php--100.00%
   NoShow.php--100.00%
   OnHold.php--100.00%
   RoundReviewed.php--100.00%
   ScheduledInterviewReminder.php--100.00%
Modules/HR/Emails/Recruitment/Application
   ApplicationHandover.php--100.00%
   CustomApplicationMail.php--100.00%
   JobChanged.php--100.00%
   RoundNotConducted.php--100.00%
Modules/HR/Emails/Recruitment
   InterviewerScheduledRoundsReminder.php--100.00%
   SendForApproval.php--100.00%
   SendOfferLetter.php--100.00%
Modules/HR/Entities
   Applicant.php1.69%10.00%100.00%
   ApplicantMeta.php--100.00%
   Application.php13.52%10.42%100.00%
   ApplicationEvaluationSegment.php--100.00%
   ApplicationMeta.php--100.00%
   ApplicationRound.php0.36%4.00%100.00%
   ApplicationRoundReview.php--100.00%
   Assessment.php--100.00%
   Employee.php1.39%4.35%100.00%
   FollowUp.php--100.00%
   HRJobsRounds.php100.00%100.00%100.00%
   HRRejectionReason.php--100.00%
   HRRequisitionHiredBatch.php--100.00%
   HRRequisitionHiredBatchMembers.php--100.00%
   HrChannel.php100.00%100.00%100.00%
   HrJobDesignation.php--100.00%
   HrJobDomain.php--100.00%
   IndividualAssessment.php--100.00%
   Job.php50.00%38.89%100.00%
   JobRequisition.php--100.00%
   Round.php--100.00%
   University.php33.33%33.33%100.00%
   UniversityAlias.php100.00%100.00%100.00%
   UniversityContact.php100.00%100.00%100.00%
Modules/HR/Entities/Evaluation
   ApplicationEvaluation.php--100.00%
   Parameter.php--100.00%
   ParameterOption.php--100.00%
   Segment.php--100.00%
Modules/HR/Events
   ApplicationMovedToNewRound.php--100.00%
   CustomMailTriggeredForApplication.php--100.00%
   FollowUpEvent.php--100.00%
   InterviewCommunicationEmailSent.php--100.00%
Modules/HR/Events/Recruitment
   ApplicantEmailVerified.php--100.00%
   ApplicationCreated.php--100.00%
   JobUpdated.php66.67%50.00%100.00%
Modules/HR/Exports
   ContractorFeeExport.php--100.00%
   EmployeePayrollExport.php--100.00%
Modules/HR/Helpers
   TemplateHelper.php--100.00%
Modules/HR/Http/Controllers
   EmployeeController.php--100.00%
   EvaluationController.php--100.00%
   HiringController.php--100.00%
   HrChannelController.php--100.00%
   HrJobDesignationController.php--100.00%
   RequisitionController.php--100.00%
   ResourcesController.php--100.00%
   TagsController.php--100.00%
Modules/HR/Http/Controllers/Recruitment
   ApplicantController.php--100.00%
   ApplicationController.php38.22%7.14%100.00%
   ApplicationRoundController.php--100.00%
   CampaignsController.php--100.00%
   InternshipApplicationController.php--100.00%
   JobApplicationController.php100.00%100.00%100.00%
   JobController.php13.13%25.00%100.00%
   RecruitmentOpportunityController.php--100.00%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@Vipul-Ydv
Vipul-Ydv requested a review from rathorevaibhav July 11, 2026 11:09
@Vipul-Ydv Vipul-Ydv self-assigned this Jul 11, 2026
rathorevaibhav and others added 5 commits July 25, 2026 18:55
Laravel 10 removed the Eloquent $dates property (upgrade guide, "Model
Dates Property"). HasAttributes::getDates() no longer reads $this->dates
and now returns only the timestamp columns, so every column declared in
$dates was being read back as a raw string instead of a Carbon instance.

That broke 11 models at runtime. Crashes on any date method call, for
example the invoice list page (index.blade.php:154 calls
$invoice->sent_on->format(...)), invoice file-path generation, the
pending-invoice and payment-received mails, employee tenure and the
client revenue report. It also failed silently in payroll:
EmployeePayrollExport:58 does optional($employee->termination_date)
->isSameMonth(...), and Optional::__call only forwards to objects, so a
string made it return null. A departing employee was paid a full month
instead of pro-rated days.

Converted to $casts => 'datetime', which is the same asDateTime()
path $dates used, on both read and write, so behaviour matches
Laravel 9 exactly. 'date' would not - it adds startOfDay().

Columns the framework already handles are dropped rather than restated:
created_at/updated_at come from getDates() via usesTimestamps(), and
deleted_at from SoftDeletes::initializeSoftDeletes(). The five models
that listed only deleted_at alongside SoftDeletes therefore need no
$casts at all. app/Models/Finance/Invoice.php and Payment.php keep an
explicit deleted_at cast because neither uses the trait.

Also drops the 19 phpstan-baseline entries added in 9579104. Those
were not larastan noise - larastan resolves date attributes by calling
the framework's own getDates(), so it was correctly reporting this
regression, and baselining it removed the only automated signal. The
baseline returns to its phase-2 size of 107.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
config/database.php already declared dbal.types.timestamp, so the app had
two registration sites for the same Doctrine type, and the config one
still pointed at the framework class this override exists to work around.

DatabaseManager::registerConfiguredDoctrineTypes() reads
database.dbal.types when a connection is configured and registers each
entry, and doctrine/dbal has no builtin 'timestamp' type, so pointing the
existing config import at App\Database\DBAL\TimestampType is enough. That
lets AppServiceProvider::register() go back to being empty instead of
mutating Doctrine's global type registry on every boot.

Also documents why the class exists, and adds a unit test. One case
asserts the framework type still rejects MariaDb1043Platform, so if a
later Laravel release adds that platform to its match list the test
fails and tells us the override can be deleted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The phpunit bump to ^10.1 left phpunit.xml on the PHPUnit 9 schema, which
is what produced the "PHPUnit Deprecations: 1" in CI. PHPUnit 10 moved
coverage include/exclude into a top-level <source> element and dropped the
processUncoveredFiles attribute (includeUncoveredFiles now defaults to
true, so the intent is preserved).

10.5 still honours the old form via a fallback in TextUI Merger, but
PHPUnit 11 deletes it, and with no <source> element the filter registry
stays unconfigured and coverage is skipped entirely. Doing it here keeps
the phase-4 phpunit ^11 bump from silently losing coverage reporting.

Validated against phpunit 10.5.63's own phpunit.xsd.

The plan lists this under phase 4; pulling it forward because the phpunit
bump it pairs with already landed in this phase.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Illuminate's TimestampType match omits MariaDb110700Platform as well as
MariaDb1043Platform, so it throws on MariaDB 11.7+ too. Because
MariaDb110700Platform descends from MariaDb1043Platform
(11.7 -> 10.10 -> 10.6 -> 10.5.2 -> 10.4.3), the single instanceof
already handles it, but the docblock only claimed the 10.4 case and the
test comment said the override could be deleted as soon as Laravel added
MariaDb1043Platform. Following that would have silently dropped 11.7+.

Adds coverage for 11.7 on both sides, and records why a second
instanceof MariaDb110700Platform check is unreachable, which is the
actual reason phpstan flagged one as always-false in 9579104 (the
class is present in doctrine/dbal 3.10.5, contrary to that commit
message).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The other cases in this file build the type by hand, so they only cover
getSQLDeclaration() - which 2c81417 already added. They would all still
pass if config/database.php's import were pointed back at
Illuminate\Database\DBAL\TimestampType, which is exactly what the base
branch has and so a likely merge-conflict resolution. That would leave
the override as dead code and quietly restore the MariaDB ->change()
failure.

This pins the wiring instead: resolving a connection runs
DatabaseManager::registerConfiguredDoctrineTypes(), and the registered
type must be ours. The PDO resolver stays lazy, so no database is used.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants