aurelbichop/recherche-entreprises-bundle

Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français

Maintainers

Package info

github.com/AurelBichop/bundle-search-entreprise

Type:symfony-bundle

pkg:composer/aurelbichop/recherche-entreprises-bundle

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.0 2025-11-23 20:46 UTC

This package is auto-updated.

Last update: 2026-03-24 15:45:23 UTC


README

Recherche Entreprises Bundle

Tests

Bundle Symfony pour l'API Recherche d'entreprises du gouvernement français.

📦 Installation

composer require aurelbichop/recherche-entreprises-bundle

⚙️ Configuration (optionnelle)

# config/packages/aurelbichop_recherche_entreprises.yaml
aurel_bichop_recherche_entreprises:
    timeout: 10  # Timeout en secondes (défaut: 10)

🚀 Utilisation

Dans un Contrôleur

use AurelBichop\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'entreprise
  • Siege : Établissement siège

🧪 Tests

vendor/bin/phpunit --testdox

📝 Licence

MIT