Download the PHP package mgamadeus/ddd-common-political without Composer

On this page you can find all versions of the php package mgamadeus/ddd-common-political. 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 ddd-common-political

mgamadeus/ddd-common-political

Countries, languages, locales, political regions, states, and localities for the mgamadeus/ddd framework.

Installation

What it does

Reference data entities for political geography and localization:

Configuration (seed data)

The module ships with comprehensive seed data in config/app/Common/Political/:

File Contents
Countries.php 236 countries with multilingual names (20+ translations each), ISO codes, political region mapping, address settings
Languages.php 66 languages across 5 tiers with multilingual names, script codes
Locales.php 312 locale entries with date/time format rules
PoliticalRegions.php 6 continents + 15 sub-regions with UN M49 codes

Overriding config

Place a file at the same path in your project's config/app/Common/Political/ to override. Project config is searched before module config.

For example, to add a custom country or change an existing entry, create config/app/Common/Political/Countries.php in your project with the full array — it replaces the module's version entirely.

Service registration

Add to your project's services.yaml:

Importing seed data

The module provides services with importFromConfig() methods. Create admin endpoints in your app that call these services:

Import order

  1. PoliticalRegions first (countries reference them)
  2. Countries second (locales reference them)
  3. Languages third (locales reference them)
  4. Locales last (references both countries and languages)

Geocoding (via Argus)

States and localities can be geocoded via the Argus API:

These require ARGUS_API_ENDPOINT to be configured (see ddd-argus).

Overriding entities

Extend any entity in your project using the standard DDD override mechanism:

No services.yaml entry needed — the DDD\ → App\ fallback resolves it automatically.


All versions of ddd-common-political with dependencies

PHP Build Version
Package Version
Requires mgamadeus/ddd-argus Version ^1.0
mgamadeus/ddd Version ^2.10
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 mgamadeus/ddd-common-political contains the following files

Loading the files please wait ...