You don't have to actually upgrade to Firebase. You just have to migrate the project so that you can use the auto-generated Server Key in it. AFAIK, configurations should still the same after the migration of the project so there's no need to update any code.
This is the way it should be done in order to generate a new Server Key, as stated in the docs:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
If you ever decide to go with the project migration, see my answer here for the steps.