Download the PHP package serendipity_hq/component-geo-builder without Composer

On this page you can find all versions of the php package serendipity_hq/component-geo-builder. 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 component-geo-builder

Serendipity HQ Geo Builder

Parses the exports of countries from Geonames and exports the data in machine readable formats.
It downloads information of countries from [Geonames exports](https://www.geonames.org/export/zip/).
Ready to be integrated in Symfony apps.

Supports

Tested on

Current Status

Coverage Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities

Phan PHPStan PSalm PHPUnit Composer PHP CS Fixer Rector

Features


Do you like this library?
LEAVE A ★

or run
composer global require symfony/thanks && composer thanks
to say thank you to all libraries you use in your current project, this included!


Installation and Configuration

Install Component GeoBuilder via Composer

composer req serendipity_hq/component-geo-builder

This library follows the http://semver.org/ versioning conventions.

However, until the version 1, the minor release is treated like a major one.

So it is possible a break in the public API between minor versions (0.1 > 0.2 > 0.3).).

The component is anyway stable and can be used in production, also if it is not very flexible.

See the issues to know more about what we have in mind to implement.

Register the command in a Symfony application

Open the file config/services.yaml and add the class of the geobuilder command:

Building the list you need

To build the list you need, simply launch the command geobuilder:build appending the countries you want to build lists for:

By default the command uses the Hierarchy reader and will create a lot of json files in the kernel.cache_dir/geobuilder folder of your Symfony App.

You can read more about readers, saving folders and more reading the full documentation.

For the moment, let's continue putting GeoBuilder at work.

The next step is to create a form with the data we have just built.

Creating the form

To use the form types, you need to register them as services, so they can be properly initialized by Symfony.

To register them, open the file config/services.yaml and add the HierarchyJsonType:

Then in your form you can add the HierarchyJsonType:

About the countries.json file

This file will contain only the countries you built with the bin/console geobuilder:build command.

You can get a complete list of localized countries using the Countries::getNames() method of the symfony/intl component.

But the Symfony component will return all countries in the world, also if you didn't built them.


Do you like this library?
LEAVE A ★

or run
composer global require symfony/thanks && composer thanks
to say thank you to all libraries you use in your current project, this included!



All versions of component-geo-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-zip Version *
guzzlehttp/guzzle Version ^7.0
symfony/dom-crawler Version ^4.4|^5.4|^6.0
symfony/serializer Version ^4.4|^5.4|^6.0
thecodingmachine/safe Version ^1.3
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 serendipity_hq/component-geo-builder contains the following files

Loading the files please wait ....