PHPackages                             it-blaster/ip-geo-base-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. [Database &amp; ORM](/categories/database)
4. /
5. it-blaster/ip-geo-base-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

it-blaster/ip-geo-base-bundle
=============================

Work with the IpGeoBase's database using Propel

v1.0.1(11y ago)01023MITPHPPHP &gt;=5.3.2

Since May 20Pushed 11y ago8 watchersCompare

[ Source](https://github.com/it-blaster/ip-geo-base-bundle)[ Packagist](https://packagist.org/packages/it-blaster/ip-geo-base-bundle)[ Docs](https://github.com/it-blaster/ip-geo-base-bundle)[ RSS](/packages/it-blaster-ip-geo-base-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

IpGeoBaseBundle
===============

[](#ipgeobasebundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a5d174aac719b29880c4fd4d0510f19a400777257f1fa4cd77b877cef9edaa12/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/it-blaster/ip-geo-base-bundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/eadcd10e84c346e883c8be5a50ccf14b17b8e37f0521977f27f03425fab7615a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/it-blaster/ip-geo-base-bundle/build-status/master)[![License](https://camo.githubusercontent.com/d144277e26ef38dfec64df216ad0bec6c7848b809353e058ebb0aee1070aafd5/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/it-blaster/ip-geo-base-bundle)[![Total Downloads](https://camo.githubusercontent.com/3f25bb566220210e68a0046e898fafd982cefb28e3d49a190f42dfdc1264d405/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/it-blaster/ip-geo-base-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/c26c91fe83de281cc0be23a5bb3179263fc998bc85ebe6be9aafc2d375813640/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f762f756e737461626c652e737667)](https://packagist.org/packages/it-blaster/ip-geo-base-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/750958cce36dd733c10861834e732dab4787b31788d5dcafdff8ebc9cc5edd17/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f69702d67656f2d626173652d62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/it-blaster/ip-geo-base-bundle)

Work with the IpGeoBase's database using Propel

Installation:
-------------

[](#installation)

**1.** Add `it-blaster/ip-geo-base-bundle` to your `composer.json`:

```
...
"require": {
    "it-blaster/ip-geo-base-bundle": "1.0.*"
}
...
```

**2.** Register the bundle in `AppKernel.php`:

```
...
new Fenrizbes\IpGeoBaseBundle\FenrizbesIpGeoBaseBundle(),
...
```

**3.** Build models, generate and apply a migration.

**4.** Run a command that imports all the IpGeoBase data:

```
php app/console ipgeobase:update
```

Usage:
------

[](#usage)

The bundle's service `ip_geo_base` contains two methods:

1. `getIpInfo` returns information about IP (a range and a country code) or `null`.
2. `getIpCity` returns an instance of a GeoCity model or `null`. You can configure the default city which is returned if there is no any right city in the database (see the `Configuration` section).

By default the IP-address is taken from Symfony Request but you can pass it manually if you want:

```
$this->get('ip_geo_base')->getIpInfo('92.242.13.250');
```

Configuration
-------------

[](#configuration)

There are two optional parameters that you can set:

1. `default_city` - the default city ID. You can look it out in the `geo_city` table.
2. `enabled` - the state of IP detection service (default `true`). You can set `false` if you need to disable this service for a while. In this case the `getIpCity` method will always return `null` or the default city (if it configured).

An example:

```
fenrizbes_ip_geo_base:
    default_city: 2732
    enabled: false
```

Import and update data
----------------------

[](#import-and-update-data)

The bundle contains a command which import data (if you run it first time) or update it:

```
php app/console ipgeobase:update
```

By default the data file is taken from `http://ipgeobase.ru/files/db/Main/geo_files.zip` URL. If you want to change the data source you can pass your URL to the `source` option:

```
php app/console ipgeobase:update --source="http://my-syte.com/geo_files.zip"
```

or download the archive by yourself and pass a local path:

```
php app/console ipgeobase:update --source="/path/to/geo_files.zip"
```

Also you have an ability to update the data from text files (but remember that they must be named the same way as ones in the IpGeoBase's archive):

```
php app/console ipgeobase:update --source="/path/to/cities.txt"
php app/console ipgeobase:update --source="/path/to/cidr_optim.txt"
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

4017d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11211873?v=4)[Iaroslav Gashuk](/maintainers/fenrizbes)[@fenrizbes](https://github.com/fenrizbes)

---

Tags

symfonypropelipgeobase

### Embed Badge

![Health badge](/badges/it-blaster-ip-geo-base-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/it-blaster-ip-geo-base-bundle/health.svg)](https://phpackages.com/packages/it-blaster-ip-geo-base-bundle)
```

###  Alternatives

[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1022.4k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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