Breaking code changes when migrating to Fooman's verified Xero App

Please note this section is only relevant if you have previously customised the code of the Fooman  Connect: Xero extension.

Please review the new code for changes. All classes which are no longer relevant have had a @deprecated annotation added.

Package Replacements - License Version to Subscription

With the switch from the license version to the new subscription package of Fooman Connect: Xero, these packages are replaced:

  • fooman/connect-m2 is replaced with fooman/connect-sub-m2
  • fooman/connect-implementation-m2 is replaced with fooman/connect-sub-implementation-m2

Code Deprecations

The packages
  • fooman/connect-m2
  • fooman/connect-implementation-m2
  • fooman/connect-license-interface-m2
  • fooman/connect-license-subscription-m2
  • fooman/connect-license-standalone-m2
  • fooman/connect-license-interface-m2-implementation
are deprecated. Their functionality has been superseded and the replacements can be found in Fooman\Connect\Model\Connect\ApiClient.
  • Fooman\Connect\Model\Item::sendToXero() The first parameter used to be the xml input to be sent to Xero. The input is now a php array representing the data to be sent.
  • Fooman\Connect\Model\Invoice::sendToXero() The first parameter used to be the xml input to be sent to Xero. The input is now a php array representing the data to be sent.
  • Fooman\Connect\Model\Order::sendToXero() The first parameter used to be the xml input to be sent to Xero. The input is now a php array representing the data to be sent.
  • Fooman\Connect\Model\Creditmemo::sendToXero() The first parameter used to be the xml input to be sent to Xero. The input is now a php array representing the data to be sent.
  • Fooman\Connect\Model\Payment::sendToXero() The first parameter used to be the xml input to be sent to Xero. The input is now a php array representing the data to be sent.
  • Fooman\Connect\Model\DataSource\Order::getXml() is deprecated and will not be used when connecting via Fooman's verified App - no equivalent is required with the new API Client
  • Fooman\Connect\Model\DataSource\Invoice::getXml() is deprecated and will not be used when connecting via Fooman's verified App - no equivalent is required with the new API Client
  • Fooman\Connect\Model\DataSource\Creditmemo::getXml() is deprecated and will not be used when connecting via Fooman's verified App - no equivalent is required with the new API Client
  • The database tables foomanconnect_tenantid and foomanconnect_token are deprecated and will be removed in a future upgrade as they are not required post migration.

XML Customisations

If you previously customised the XML returned by our servers, this would no longer work as Fooman is now required to submit data directly to Xero without this intermediate step. Please get in touch to discuss your options - with our new infrastructure in place we are better placed to introduce new additional features. 

Alternatively please check if you can use the events dispatched by the Fooman_Connect extension to adjust the data array prior to it being sent.

Customisations using functionality from Xero's API Client

If you have any customisations that use Xero API endpoints that are not included in \Fooman\Connect\Model\Api\XeroApiClientInterface the best general advice we can provide is to not use the same Xero API credentials for the Fooman handled data and your custom data. From our understanding with discussions with Xero, the best option going forward for custom made code like this would be to use Xero’s Custom Connection - details here. Feel free to get in touch to discuss your options. 

If you have any questions or concerns please get in touch with us.

Still need help? Contact Us Contact Us