diff --git a/app/GraphQL/Validators/CreateProjectInputValidator.php b/app/GraphQL/Validators/CreateProjectInputValidator.php index bb22be4220..ea042812c4 100644 --- a/app/GraphQL/Validators/CreateProjectInputValidator.php +++ b/app/GraphQL/Validators/CreateProjectInputValidator.php @@ -18,12 +18,6 @@ public function rules(): array Rule::unique(Project::class, 'name'), new ProjectNameRule(), ], - 'homeurl' => [ - 'prohibits:homeUrl', - ], - 'homeUrl' => [ - 'prohibits:homeurl', - ], 'visibility' => [ new ProjectVisibilityRule(), ], diff --git a/graphql/schema.graphql b/graphql/schema.graphql index 47a5a59a91..3c942a195b 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -206,9 +206,6 @@ type Project { "Description." description: String - "Homepage for this project." - homeurl: Url @deprecated(reason: "Use 'homeUrl' instead.") - "Homepage for this project." homeUrl: Url @rename(attribute: "homeurl") @@ -402,20 +399,11 @@ input CreateProjectInput @validator { "Description." description: String - "Project homepage" - homeurl: Url @deprecated(reason: "Use 'homeUrl' instead.") - - "Project homepage" - homeUrl: Url @rename(attribute: "homeurl") @deprecated(reason: "This field will be removed in the next major version of CDash.") - "Visibility." visibility: ProjectVisibility! @rename(attribute: "public") "A boolean indicating whether authenticated submissions are required." authenticateSubmissions: Boolean! @rename(attribute: "authenticatesubmissions") - - "A LDAP group users must be a member of to access the project." - ldapFilter: String @deprecated(reason: "This field will be removed in the next major version of CDash.") @rename(attribute: "ldapfilter") } @@ -846,18 +834,6 @@ type Build { filters: _ @filter ): [BuildError!]! @hasMany(type: CONNECTION) @orderBy(column: "id", direction: DESC) - # TODO: Make an "errors" field which returns the union of basic and rich errors - """ - A list of "basic" errors submitted for this build. - """ - basicErrors: [BasicBuildAlert!]! @hasMany(type: CONNECTION) @orderBy(column: "id", direction: DESC) @deprecated(reason: "This field will be removed in the next major version of CDash. Use buildErrors instead.") - - # TODO: Make a "warnings" field which returns the union of basic and rich warnings - """ - A list of "basic" warnings submitted for this build. - """ - basicWarnings: [BasicBuildAlert!]! @hasMany(type: CONNECTION) @orderBy(column: "id", direction: DESC) @deprecated(reason: "This field will be removed in the next major version of CDash. Use buildErrors instead.") - project: Project! @belongsTo notes: [Note!]! @belongsToMany(type: CONNECTION) @orderBy(column: "id", direction: DESC) @@ -882,10 +858,6 @@ type Build { filters: _ @filter ): [Build!]! @hasMany(type: CONNECTION) @orderBy(column: "id") - coverageResults( - filters: _ @filter - ): [Coverage!]! @belongsToMany(type: CONNECTION, relation: "coverage") @orderBy(column: "id", direction: DESC) @deprecated(reason: "Use 'coverage' instead.") - coverage( filters: _ @filter ): [Coverage!]! @belongsToMany(type: CONNECTION) @orderBy(column: "id", direction: DESC) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6ac92f8f02..2f86b7c877 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -26595,15 +26595,6 @@ parameters: count: 4 path: tests/Feature/GlobalInvitationAcceptanceTest.php - - - rawMessage: ''' - Call to deprecated method basicAlerts() of class App\Models\Build: - 02/09/2026 Use buildErrors() instead - ''' - identifier: method.deprecated - count: 4 - path: tests/Feature/GraphQL/BuildTypeTest.php - - rawMessage: ''' Call to deprecated method coverageResults() of class App\Models\Build: diff --git a/tests/Feature/GraphQL/BuildTypeTest.php b/tests/Feature/GraphQL/BuildTypeTest.php index 6e939023a3..2118b44190 100644 --- a/tests/Feature/GraphQL/BuildTypeTest.php +++ b/tests/Feature/GraphQL/BuildTypeTest.php @@ -166,381 +166,6 @@ public function testBasicFieldAccess(): void ]); } - public function testNoBasicWarningsOrBasicErrorsReturnsEmptyArray(): void - { - $this->project->builds()->create([ - 'name' => 'build1', - 'uuid' => Str::uuid()->toString(), - ]); - - $this->graphQL(' - query project($id: ID) { - project(id: $id) { - builds { - edges { - node { - name - basicWarnings { - edges { - node { - text - } - } - } - basicErrors { - edges { - node { - text - } - } - } - } - } - } - } - } - ', [ - 'id' => $this->project->id, - ])->assertExactJson([ - 'data' => [ - 'project' => [ - 'builds' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => 'build1', - 'basicWarnings' => [ - 'edges' => [], - ], - 'basicErrors' => [ - 'edges' => [], - ], - ], - ], - ], - ], - ], - ], - ]); - } - - public function testBasicWarningFields(): void - { - $build = $this->project->builds()->create([ - 'name' => 'build1', - 'uuid' => Str::uuid()->toString(), - ]); - $build->basicAlerts()->create([ - 'type' => Build::TYPE_WARN, - 'logline' => 5, - 'stdoutput' => 'abc', - 'stderror' => 'def', - 'sourcefile' => '/a/b/c', - 'sourceline' => 7, - ]); - - $this->graphQL(' - query project($id: ID) { - project(id: $id) { - builds { - edges { - node { - name - basicWarnings { - edges { - node { - logLine - text - sourceFile - sourceLine - preContext - postContext - } - } - } - basicErrors { - edges { - node { - text - } - } - } - } - } - } - } - } - ', [ - 'id' => $this->project->id, - ])->assertExactJson([ - 'data' => [ - 'project' => [ - 'builds' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => 'build1', - 'basicWarnings' => [ - 'edges' => [ - [ - 'node' => [ - 'logLine' => 5, - 'text' => 'abc', - 'sourceFile' => '/a/b/c', - 'sourceLine' => 7, - 'preContext' => null, - 'postContext' => null, - ], - ], - ], - ], - 'basicErrors' => [ - 'edges' => [], - ], - ], - ], - ], - ], - ], - ], - ]); - } - - public function testBasicErrorFields(): void - { - $build = $this->project->builds()->create([ - 'name' => 'build1', - 'uuid' => Str::uuid()->toString(), - ]); - $build->basicAlerts()->create([ - 'type' => Build::TYPE_ERROR, - 'logline' => 5, - 'stdoutput' => 'abc', - 'stderror' => 'def', - 'sourcefile' => '/a/b/c', - 'sourceline' => 7, - ]); - - $this->graphQL(' - query project($id: ID) { - project(id: $id) { - builds { - edges { - node { - name - basicWarnings { - edges { - node { - text - } - } - } - basicErrors { - edges { - node { - logLine - text - sourceFile - sourceLine - preContext - postContext - } - } - } - } - } - } - } - } - ', [ - 'id' => $this->project->id, - ])->assertExactJson([ - 'data' => [ - 'project' => [ - 'builds' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => 'build1', - 'basicWarnings' => [ - 'edges' => [], - ], - 'basicErrors' => [ - 'edges' => [ - [ - 'node' => [ - 'logLine' => 5, - 'text' => 'abc', - 'sourceFile' => '/a/b/c', - 'sourceLine' => 7, - 'preContext' => null, - 'postContext' => null, - ], - ], - ], - ], - ], - ], - ], - ], - ], - ], - ]); - } - - public function testMultipleBasicWarningsAndBasicErrors(): void - { - $build = $this->project->builds()->create([ - 'name' => 'build1', - 'uuid' => Str::uuid()->toString(), - ]); - - $warnings = []; - $errors = []; - for ($i = 0; $i < 10; $i++) { - $warning = [ - 'stdoutput' => Str::uuid()->toString(), - 'stderror' => Str::uuid()->toString(), - ]; - $error = [ - 'stdoutput' => Str::uuid()->toString(), - 'stderror' => Str::uuid()->toString(), - ]; - - $build->basicAlerts()->create(array_merge($warning, ['type' => Build::TYPE_WARN])); - $build->basicAlerts()->create(array_merge($error, ['type' => Build::TYPE_ERROR])); - - $warnings[] = [ - 'node' => [ - 'text' => $warning['stdoutput'], - ], - ]; - $errors[] = [ - 'node' => [ - 'text' => $error['stdoutput'], - ], - ]; - } - - $this->graphQL(' - query project($id: ID) { - project(id: $id) { - builds { - edges { - node { - name - basicWarnings { - edges { - node { - text - } - } - } - basicErrors { - edges { - node { - text - } - } - } - } - } - } - } - } - ', [ - 'id' => $this->project->id, - ])->assertExactJson([ - 'data' => [ - 'project' => [ - 'builds' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => 'build1', - 'basicWarnings' => [ - 'edges' => array_reverse($warnings), - ], - 'basicErrors' => [ - 'edges' => array_reverse($errors), - ], - ], - ], - ], - ], - ], - ], - ]); - } - - /** - * This test isn't intended to be a complete test of the GraphQL filtering - * capability, but rather a quick smoke check to verify that the most basic - * filters work for the builds relation, and that extra information is not leaked. - */ - public function testBasicBuildFiltering(): void - { - /** @var array $builds */ - $builds = []; - for ($i = 0; $i < 4; $i++) { - $builds[] = $this->project->builds()->create([ - 'name' => "build{$i}" . Str::uuid()->toString(), - 'uuid' => Str::uuid()->toString(), - ]); - } - - $this->graphQL(' - query($projectid: ID, $buildname: String) { - projects(filters: { - eq: { - id: $projectid - } - }) { - edges { - node { - name - builds(filters: { - eq: { - name: $buildname - } - }) { - edges { - node { - name - } - } - } - } - } - } - } - ', [ - 'projectid' => $this->project->id, - 'buildname' => $builds[2]->name, - ])->assertExactJson([ - 'data' => [ - 'projects' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => $this->project->name, - 'builds' => [ - 'edges' => [ - [ - 'node' => [ - 'name' => $builds[2]->name, - ], - ], - ], - ], - ], - ], - ], - ], - ], - ]); - } - public function testTopLevelBuildField(): void { $build1 = $this->project->builds()->create([ diff --git a/tests/Feature/GraphQL/CoverageTypeTest.php b/tests/Feature/GraphQL/CoverageTypeTest.php index b5c2e9fe3a..e9628deece 100644 --- a/tests/Feature/GraphQL/CoverageTypeTest.php +++ b/tests/Feature/GraphQL/CoverageTypeTest.php @@ -94,19 +94,6 @@ functionsUntested } } } - coverageResults { - edges { - node { - linesOfCodeTested - linesOfCodeUntested - branchesTested - branchesUntested - functionsTested - functionsUntested - filePath - } - } - } } } } @@ -121,21 +108,6 @@ functionsUntested 'edges' => [ [ 'node' => [ - 'coverageResults' => [ - 'edges' => [ - [ - 'node' => [ - 'linesOfCodeTested' => 4, - 'linesOfCodeUntested' => 5, - 'branchesTested' => 6, - 'branchesUntested' => 7, - 'functionsTested' => 8, - 'functionsUntested' => 9, - 'filePath' => $coverageFile->fullpath, - ], - ], - ], - ], 'coverage' => [ 'edges' => [ [ diff --git a/tests/Feature/GraphQL/Mutations/CreateProjectTest.php b/tests/Feature/GraphQL/Mutations/CreateProjectTest.php index 33f695ed61..7a2fc746f5 100644 --- a/tests/Feature/GraphQL/Mutations/CreateProjectTest.php +++ b/tests/Feature/GraphQL/Mutations/CreateProjectTest.php @@ -55,7 +55,6 @@ public function testCreateProjectNoUser(): void 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => false, ], @@ -83,7 +82,6 @@ public function testCreateProjectUnauthorizedUser(): void 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => false, ], @@ -111,7 +109,6 @@ public function testCreateProjectUserCreateProjectNoUser(): void 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => false, ], @@ -141,7 +138,6 @@ public function testCreateProjectUserCreateProject(): void 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => false, ], @@ -178,7 +174,6 @@ public function testCreateProjectAdmin(): void 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => false, ], @@ -253,7 +248,6 @@ public function testCreateProjectMaxVisibility(string $user, string $visibility, 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => $visibility, 'authenticateSubmissions' => false, ], @@ -326,7 +320,6 @@ public function testRequireAuthenticatedSubmissions( 'input' => [ 'name' => $name, 'description' => 'test', - 'homeUrl' => 'https://cdash.org', 'visibility' => 'PUBLIC', 'authenticateSubmissions' => $use_authenticated_submits, ], diff --git a/tests/Feature/GraphQL/ProjectTypeTest.php b/tests/Feature/GraphQL/ProjectTypeTest.php index 0f0c5303a0..a837d4e8a7 100644 --- a/tests/Feature/GraphQL/ProjectTypeTest.php +++ b/tests/Feature/GraphQL/ProjectTypeTest.php @@ -119,9 +119,7 @@ public static function fieldValues(): array return [ ['description', 'abc', 'description', 'abc'], ['description', null, 'description', null], - ['homeurl', 'https://cdash.org', 'homeurl', 'https://cdash.org'], - ['homeurl', 'cdash.org', 'homeurl', 'cdash.org'], - ['homeurl', null, 'homeurl', null], + ['homeurl', 'cdash.org', 'homeUrl', 'cdash.org'], ['homeurl', 'https://cdash.org', 'homeUrl', 'https://cdash.org'], ['homeurl', null, 'homeUrl', null], ...$vcsViewerValues,