-
Notifications
You must be signed in to change notification settings - Fork 35
Upgrade xero-php-oauth2 to v9/v10 #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @wireblue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the "xero-php-oauth2" dependency to include support for versions 9.x and 10.x. This ensures compatibility with the latest upstream changes, which introduce several breaking changes related to obsolete API endpoints and new mandatory fields in Payroll models for NZ and UK regions. The update maintains existing support for versions 7.1 and 8.0. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the xero-php-oauth2 dependency to allow versions 9 and 10. The change in composer.json is correct for this purpose. However, this dependency upgrade introduces significant breaking changes, as noted in your pull request description. My main feedback, detailed in a comment on composer.json, is that this change should be part of a new major version release for this package to adhere to semantic versioning. This is critical to ensure users are aware of the potential backward-incompatible changes.
| "require": { | ||
| "php": "^8.2|^8.3|^8.4", | ||
| "xeroapi/xero-php-oauth2": "^7.1|^8.0", | ||
| "xeroapi/xero-php-oauth2": "^7.1|^8.0|^9.0|^10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While allowing newer versions of xero-php-oauth2 is a good enhancement, versions 9 and 10 introduce significant breaking changes as you've noted in the PR description. To adhere to semantic versioning principles, this change should be accompanied by a new major version release for webfox/laravel-xero-oauth2 (e.g., v5.0.0).
This signals to users that the update contains backward-incompatible changes (even if they are in a dependency) and that they need to review their code for compatibility. Releasing this as a minor or patch version could unexpectedly break users' applications.
I also strongly recommend documenting these breaking changes in CHANGELOG.md as part of the new major release.
|
I've tested these changes on our Laravel app which pulls invoices, contacts and accounts. Everything seems to be ok so far, but would appreciate another set of eyes on things. |
Upstream dependency xero-php-oauth2 has released 2 new versions (9.x and 10.x). This PR adds support for those.
Tests are passing, coverage is good, no docs appear to need changes.
Breaking Changes
Source: https://github.com/XeroAPI/xero-php-oauth2/releases
v10.1.0: Obsolete endpoints
The following Accounting API methods are marked obsolete and scheduled for removal from 28th April 2026:
v10.0.0: New required fields
Payroll models have new mandatory fields:
NZ
Employeerequires firstName, lastName, dateOfBirth, addressEmploymentrequires startDate, engagementType, payrollCalendarIDUK
Employeerequires firstName, lastName, dateOfBirth, address, gender, titleEmploymentrequires startDate, payrollCalendarID, employeeNumber, niCategoriesv9.0.0: UK-specific changes
Employeemodel: NICategoryLetter has been marked as deprecated and NICategories added as a new property.EmploymentPOST endpoint. Added NI Categories and removed deprecated niCategory property.