Skip to content

Releases: google/libphonenumber

libphonenumber-7.7.2

11 Oct 12:08
Compare
Choose a tag to compare

Hi all,

Please find the new JARs on the maven site here.

Warning: this release may break your code unless you update your code at the same time, as it has the following breaking changes:

  • Calls to formatNationalNumberWithPreferredCarrierCode, where parseAndKeepRawInput was used to provide the phone number and no carrier code was found, will now use the fallback carrier code. Before we erroneously used an empty string as a carrier code.
  • Calls to formatNumberForMobileDialing for Brazilian numbers previously produced output for any number, regardless of whether a carrier code was found or not, so long as the number had been obtained with parseAndKeepRawInput. Now if no carrier code was found, no output will be produced, because we can't guarantee the number is diallable. If you want to get output regardless, you will need to explicitly set a carrier code for Brazilian numbers if none was present.

You may also need to update any tests that rely on the exact result of parsing a number using parseAndKeepRawInput, since the preferred_domestic_carrier_code won't be set where it was previously empty.

Full details in the release notes, along with information on what metadata has changed.

In light of the fact that this may require changes from clients using these methods to achieve the same behaviour as previous releases, we should have tagged this release as v8.0.0; apologies for this oversight. We hope it won't cause too much inconvenience.

Thanks to all those who contributed by providing issue reports!

Want to be notified of future breaking releases? Join the discussion group!

libphonenumber-7.7.0

20 Sep 07:58
Compare
Choose a tag to compare

Greetings,

Please find the new JARs on the maven site here.

The new release contains only code changes and no metadata changes.

New functionality in this release:

  • Removed the dependency on protobuf-javanano from the Java library. This resulted in a minor reduction in the size of the libphonenumber jar. If you added a dependency on protobuf-javanano due to libphonenumber-7.6.0 it is now safe to remove this dependency.

More details in the release notes.

Note if you take advantage of this new functionality by changing your code, it will not necessarily be trivially easy to roll back to a previous version, since you will have to re-add the dependency.

Cheers,
Keghani, on behalf of the libphonenumber team

Want to be notified of future releases? Join the discussion group!

libphonenumber-7.6.0

24 Aug 17:58
Compare
Choose a tag to compare

Greetings,

Please find the new JARs on the maven site here.

The new release contains metadata changes and some code changes. Upgrading to the latest release is always encouraged since phone number information changes often!

New functionality in this release:

  • Use protobuf-javanano runtime dependencies from the Maven Repository in our build. Previously we were packaging these dependencies directly in our jar, which was bad practice and a bad experience for clients*.
    • We hope this is good news for many of you. If this version has unintended consequences please let us know ASAP by reporting an issue on GitHub.
    • For more technical details on what changed, see PR #1282.
  • Made isNumberGeographical public, and changed the geocoder to use this when checking whether to give a detailed answer or country-level only.

Full details in the release notes.

Warning: If you don't compile your project with protobuf-javanano dependencies, this release will break your code unless you update your code at the same time. You need to ensure that you have protobuf-javanano dependencies in your build. For example, if you compile with Maven, add the following under dependencies:

<dependency>
  <groupId>com.google.protobuf.nano</groupId>
  <artifactId>protobuf-javanano</artifactId>
  <version>3.0.0-alpha-7</version>
</dependency>

If you have tips on adding this dependency for other build systems, please chime in on the release announcement thread!

Moreover, if you already had protobuf-javanano dependencies in your own project, be aware that we stopped renaming Java imports for com.google.protobuf.nano to com.google.i18n.phonenumbers.repackaged.com.google.protobuf.nano in our files.
Repackaging (PR #1099) was a temporary workaround until we removed the dependencies from the jars.

Finally, if you take advantage of the new functionality (isNumberGeographical) by changing your code, it will not necessarily be trivially easy to roll back to a previous version.

Thanks to all those who contributed by providing issue reports!

Cheers,
Keghani, on behalf of the libphonenumber team

* See #913, #956, #1070

Want to be notified of future breaking releases? Join the discussion group!

DO NOT USE - libphonenumber 7.2.0

12 Nov 12:26
Compare
Choose a tag to compare
Pre-release

Do not use this release, it is missing dependencies for Maven users.
7.2.1 has the exact set of metadata with the correct dependencies, use that instead.