This PR was originally supposed to refactor controller methods to use Magento HttpMethodInterface(s) instead of inheriting from Action or AbstractAction controller classes. It became apparent that this would be impractical because although controller inheritance has been deprecated, there is no direct replacement for implementing a custom "admin" controller with ACL permissions.
After looking into the only remaining "refactorable" controller, it became apparent that it was not actually in use.
Description
Removes dead code
TaxJar's address validation uses a WebAPI rest endpoint defined in etc/webapi.xml, not the controller which was defined at Controller/AddressValidation/Index.php. There is no etc/routes.xml or etc/frontend/routes.xml where the controller frontname could be defined, and given the canonical URL format is <base_url>/<frontname>/<controller_pathname>/<filename>, we would expect the URL for such a controller should be something like baseurl.com/Taxjar/AddressValidation/Index.php or baseurl.com/taxjar/address_validation/index.php neither of which is a valid enpoint.
Updates
Fixes some code standards issues and updates copyright date.
Performance
No impact.
Testing
Tested address validation via guest checkout
Tested address validation via admin order entry.
Versions
[X] Magento 2.4
[ ] Magento 2.3
[X] Magento Open Source (formerly Magento 2 Community Edition)
Context
This PR was originally supposed to refactor controller methods to use Magento HttpMethodInterface(s) instead of inheriting from Action or AbstractAction controller classes. It became apparent that this would be impractical because although controller inheritance has been deprecated, there is no direct replacement for implementing a custom "admin" controller with ACL permissions.
After looking into the only remaining "refactorable" controller, it became apparent that it was not actually in use.
Description
Removes dead code TaxJar's address validation uses a WebAPI rest endpoint defined in
etc/webapi.xml
, not the controller which was defined atController/AddressValidation/Index.php
. There is noetc/routes.xml
oretc/frontend/routes.xml
where the controller frontname could be defined, and given the canonical URL format is<base_url>/<frontname>/<controller_pathname>/<filename>
, we would expect the URL for such a controller should be something likebaseurl.com/Taxjar/AddressValidation/Index.php
orbaseurl.com/taxjar/address_validation/index.php
neither of which is a valid enpoint.Updates Fixes some code standards issues and updates copyright date.
Performance
No impact.
Testing
Versions