Download the PHP package addon/kodifikator without Composer
On this page you can find all versions of the php package addon/kodifikator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download addon/kodifikator
More information about addon/kodifikator
Files in addon/kodifikator
Package kodifikator
Short Description Parser and importer for the Ukrainian Codifier of Administrative-Territorial Units
License CC-BY-4.0
Informations about the package kodifikator
🇺🇦 Kodifikator Parser & Importer
Parser and importer for the Codifier of Administrative-Territorial Units and Territorial Communities of Ukraine.
This Symfony-based project automates the process of parsing, downloading, and importing the official Ukrainian
Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад КАТОТТГ
into your application.
Source
Official government page:
🔗 mindev.gov.ua
License: CC BY 4.0
Features
- Automatically parses the latest codifier release from the official site.
- Downloads and stores XLSX, PDF, DOCX versions of the document.
- [NEW] Supports local offline import for cases when the remote server is unavailable or custom historical files are required.
- Imports XLSX data into your database using Doctrine.
- Batch processing for optimized performance with large datasets.
- Symfony Console command and HTTP API endpoints available.
Requirements
PHP Extensions
php-gdphp-zipphp-xmlphp-mbstring
Composer Dependencies
Installation
- Clone the repository
-
Set the environment variable for storage:
-
Register services in config/services.yaml
-
Register Doctrine mapping in config/packages/doctrine.yaml:
- Ensure the storage directory exists and is writable:
Install via Composer:
Usage
Remote Mode (Automatic)
Run the full fetch and import process via Symfony Console:
Or call via HTTP API (if exposed):
Local Mode (Offline/Manual)
To import a specific XLSX file already located in the var/kodifikator/ directory without making HTTP requests to external servers:
Example:
Optimization Notes
This project handles large XLSX datasets efficiently:
- Batch inserts: Processes 300 rows at a time
- Hash upsert: Prevents duplicates using computed hash key
- Streaming: XLSX rows are processed with minimal memory
Supports large files with 30,000+ rows.
Structure
| Component | Description |
|---|---|
KodifikatorParser |
Parses the official government page |
KodifikatorUploader |
Downloads XLSX/PDF/DOCX files and stores metadata |
KodifikatorImport |
Reads and imports XLSX content into the database |
KodifikatorLocalImporter |
Emulates upload metadata and directly triggers the XLSX import pipeline for local files |
KodifikatorController |
Optional API interface for triggering actions |
KodifikatorUpdateCommand |
Symfony Console command for full update |
License
This project uses publicly available government data under the
Creative Commons Attribution 4.0 International License (CC BY 4.0).
Changelog
[2026-07-04] - Local File Processing Implementation
Added
KodifikatorLocalImporter service: Developed to mock the application registry state for local files. It injects a virtual record into the local documents database, skipping the external parsing/download pipeline while seamlessly redirecting execution to the primary high-performance core parsing system (KodifikatorImport).
KodifikatorImportLocalCommand Symfony command: Created a flexible CLI tool (kodifikator:import-local) accepting localized targets and descriptive metadata arguments, complete with localized (Ukrainian) configuration hints.
Why these changes were introduced
Previously, the module strictly depended on a live connection to the official government website (mindev.gov.ua), making the initial staging deployment or localized development tasks fragile if remote resources were temporarily unreachable or structured differently.
All versions of kodifikator with dependencies
guzzlehttp/guzzle Version ^7.9
symfony/dom-crawler Version ^6.0
symfony/css-selector Version ^6.0
phpoffice/phpspreadsheet Version ^4.4