updated-packages
This commit is contained in:
33
vendor/giggsey/libphonenumber-for-php/README.md
vendored
33
vendor/giggsey/libphonenumber-for-php/README.md
vendored
@@ -1,14 +1,12 @@
|
||||
# libphonenumber for PHP [](https://travis-ci.org/giggsey/libphonenumber-for-php) [](https://coveralls.io/r/giggsey/libphonenumber-for-php?branch=master)
|
||||
# libphonenumber for PHP [](https://github.com/giggsey/libphonenumber-for-php/actions?query=workflow%3A%22Continuous+Integration%22) [](https://coveralls.io/r/giggsey/libphonenumber-for-php?branch=master)
|
||||
|
||||
[](https://packagist.org/packages/giggsey/libphonenumber-for-php)
|
||||
[](https://packagist.org/packages/giggsey/libphonenumber-for-php)
|
||||
[](https://packagist.org/packages/giggsey/libphonenumber-for-php)
|
||||
[](https://packagist.org/packages/giggsey/libphonenumber-for-php)
|
||||
[](https://packagist.org/packages/giggsey/libphonenumber-for-php)
|
||||
|
||||
## What is it?
|
||||
A PHP library for parsing, formatting, storing and validating international phone numbers. This library is based on Google's [libphonenumber](https://github.com/googlei18n/libphonenumber).
|
||||
|
||||
|
||||
A PHP library for parsing, formatting, storing and validating international phone numbers. This library is based on Google's [libphonenumber](https://github.com/google/libphonenumber).
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Documentation](#documentation)
|
||||
@@ -18,7 +16,7 @@ A PHP library for parsing, formatting, storing and validating international phon
|
||||
- [Quick Examples](#quick-examples)
|
||||
- [Geocoder](#geocoder)
|
||||
- [ShortNumberInfo](#shortnumberinfo)
|
||||
- [Mapping Phone Numbers to carrier](#mapping-phone-numbers-to-carrier)
|
||||
- [Mapping Phone Numbers to Carrier](#mapping-phone-numbers-to-carrier)
|
||||
- [Mapping Phone Numbers to TimeZones](#mapping-phone-numbers-to-timezones)
|
||||
- [FAQ](#faq)
|
||||
- [Problems with Invalid Numbers?](#problems-with-invalid-numbers)
|
||||
@@ -28,7 +26,7 @@ A PHP library for parsing, formatting, storing and validating international phon
|
||||
|
||||
## Installation
|
||||
|
||||
PHP versions 5.3 up to PHP 7.2 are currently supported. HHVM is also supported.
|
||||
PHP versions 5.3 up to PHP 8.1 are currently supported.
|
||||
|
||||
The PECL [mbstring](http://php.net/mbstring) extension is required.
|
||||
|
||||
@@ -42,6 +40,10 @@ You can also use any other [PSR-4](http://www.php-fig.org/psr/psr-4/) compliant
|
||||
|
||||
If you do not use composer, ensure that you also load any dependencies that this project has, such as [giggsey/locale](https://github.com/giggsey/Locale).
|
||||
|
||||
## giggsey/libphonenumber-for-php-lite
|
||||
|
||||
If you only want to make sure of the core PhoneNumber Util functionality, you can use [giggsey/libphonenumber-for-php-lite](https://github.com/giggsey/libphonenumber-for-php-lite), which offers a much smaller package size.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [PhoneNumber Util](docs/PhoneNumberUtil.md)
|
||||
@@ -72,7 +74,7 @@ This library will try to follow the same version numbers as Google. There could
|
||||
This does mean that this project may not follow [Semantic Versioning](http://semver.org/), but instead Google's version policy. As a result, jumps in major versions may not actually contain any backwards
|
||||
incompatible changes. Please read the release notes for such releases.
|
||||
|
||||
Google try to release their versions according to Semantic Versioning, as laid out of in their [Versioning Guide](https://github.com/googlei18n/libphonenumber#versioning-and-announcements).
|
||||
Google try to release their versions according to Semantic Versioning, as laid out of in their [Versioning Guide](https://github.com/google/libphonenumber#versioning-and-announcements).
|
||||
|
||||
## Quick Examples
|
||||
Let's say you have a string representing a phone number from Switzerland. This is how you parse/normalize it into a PhoneNumber object:
|
||||
@@ -226,9 +228,9 @@ $timeZones = $timeZoneMapper->getTimeZonesForNumber($swissNumberProto);
|
||||
|
||||
#### Problems with Invalid Numbers?
|
||||
|
||||
This library uses phone number metadata from Google's [libphonenumber](https://github.com/googlei18n/libphonenumber). If this library is working as intended, it should provide the same result as the Java version of Google's project.
|
||||
This library uses phone number metadata from Google's [libphonenumber](https://github.com/google/libphonenumber). If this library is working as intended, it should provide the same result as the Java version of Google's project.
|
||||
|
||||
If you believe that a phone number is returning an incorrect result, first test it with [libphonenumber](https://github.com/googlei18n/libphonenumber) via their [Online Demo](https://libphonenumber.appspot.com/). If that returns the same result as this project, and you feel it is in error, raise it as an Issue with the libphonenumber project.
|
||||
If you believe that a phone number is returning an incorrect result, first test it with [libphonenumber](https://github.com/google/libphonenumber) via their [Online Demo](https://libphonenumber.appspot.com/). If that returns the same result as this project, and you feel it is in error, raise it as an Issue with the libphonenumber project.
|
||||
|
||||
If Google's [Online Demo](https://libphonenumber.appspot.com/) gives a different result to the [libphonenumber-for-php demo](http://giggsey.com/libphonenumber/), then please raise an Issue here.
|
||||
|
||||
@@ -242,7 +244,13 @@ If you do need to generate the data, the commands are provided by [Phing](https:
|
||||
$ vendor/bin/phing compile
|
||||
```
|
||||
|
||||
This compile process clones the [libphonenumber](https://github.com/googlei18n/libphonenumber) project at the version specified in [METADATA-VERSION.txt](METADATA-VERSION.txt).
|
||||
This compile process clones the [libphonenumber](https://github.com/google/libphonenumber) project at the version specified in [METADATA-VERSION.txt](METADATA-VERSION.txt).
|
||||
|
||||
### Running tests
|
||||
|
||||
This project uses [PHPUnit Bridge](https://symfony.com/doc/current/components/phpunit_bridge.html) to maintain compatibility for the supported PHP versions.
|
||||
|
||||
To run the tests locally, run the `./phpunit` script.
|
||||
|
||||
## Integration with frameworks
|
||||
|
||||
@@ -250,9 +258,10 @@ Other packages exist that integrate libphonenumber-for-php into frameworks.
|
||||
|
||||
| Framework | Packages |
|
||||
| --------- |:-------------:|
|
||||
|Symfony|[PhoneNumberBundle](https://github.com/misd-service-development/phone-number-bundle)|
|
||||
|Symfony|[PhoneNumberBundle](https://github.com/odolbeau/phone-number-bundle)|
|
||||
|Laravel|[Laravel Phone](https://github.com/Propaganistas/Laravel-Phone)|
|
||||
|Yii2|[PhoneInput](https://github.com/Borales/yii2-phone-input)|
|
||||
|Kohana|[PhoneNumber](https://github.com/softmediadev/kohana-phonenumber)|
|
||||
|TYPO3|[TYPO3 Phone Extension](https://github.com/simonschaufi/typo3-phone)|
|
||||
|
||||
These packages are supplied by third parties, and their quality can not be guaranteed.
|
||||
|
||||
Reference in New Issue
Block a user