private static function _calculateConfigurationChanges(
        RoleEnvironmentData $currentRoleEnvironment,
        RoleEnvironmentData $newRoleEnvironment
    ) {
        $changes = [];
        $currentConfig = $currentRoleEnvironment->getConfigurationSettings();
        $newConfig = $newRoleEnvironment->getConfigurationSettings();

        foreach ($currentConfig as $settingKey => $setting) {
            if (array_key_exists($settingKey, $newConfig)) {
                if ($newConfig[$settingKey] != $currentConfig[$settingKey]) {
                    $changes[] = new RoleEnvironmentConfigurationSettingChange(
                        $settingKey
                    );
                }
            } else {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        foreach ($newConfig as $settingKey => $setting) {
            if (!array_key_exists($settingKey, $currentConfig)) {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        return $changes;
    }