tiamo / phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard.
42 stars 41 forks source link

Change Guzzle Client Options Programmatically #29

Closed mackieee closed 3 years ago

mackieee commented 3 years ago

For Local development where I needed to ignore self-signed certificate errors on send() - required the change of a protected property post-manager initialisation.

$manager->setHttpClientConfig([ "verify" => false ]);
tiamo commented 3 years ago

Hi @MackieeE, Why not use this?

$manager = new Management(['client_config' => ['verify' => false]])

mackieee commented 3 years ago

Hi @MackieeE, Why not use this?

$manager = new Management(['client_config' => ['verify' => false]])

My thinking was that as I create the $manager as a singleton instance in my controller - subsquent calls may need new settings. However I realise that's an unrealistic use-case :)