PHPackages                             ggggino/italy-municipality - 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. ggggino/italy-municipality

ActiveSymfony-bundle

ggggino/italy-municipality
==========================

This bundle contains the list of the regions, province of Italy

1.0.1(7y ago)0411[1 PRs](https://github.com/GGGGino/ItalyMunicipalityBundle/pulls)MITPHPPHP ^5.6|^7.0

Since Jan 20Pushed 4y agoCompare

[ Source](https://github.com/GGGGino/ItalyMunicipalityBundle)[ Packagist](https://packagist.org/packages/ggggino/italy-municipality)[ Docs](https://github.com/GGGGino)[ RSS](/packages/ggggino-italy-municipality/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

GGGGinoItalyMunicipalityBundle
==============================

[](#gggginoitalymunicipalitybundle)

[![Build Status](https://camo.githubusercontent.com/83dcdb99b5cf3af543402175969f037ab8f72acc5040c7d1196e9a37b830851c/68747470733a2f2f7472617669732d63692e636f6d2f47474747696e6f2f4974616c794d756e69636970616c69747942756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/GGGGino/ItalyMunicipalityBundle)

> A list of the updated regions, provinces of Italy taken from ISTAT with some useful utility.

> The content of the ISTAT file will be saved in cache

Get started
===========

[](#get-started)

Get the service

```
/** @var IstatRetrivier $retrivier */
$retrivier = $this->get(IstatRetrivier::class);
```

Get all the municipalities

```
/** @var CsvLine[] $municipalities */
$municipalities = $retrivier->getMunicipalities();
```

Get all the provinces

```
/** @var CsvLine[] $provinces */
$provinces = $retrivier->getProvinces();
```

Get all the regions

```
/** @var CsvLine[] $regions */
$regions = $retrivier->getRegions();
```

Get by some custom procedure

```
/** @var CsvLine[] $lines */
$retrivier->getBy(function($csvLines) {
    /** @var CsvLine[] $regions */
    $regions = array();

    /** @var CsvLine $line */
    foreach($csvLines as $line) {
        if( !array_key_exists($line->codiceProvincia, $regions) ){
            $regions[$line->codiceProvincia] = $line;
        }
    }

    return $regions;
}, 'string_used_as_key_if_you_want_to_push_to_cache_otherwise_not_pushed');
```

Form Types
==========

[](#form-types)

NameDescriptionMunicipalityType::classForm for displaying a list of all the *Municipalities* in ItalyProvinceType::classForm for displaying a list of all the *Provinces* in ItalyRegionType::classForm for displaying a list of all the *Regions* in Italy```
$formMapper
    ->add('comune',MunicipalityType::class)
    ->add('provincia', ProvinceType::class)
    ->add('regione', RegionType::class)
```

Commands
========

[](#commands)

NameDescriptionggggino:italy\_municipality:downloadCommand to download the list from ISTATggggino:italy\_municipality:get\_lineDump the main information of the searched lines

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

2

Last Release

2669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71ba17da078527d84402fef98be186df83af523d0896e98907904efea4336b5d?d=identicon)[ggggino](/maintainers/ggggino)

---

Top Contributors

[![GGGGino](https://avatars.githubusercontent.com/u/3227441?v=4)](https://github.com/GGGGino "GGGGino (30 commits)")

---

Tags

symfonyregionprovinceitalyitaliaregioni

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ggggino-italy-municipality/health.svg)

```
[![Health](https://phpackages.com/badges/ggggino-italy-municipality/health.svg)](https://phpackages.com/packages/ggggino-italy-municipality)
```

###  Alternatives

[a2lix/translation-form-bundle

Translate your doctrine objects easily with some helpers

3376.9M38](/packages/a2lix-translation-form-bundle)[a2lix/auto-form-bundle

Automate form building

873.8M11](/packages/a2lix-auto-form-bundle)[pugx/autocompleter-bundle

Add an autocomplete type to forms

93861.6k3](/packages/pugx-autocompleter-bundle)[craue/config-bundle

Database-stored settings made available via a service for your Symfony project.

1771.0M4](/packages/craue-config-bundle)[isometriks/spam-bundle

Provides spam protection for Symfony forms

46200.6k1](/packages/isometriks-spam-bundle)[nucleos/profile-bundle

Registration and profile management for symfony

12218.5k1](/packages/nucleos-profile-bundle)

PHPackages © 2026

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