Download the PHP package commerceguys/addressing without Composer

On this page you can find all versions of the php package commerceguys/addressing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package addressing

addressing

Build Status

A PHP 8.0+ addressing library, powered by CLDR and Google's address data.

Manipulates postal addresses, meant to identify a precise recipient location for shipping or billing purposes.

Features:

Address formats and subdivisions were initially generated from Google's Address Data Service, and are now owned and maintained by the library.

Also check out commerceguys/intl for CLDR-powered languages/currencies/number formatting.

Data model

The address interface represents a postal address, with getters for the following fields:

Field names follow the OASIS eXtensible Address Language (xAL) standard.

The interface makes no assumptions about mutability. The implementing application can extend the interface to provide setters, or implement a value object that uses either PSR-7 style with* mutators or relies on an AddressBuilder. A default address value object is provided that can be used as an example, or mapped by Doctrine (preferably as an embeddable).

The address format provides the following information:

The country provides the following information:

The subdivision provides the following information:

Subdivisions are hierarchical and can have up to three levels: Administrative Area -> Locality -> Dependent Locality.

Formatters

Addresses are formatted according to the address format, in HTML or text.

DefaultFormatter

Formats an address for display, always adds the localized country name.

PostalLabelFormatter

Takes care of uppercasing fields where required by the format (to facilitate automated mail sorting).

Requires specifying the origin country code, allowing it to differentiate between domestic and international mail. In case of domestic mail, the country name is not displayed at all. In case of international mail:

  1. The postal code is prefixed with the destination's postal code prefix.
  2. The country name is added to the formatted address, in both the current locale and English. This matches the recommendation given by the Universal Postal Union, to avoid difficulties in countries of transit.

Validator

Address validation relies on the Symfony Validator library.

Checks performed:

Zones

Zones are territorial groupings often used for shipping or tax purposes. For example, a set of shipping rates associated with a zone where the rates become available only if the customer's address belongs to the zone.

A zone can match countries, subdivisions (states/provinces/municipalities), postal codes. Postal codes can also be expressed using ranges or regular expressions.

Examples of zones:

Integrations


All versions of addressing with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
doctrine/collections Version ^1.6 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package commerceguys/addressing contains the following files

Loading the files please wait ....