yassirchakiri / recherche-entreprises-bundle
Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français
Package info
github.com/chakiri/symfony-bundle
Type:symfony-bundle
pkg:composer/yassirchakiri/recherche-entreprises-bundle
v0.1.0
2025-12-14 17:06 UTC
Requires
- symfony/config: ^8.0
- symfony/console: ^8.0
- symfony/dependency-injection: ^8.0
- symfony/http-client: ^8.0
- symfony/http-kernel: ^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
- symfony/phpunit-bridge: ^8.0
README
Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français.
📦 Installation
composer require yassirchakiri/recherche-entreprises-bundle
⚙️ Configuration (optionnelle)
# config/packages/yassirchakiri_recherche_entreprises.yaml yassir_chakiri_recherche_entreprises: timeout: 10 # Timeout en secondes (défaut: 10)
🚀 Utilisation
Dans un Contrôleur
use YassirChakiri\RechercheEntreprisesBundle\Client\EntrepriseSearchClientInterface; public function __construct( private EntrepriseSearchClientInterface $entrepriseClient ) {} public function search(): Response { $result = $this->entrepriseClient->search('carrefour'); foreach ($result->results as $entreprise) { echo $entreprise->nomComplet . ' - ' . $entreprise->siren; } }
Recherche par SIREN
$entreprise = $this->entrepriseClient->findBySiren('652014051'); if ($entreprise) { echo $entreprise->nomComplet; }
Commande Console
# Recherche simple php bin/console recherche-entreprise:search carrefour # Par SIREN (détails complets) php bin/console recherche-entreprise:search 652014051 --siren
📊 Modèles
SearchResult: Résultat paginéEntreprise: Données d'entrepriseSiege: Établissement siège
🧪 Tests
vendor/bin/phpunit --testdox
📝 Licence
MIT