While performing a development I replaced a class name (from
ExampleController) and a few methods were also renamed.
While this package was correctly installed on my scratch org, it is throwing an error while being deployed to UAT (and I am assuming it will throw the same one when installed on PROD), which is:
Apex compile failure,
Details: Apex class ExampleCtrl: line 4, column 61: Method does not exist or incorrect signature: void getRecords(String) from the type ExampleService.
ExampleCtrl was renamed, so I wouldn't expect it to be compiled. Additionally, the package is being installed with the --upgradeType flag set to DeprecateOnly. I could simply delete the
ExampleCtrl class from UAT and then install the new version of the package, but this isn't a viable solution as it won't work in PROD environments.
Does anyone know the root cause and if there is a workaround in order to correctly deploy this metadata?
Best regards and thank you in advance!