Apex Code Items That Aren’t Versioned
Some Apex items in managed packages can’t be versioned. The changes that you make to these items are reflected across all package versions. Additionally, there are limitations to the changes that you can make to some of these items when they are used in Apex code in managed packages.
As a package developer, you can add or remove these items from Apex in manage packages.
@Future@IsTestwith sharingwithout sharingtransient
You can make limited changes to these Apex items in managed packages.
private—can be changed toglobalprotected—can be changed toglobalpublic—can be changed toglobalabstract—can be changed tovirtualbut can’t be removedfinal—can be removed but can’t be added
You can’t remove or change these Apex items in managed packages.
globalvirtual
You can add the webservice keyword, but once it has been added, it can’t be removed.
You can’t deprecate webservice methods or variables in managed package code.
If a package upgrade includes an explicit global constructor for a released global class that previously only had an implicit constructor, then the new, explicit constructor will be called from the subscriber. Also, you can’t reduce the access modifier on the default constructor on a released global class in a package. See Best Practices for Using Global Apex in Managed Packages.