From 256f3e710c76777de3e5a6347f8153a53c7bd53a Mon Sep 17 00:00:00 2001 From: William Allen Date: Sat, 12 Sep 2026 09:57:25 -0400 Subject: [PATCH] Remove legacy `Label` model The migration of our legacy models to Eloquent is a years-long endeavor, and the legacy `Label` model is one of the most difficult to deal with as a developer. This PR completes the migration of the legacy `Label` model to Eloquent. --- app/Http/Submission/Handlers/BuildHandler.php | 13 +- .../Submission/Handlers/ConfigureHandler.php | 6 +- .../Submission/Handlers/CoverageHandler.php | 4 +- .../Handlers/CoverageJUnitHandler.php | 4 +- .../Handlers/DynamicAnalysisHandler.php | 4 +- .../Submission/Handlers/GcovTarHandler.php | 6 +- .../Submission/Handlers/ProjectHandler.php | 6 +- .../Submission/Handlers/TestingHandler.php | 4 +- .../Submission/Handlers/UploadHandler.php | 4 +- app/Models/Test.php | 11 +- app/Utils/TestCreator.php | 9 +- app/cdash/app/Model/Build.php | 25 ++-- app/cdash/app/Model/BuildConfigure.php | 18 ++- app/cdash/app/Model/BuildFailure.php | 6 +- app/cdash/app/Model/CoverageSummary.php | 4 +- app/cdash/app/Model/DynamicAnalysis.php | 8 +- app/cdash/app/Model/Label.php | 56 -------- app/cdash/app/Model/Subscriber.php | 4 +- .../Messaging/Topic/BuildErrorTopic.php | 4 +- .../Messaging/Topic/ConfigureTopic.php | 8 +- .../include/Messaging/Topic/LabeledTopic.php | 4 +- .../Messaging/Topic/TestFailureTopic.php | 8 +- .../Messaging/Topic/ConfigureTopicTest.php | 6 +- .../Messaging/Topic/TestFailureTopicTest.php | 26 ++-- .../CDash/MultipleSubprojectsEmailTest.php | 4 +- app/cdash/tests/test_buildconfigure.php | 2 +- app/cdash/tests/test_removebuilds.php | 4 +- phpstan-baseline.neon | 122 +++--------------- 28 files changed, 133 insertions(+), 247 deletions(-) delete mode 100644 app/cdash/app/Model/Label.php diff --git a/app/Http/Submission/Handlers/BuildHandler.php b/app/Http/Submission/Handlers/BuildHandler.php index 0018990925..014fd2eca3 100644 --- a/app/Http/Submission/Handlers/BuildHandler.php +++ b/app/Http/Submission/Handlers/BuildHandler.php @@ -23,7 +23,7 @@ use App\Models\BuildCommand; use App\Models\BuildCommandOutput; use App\Models\BuildMeasurement; -use App\Models\Label as EloquentLabel; +use App\Models\Label; use App\Models\Site; use App\Models\SiteInformation; use App\Models\Target; @@ -40,7 +40,6 @@ use CDash\Model\BuildError; use CDash\Model\BuildFailure; use CDash\Model\BuildGroup; -use CDash\Model\Label; use CDash\Model\Project; use CDash\Model\Subscriber; use CDash\Submission\CommitAuthorHandlerInterface; @@ -78,7 +77,7 @@ class BuildHandler extends AbstractXmlHandler implements ActionableBuildInterfac * don't exist until parsing is complete. * * @var array, + * labels: array