answear/econt-pickup-point-bundle
GetOffices, GetCities commands) via Symfony’s DI, enabling decoupled usage (e.g., calling commands from controllers, services, or CLI).config/packages/answear_econt.yaml, simplifying environment-specific deployments (dev/staging/prod).symfony/http-client).HttpClient or Guzzle 7.symfony/http-client or Guzzle 7 be integrated without conflicts?| Component | Symfony Fit | Laravel Fit | Notes |
|---|---|---|---|
| Dependency Injection | Native (Symfony DI) | Requires manual binding (e.g., Laravel’s bind()) |
Laravel may need a facade/service wrapper. |
| HTTP Client | Uses Symfony’s HttpClient |
Uses Guzzle 7 (compatible) | Laravel’s HTTP client can also work. |
| Configuration | config/packages/*.yaml |
config/econt.php (custom) |
Laravel would need a config publisher. |
| Commands | Symfony Console components | Laravel Artisan commands | Commands can be adapted to Laravel’s CLI. |
| Response Handling | PSR-7 responses | PSR-7 or Laravel collections | Minimal adaptation needed. |
composer require answear/econt-pickup-point-bundle
config/bundles.php (auto-generated by Flex).config/packages/answear_econt.yaml.use Answear\EcontBundle\Command\GetOffices;
public function __construct(private GetOffices $getOffices) {}
GetOffices command in PHPUnit.HttpClient (if needed):
composer require guzzlehttp/guzzle symfony/http-client
config/econt.php:
return [
'user' => env('ECONT_USERNAME'),
'password' => env('ECONT_PASSWORD'),
];
namespace App\Services;
use Answear\EcontBundle\Command\GetOffices;
use Answear\EcontBundle\Request\GetOfficesRequest;
use Symfony\Component\HttpClient\HttpClient;
class EcontService {
public function getOffices(): array {
$client = HttpClient::create();
$command = new GetOffices($client);
return $command->getOffices(new GetOfficesRequest())->toArray();
}
}
Facades\Econt::getOffices();
HttpClient or use Laravel’s HTTP tests.GetOffices, GetCities).How can I help you explore Laravel packages today?