Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 26, 2025 15:44
Copilot finished reviewing on behalf of StanBarrows November 26, 2025 15:46
@StanBarrows StanBarrows merged commit 1bf30d1 into main Nov 26, 2025
16 checks passed
@StanBarrows StanBarrows deleted the feature-countries branch November 26, 2025 15:46
Copy link

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 PR adds comprehensive support for the Countries API endpoint to the Bexio SDK, including all CRUD operations (Create, Read, Update, Delete) and search functionality. The PR also refactors the Items enum from OrderByEnum to ItemsOrderByEnum to avoid naming conflicts with the new Countries enum, and adds error suppression to test fixture cleanup operations for better test reliability.

Key Changes

  • Added full Countries API support with request classes, DTOs, enums, tests, and documentation
  • Renamed Items\OrderByEnum to Items\ItemsOrderByEnum to prevent naming conflicts
  • Added @ error suppression operator to unlink() calls in test files for more reliable fixture cleanup

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Requests/Items/SearchItemsRequestTest.php Added error suppression to fixture cleanup
tests/Requests/Items/FetchAListOfItemsRequestTest.php Added error suppression to fixture cleanup
tests/Requests/Items/CreateItemRequestTest.php Added error suppression to fixture cleanup
tests/Requests/Countries/SearchCountriesRequestTest.php New test for Countries search endpoint
tests/Requests/Countries/FetchAListOfCountriesRequestTest.php New test for fetching list of countries
tests/Requests/Countries/FetchACountryRequestTest.php New test for fetching a single country
tests/Requests/Countries/EditACountryRequestTest.php New test for editing a country
tests/Requests/Countries/DeleteACountryRequestTest.php New test for deleting a country
tests/Requests/Countries/CreateCountryRequestTest.php New test for creating a country
tests/Fixtures/Saloon/* Updated test fixtures with new API responses
src/Requests/Items/SearchItemsRequest.php Updated to use renamed ItemsOrderByEnum
src/Requests/Items/FetchAListOfItemsRequest.php Updated to use renamed ItemsOrderByEnum
src/Requests/Countries/SearchCountriesRequest.php New request class for searching countries
src/Requests/Countries/FetchAListOfCountriesRequest.php New request class for fetching countries list
src/Requests/Countries/FetchACountryRequest.php New request class for fetching a single country
src/Requests/Countries/EditACountryRequest.php New request class for editing a country
src/Requests/Countries/DeleteACountryRequest.php New request class for deleting a country
src/Requests/Countries/CreateCountryRequest.php New request class for creating a country
src/Enums/Items/ItemsOrderByEnum.php Renamed from OrderByEnum to avoid conflicts
src/Enums/Countries/CountriesOrderByEnum.php New enum for country ordering options
src/Dto/Countries/CreateEditCountryDTO.php New DTO for creating/editing countries
src/Dto/Countries/CountryDTO.php New DTO for country data
README.md Added documentation for Countries API endpoints and updated Items enum reference

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

Comment on lines +13 to +15
if (shouldResetFixtures() && file_exists($fixturePath)) {
@unlink($fixturePath);
}
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Inconsistent file existence check before unlink. Unlike other Country test files (FetchAListOfCountriesRequestTest.php, CreateCountryRequestTest.php, etc.) and Item test files that use @unlink($fixturePath) directly, this test adds an additional file_exists($fixturePath) check. This is unnecessary since @unlink() already suppresses the warning if the file doesn't exist. For consistency with the rest of the codebase, remove the file_exists() check.

Suggested change:

if (shouldResetFixtures()) {
    @unlink($fixturePath);
}

Copilot uses AI. Check for mistakes.
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