yoanbernabeu / recherche-entreprises-bundle
Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/yoanbernabeu/recherche-entreprises-bundle
Requires
- symfony/config: ^7.3
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/http-client: ^7.3
- symfony/http-kernel: ^7.3
Requires (Dev)
- phpunit/phpunit: ^11.0
- symfony/phpunit-bridge: ^7.3
This package is auto-updated.
Last update: 2025-10-27 18:07:40 UTC
README
Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français.
📦 Installation
composer require yoanbernabeu/recherche-entreprises-bundle
⚙️ Configuration (optionnelle)
# config/packages/yoanbernabeu_recherche_entreprises.yaml yoan_bernabeu_recherche_entreprises: timeout: 10 # Timeout en secondes (défaut: 10)
🚀 Utilisation
Dans un Contrôleur
use YoanBernabeu\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