Re: [PSR-11] Review: should the container ALWAYS return the same instance?

2016-11-04 Thread Théo FIDRY
It may be naive of me, but the must is a no go: I personally never need it but I believe that if most DIC out there have a `share` option to have control on that behaviour, there is a reason and valid use cases. Returning or not the same instance should depend on how you are registering your se

Re: [PSR-7] Opinions requested on potential patch

2016-08-05 Thread Théo FIDRY
>Additionally, `@return static` has a *connotation* that a new instance, not the same instance, is being returned, which is the specific semantic we already define within the PSR-7 interfaces. >From PSR-5: >`self`, the element to which this type applies is of the same class as which the docu

Re: [PSR-13] "With-er" methods

2016-07-29 Thread Théo FIDRY
Although it's not proper english, "Wither" has the advantage to be 1. simple (with -> wither) and in line with "getter" and "setter". There may be a better word to describe those non-static factories, but "wither" is good enough IMO. Théo F