Re: Re: File_SearchReplace API and versioning

From: Date: Sun, 18 Dec 2005 22:10:52 +0000
Subject: Re: Re: File_SearchReplace API and versioning
References: 1 2 3 4 5 6 7 8  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-3341@lists.php.net to get a copy of this message
anatoly techtonik wrote: > ||*()*|| [\..konnichi wa, ogenki desu ka, Arnaud../] > > Monday, December 5, 2005, 10:17:48 PM, you wrote: > AL> Arnaud Limbourg wrote: >>>> Please answer this questions for me without reading package docs just >>>> to understand your POV. >>>> >>>> Does "doSearch(false)" construction make sense for you? >>>> What should it do if it does? >>>> Is it obvious for everybody else? >>>> What should doSearch() do in your opinion _by default_ in a >>>> package with doReplace() method? >>> If you were talking about a new package then yes. *But* >>> File_SearchReplace was released a long time ago and you cannot change a >>> default behaviour or you will break BC. >>> >>> Make it doSearch('search') if you want. >>> >>> Arnaud. > > AL> To follow up on that > > AL> Make it > > $class->>setReadOnly(true); > > AL> That way you offer the new behaviour while keeping BC. > > Neither this scheme is more clear. By default users think that this > package will do search. Do you understand that you are talking a stable package (to make it clear, the reasons why it is marked as stable are not what we are talking about here). If the documentation specifies that is does replace by default then it is fine, period. Arnaud.

« previous php.pear.qa (#3341) next »