Re: [RFC] [Under Discussion] New Curl URL API

From: Date: Thu, 30 Jun 2022 16:48:02 +0000
Subject: Re: [RFC] [Under Discussion] New Curl URL API
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-118142@lists.php.net to get a copy of this message
Hi all, > - The new CurlUrl class should probably be immutable from the start. It > was my biggest mistake not to do that with DateTime. > > After thinking about it and some discussions, I followed Derick's recommendation and therefore changed the RFC to make the CurlUrl class immutable. All the setters were replaced by new with* methods. For example setHost is now withHost and will return a new object with the host modified. This will prevent confusing behavior where the CurlUrl object would be unintentionally modified after being attached to a CurlHandle. Pierrick

« previous php.internals (#118142) next »