steph612 / entreprise-search-bundle
Bundle Symfony pour l'utilisation de l'API : Recherche d'entreprises du gouvernement français
Package info
github.com/Steph612/entreprise-search-bundle
Type:symfony-bundle
pkg:composer/steph612/entreprise-search-bundle
v0.2.0
2026-03-22 00:25 UTC
Requires
- symfony/config: ^7.4
- symfony/console: ^7.4
- symfony/dependency-injection: ^7.4
- symfony/http-client: ^7.4
- symfony/http-kernel: ^7.4
Requires (Dev)
- phpunit/phpunit: ^11.5
- symfony/phpunit-bridge: ^7.4
README
Bundle Symfony pour l'API Recherche d'entreprises
📦 Installation
composer require stay612/recherche-entreprises-bundle
⚙️ Configuration (optionnelle)
# config/packages/steph612_entreprise_search.yaml steph612_entreprise_search: timeout: 10 # Timeout en secondes (défaut: 10)
🚀 Utilisation
Dans un Contrôleur
use Steph612\EntrepriseSearchBundle\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 steph612:search-entreprise carrefour # Par SIREN (détails complets) php bin/console steph612:search-entreprise 652014051 --siren
📊 Modèles
SearchResult: Résultat paginéEntreprise: Données d'entrepriseSiege: Établissement siège
🧪 Tests
vendor/bin/phpunit --testdox
📝 Licence
MIT