lljaworski/ceidg-bundle
最新稳定版本:v1.1.4
Composer 安装命令:
composer require lljaworski/ceidg-bundle
包简介
Symfony bundle for CEIDG (Centralna Ewidencja i Informacja o Działalności Gospodarczej) integration
README 文档
README
Symfony bundle for integrating with CEIDG (Centralna Ewidencja i Informacja o Działalności Gospodarczej) - the Polish Central Register and Information on Business.
Overview
This bundle provides a foundation for integrating CEIDG API services into your Symfony 7.3+ application with API Platform 4.2 support.
Requirements
- PHP 8.2 or higher
- Symfony 7.0 or higher
- Symfony HTTP Client component
Installation
Step 1: Install via Composer
composer require lljaworski/ceidg-bundle
Step 2: Enable the Bundle
If you're not using Symfony Flex, add the bundle to config/bundles.php:
return [ // ... LukaszJaworski\CeidgBundle\CeidgBundle::class => ['all' => true], ];
Step 3: Configure the Bundle
Create a configuration file config/packages/ceidg.yaml:
ceidg: api_url: '%env(CEIDG_API_URL)%' api_key: '%env(CEIDG_API_KEY)%'
Step 4: Set Environment Variables
Add the following to your .env file:
CEIDG_API_URL=https://dane.biznes.gov.pl/api/ceidg/v2 CEIDG_API_KEY=your_api_key_here
You can obtain your CEIDG API key from https://dane.biznes.gov.pl/.
Configuration
Default configuration:
ceidg: api_url: 'https://dane.biznes.gov.pl/api/ceidg/v2' # Default CEIDG API URL api_key: '' # Required: Your CEIDG API key
Structure
ceidg-bundle/
├── src/
│ ├── CeidgBundle.php # Main bundle class
│ ├── DependencyInjection/ # Symfony DI configuration
│ ├── Service/ # Business logic services
│ ├── Command/ # Console commands
│ ├── Entity/ # Doctrine entities
│ ├── Repository/ # Database repositories
│ ├── ApiResource/ # API Platform resources
│ └── State/ # API Platform state providers/processors
├── config/
│ └── services.yaml # Service definitions
├── tests/
│ ├── Unit/ # Unit tests
│ └── Functional/ # Functional tests
├── composer.json
└── README.md
Development
Running Tests
cd ceidg-bundle
vendor/bin/phpunit
Adding Services
Place your services in src/Service/ directory. They will be automatically registered and available for autowiring.
Adding Commands
Create console commands in src/Command/ directory. They will be automatically tagged as console commands.
Adding API Resources
Create API Platform resources in src/ApiResource/ directory with corresponding state providers/processors in src/State/.
Architecture
This bundle follows:
Links
Licensecomposer.json with proper repository information
- Set up CI/CD for independent testing
- Publish to Packagist
- Update main project to use the package via Composer
License
MIT
Authors
- Lukasz Jaworski
Contributing
Contributions are welcome! Please submit pull requests with tests and documentation.
Support
For issues and questions, please use the GitHub issue tracker.
统计信息
- 总下载量: 139
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-30