这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@flovntp
Copy link
Collaborator

@flovntp flovntp commented Nov 3, 2025

No description provided.

@flovntp flovntp marked this pull request as draft November 3, 2025 12:23
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@flovntp flovntp marked this pull request as ready for review November 3, 2025 15:52
@flovntp flovntp changed the title BackupTask signature Tasks signature Nov 3, 2025
@flovntp flovntp requested a review from Theosakamg November 3, 2025 22:05
@flovntp flovntp marked this pull request as draft November 4, 2025 07:54
@Theosakamg Theosakamg requested a review from Copilot November 4, 2025 11:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors method signatures across the Upsun SDK test suite and core files to use named parameters instead of positional arguments. The main goals are to improve code readability, type safety, and maintainability by explicitly naming parameters when calling methods.

  • Replace array-based parameter passing with named parameters in task method calls
  • Add proper PHPDoc annotations with @throws declarations for exception handling
  • Remove variable definitions where parameters are now passed directly as named arguments

Reviewed Changes

Copilot reviewed 47 out of 49 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/UpsunConfigTest.php Updates constructor calls and test methods to use named parameters
tests/UpsunClientTest.php Adds exception documentation and uses named parameters
tests/Core/Tasks/WorkersTaskTest.php Refactors worker task method calls to use named parameters
tests/Core/Tasks/VariablesTaskTest.php Converts variable task operations from array-based to named parameter calls
tests/Core/Tasks/UsersTaskTest.php Updates user management operations with named parameters and adds new test methods
tests/Core/Tasks/TeamsTaskTest.php Refactors team operations to use named parameters and adds new test cases
tests/Core/Tasks/SupportTicketsTaskTest.php Updates support ticket operations with named parameters
tests/Core/Tasks/SourceOperationsTaskTest.php Converts source operation calls to named parameters
tests/Core/Tasks/RoutesTaskTest.php Updates route management calls with named parameters
tests/Core/Tasks/ResourcesTaskTest.php New test file for resource management operations
tests/Core/Tasks/RegionsTaskTest.php Updates region operations with named parameters
tests/Core/Tasks/ProjectsTaskTest.php Extensive refactoring of project operations to use named parameters
tests/Core/Tasks/OrganizationsTaskTest.php Updates organization management with named parameters and improved test data
tests/Core/Tasks/OperationsTaskTest.php Refactors operation execution calls to use named parameters
tests/Core/Tasks/InvitationsTaskTest.php Updates invitation management with named parameters
tests/Core/Tasks/BaseTestCase.php Minor documentation improvement
templates/php/README.mustache Updates README examples to use named parameters
src/UpsunClient.php Updates constructor calls to use named parameters
Comments suppressed due to low confidence (2)

tests/Core/Tasks/OperationsTaskTest.php:1

  • The test method testRunThrowsApiException should throw an ApiException but instead creates a result and asserts equality. The method name indicates it should test exception throwing, but the implementation doesn't match.
<?php

tests/Core/Tasks/ProjectsTaskTest.php:1

  • Assertion compares $projects array with itself. This should likely compare $projects with $orgProjectList['items'] to validate the actual vs expected data.
<?php

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Theosakamg Theosakamg requested a review from Copilot November 4, 2025 11:31
@flovntp flovntp marked this pull request as ready for review November 4, 2025 11:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 47 out of 49 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Theosakamg Theosakamg merged commit a296580 into main Nov 4, 2025
9 checks passed
@Theosakamg Theosakamg deleted the fix-task-signature branch November 4, 2025 11:36
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.

3 participants