PHPackages                             happyr/location-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. happyr/location-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

happyr/location-bundle
======================

A Symfony2 Bundle to handle geographic location of your entities

0.5.3(5y ago)45.2kMITPHPPHP ^5.4 || ^7.0

Since Sep 18Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Happyr/LocationBundle)[ Packagist](https://packagist.org/packages/happyr/location-bundle)[ Docs](http://developer.happyr.com/symfony2-bundles/location-bundle)[ RSS](/packages/happyr-location-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (23)Used By (0)

Happyr LocationBundle
=====================

[](#happyr-locationbundle)

A Symfony2 Bundle to handle locations. This provided a Locaiton object with differnet parts to clearly identify a location.

Installation
------------

[](#installation)

### 1. Install with composer:

[](#1-install-with-composer)

```
php composer.phar require happyr/location-bundle

```

### 2. Enable the bundle:

[](#2-enable-the-bundle)

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Happyr\LocationBundle\HappyrLocationBundle(),
    );
}
```

### 3. Add a geocoder

[](#3-add-a-geocoder)

You need to specify a geocoder service to in the coniguration. The geoder must inplement the [GeocoderInterface](/Geocoder/GeocoderInterface.php)

```
happyr_location:
    geocoder_service: 'acme.geocoder'
```

Usage
-----

[](#usage)

```
//any form
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('location', 'location', array(
                    'components'=>array(
                        'country'=>true,
                        'city'=>true,
                    )
                ));
    }
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~130 days

Recently: every ~466 days

Total

21

Last Release

2007d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3.2

0.5.0PHP ^5.4 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (115 commits)")

---

Tags

location

### Embed Badge

![Health badge](/badges/happyr-location-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/happyr-location-bundle/health.svg)](https://phpackages.com/packages/happyr-location-bundle)
```

###  Alternatives

[torann/geoip

Support for multiple Geographical Location services.

2.2k14.2M76](/packages/torann-geoip)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[spatie/geocoder

Geocoding addresses to coordinates

8404.8M15](/packages/spatie-geocoder)[kigkonsult/icalcreator

iCalcreator is the PHP implementation of rfc2445/rfc5545 and rfc updates, management of calendar information

2462.6M16](/packages/kigkonsult-icalcreator)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[spatie/google-time-zone

Get time zones for coordinates

110660.6k1](/packages/spatie-google-time-zone)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
