PHPackages                             fsi/teryt-database-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. fsi/teryt-database-bundle

ActiveSymfony-bundle

fsi/teryt-database-bundle
=========================

Teryt database bundle

5.0.0(3mo ago)517.2k↓39.3%14MITPHPPHP ^8.1CI passing

Since Apr 19Pushed 3mo ago10 watchersCompare

[ Source](https://github.com/fsi-open/teryt-database-bundle)[ Packagist](https://packagist.org/packages/fsi/teryt-database-bundle)[ RSS](/packages/fsi-teryt-database-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (24)Versions (12)Used By (0)

Teryt Database Bundle
=====================

[](#teryt-database-bundle)

Teryt is Poland territorial division database available at This bundle adds commands that download files from teryt API, parse xml files and insert data into database.

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

[](#installation)

Add to your `composer.json` file following line

```
"require": {
    "fsi/teryt-database-bundle": "^3.0"
}
```

Register bundles in `AppKernel.php`

```
public function registerBundles()
{
    return [
        // ...
        new FSi\Bundle\TerytDatabaseBundle\FSiTerytDbBundle(),
        new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
        // ...
    ];
}
```

Add following configuration:

```
fsi_teryt_db:
    api:
        url: "https://uslugaterytws1.stat.gov.pl/wsdl/terytws1.wsdl"
        username: ""
        password: ""
```

From now commands should be available in your application.

Download XML files from teryt page
----------------------------------

[](#download-xml-files-from-teryt-page)

```
$ cd project
$ php app/console teryt:download:territorial-division
$ php app/console teryt:download:places-dictionary
$ php app/console teryt:download:places
$ php app/console teryt:download:streets

```

All above commands have an additional argument `--target`, that allows you to download files in a place other than `"%kernel.root_dir%/teryt/` (default download target folder).

Import data from XML files to database
--------------------------------------

[](#import-data-from-xml-files-to-database)

First you need to unzip the downloaded .zip files.

```
$ cd project/app/teryt
$ unzip territorial-division.zip
$ unzip places-dictionary.zip
$ unzip places.zip
$ unzip streets.zip
```

It is important to execute following commands in the given order:

```
$ cd project
$ php app/console doctrine:schema:update --force
$ php app/console doctrine:fixtures:load
$ php app/console teryt:import:territorial-division app/teryt/TERC.xml
$ php app/console teryt:import:places-dictionary app/teryt/WMRODZ.xml
$ php app/console teryt:import:places app/teryt/SIMC.xml
$ php app/console teryt:import:streets app/teryt/ULIC.xml
```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 57.8% 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 ~358 days

Recently: every ~593 days

Total

11

Last Release

103d ago

Major Versions

1.0.x-dev → 2.0.x-dev2017-04-20

v2.0.0 → v3.0.02017-08-30

v3.0.1 → 4.0.x-dev2019-08-07

3.0.2 → 5.0.02026-02-04

PHP version history (4 changes)v1.0.0PHP &gt;=5.4

2.0.x-devPHP &gt;=7.0

4.0.x-devPHP &gt;=7.1

5.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/d59f4fb3ce9d43f785d44957fc66c4ac950c7b758469a987dc90369bf845fdcc?d=identicon)[chives](/maintainers/chives)

---

Top Contributors

[![chives](https://avatars.githubusercontent.com/u/1170578?v=4)](https://github.com/chives "chives (59 commits)")[![rn0](https://avatars.githubusercontent.com/u/15381?v=4)](https://github.com/rn0 "rn0 (32 commits)")[![szymach](https://avatars.githubusercontent.com/u/2230556?v=4)](https://github.com/szymach "szymach (5 commits)")[![JarekW](https://avatars.githubusercontent.com/u/4487772?v=4)](https://github.com/JarekW "JarekW (3 commits)")[![norberttech](https://avatars.githubusercontent.com/u/1921950?v=4)](https://github.com/norberttech "norberttech (3 commits)")

---

Tags

symfonybundleterytfsi

###  Code Quality

TestsBehat

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fsi-teryt-database-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/fsi-teryt-database-bundle/health.svg)](https://phpackages.com/packages/fsi-teryt-database-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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