Am 26.08.2011 09:51, schrieb Ferenc Kovacs:
> would this method give the same result as
> unserialize("O:8:\"stdClass\":0:{}") for example?
That is the whole point of it, yes.
--
Sebastian BergmannCo-Founder and Principal Consultant
http://sebastian-bergmann.de/
On Thu, Aug 25, 2011 at 11:46 AM, Sebastian Bergmann wrote:
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
>
> As there are certain internal cl
2011/8/25 Patrick ALLAERT :
> 2011/8/25 Gustavo Lopes :
>> You could fetch the parent and do the same check, and so on.
>
> Checking only the topmost should be enough if traversing the whole
> inheritance could be avoided.
Well, of course I highly second the opinion that not making
distinction and
2011/8/25 Gustavo Lopes :
> You could fetch the parent and do the same check, and so on.
Checking only the topmost should be enough if traversing the whole
inheritance could be avoided.
> I think you
> might be able to just check whether ce.create_object is not NULL, because if
> the internal cla
Sebastian,
This is a hidden gem for us! =D
Thanks a lot for putting your effort into this.
Cheers,
On Thu, Aug 25, 2011 at 11:03 AM, Benjamin Eberlei wrote:
> Thanks for working on this Sebastian, its really appreciated! +1 from me!
>
> On Thu, Aug 25, 2011 at 3:27 PM, Sebastian Bergmann wrote
Thanks for working on this Sebastian, its really appreciated! +1 from me!
On Thu, Aug 25, 2011 at 3:27 PM, Sebastian Bergmann wrote:
> On 08/25/2011 02:54 PM, Gustavo Lopes wrote:
>
>> You could fetch the parent and do the same check, and so on. I think you
>> might be able to just check whether
On 08/25/2011 02:54 PM, Gustavo Lopes wrote:
You could fetch the parent and do the same check, and so on. I think you
might be able to just check whether ce.create_object is not NULL, because
if the internal class doesn't replace create_object, there's no chance of
that class of crashes occurring
On Thu, 25 Aug 2011 13:41:27 +0100, Sebastian Bergmann
wrote:
On 08/25/2011 01:46 PM, Gustavo Lopes wrote:
What about userland classes that extend internal classes?
Good point. How would I implement such a check?
You could fetch the parent and do the same check, and so on. I think you
On Thu, Aug 25, 2011 at 14:54, Etienne Kneuss wrote:
> Hi,
>
> On Thu, Aug 25, 2011 at 14:49, Sebastian Bergmann wrote:
>> On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote:
>>>
>>> Speaking of which, wouldn't it be easier to check all our internal
>>> classes for such failures and fix them acco
Hi,
On Thu, Aug 25, 2011 at 14:49, Sebastian Bergmann wrote:
> On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote:
>>
>> Speaking of which, wouldn't it be easier to check all our internal
>> classes for such failures and fix them accordingly with this addition
>> (Fix the dont-crash-without-calli
On Thu, Aug 25, 2011 at 2:41 PM, Sebastian Bergmann wrote:
> On 08/25/2011 01:46 PM, Gustavo Lopes wrote:
>>
>> What about userland classes that extend internal classes?
>
> Good point. How would I implement such a check?
Checking the same thing than what instanceof does
Cheers,
--
Pierre
@p
Hi,
On Thu, Aug 25, 2011 at 14:43, Sebastian Bergmann wrote:
> On 08/25/2011 02:39 PM, Etienne Kneuss wrote:
>>
>> To me this feature makes no sense. But if people find use for it and
>> it remains in Reflection, I won't object to it, so +0.
>
> It should only be used for meta programming, of co
On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote:
Speaking of which, wouldn't it be easier to check all our internal
classes for such failures and fix them accordingly with this addition
(Fix the dont-crash-without-calling-constructor)?
We could do like that of above and cast an exception inst
Hi
2011/8/25 Sebastian Bergmann :
> Good point. How would I implement such a check?
Speaking of which, wouldn't it be easier to check all our internal
classes for such failures and fix them accordingly with this addition
(Fix the dont-crash-without-calling-constructor)?
We could do like that of
On 08/25/2011 02:39 PM, Etienne Kneuss wrote:
To me this feature makes no sense. But if people find use for it and
it remains in Reflection, I won't object to it, so +0.
It should only be used for meta programming, of course ;-)
If an internal class can't behave well without a constructor ca
On 08/25/2011 01:46 PM, Gustavo Lopes wrote:
What about userland classes that extend internal classes?
Good point. How would I implement such a check?
--
Sebastian BergmannCo-Founder and Principal Consultant
http://sebastian-bergmann.de/ http://th
Hi,
On Thu, Aug 25, 2011 at 11:46, Sebastian Bergmann wrote:
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
To me this feature makes no sense.
On 08/25/2011 02:26 PM, Richard Quadling wrote:
Wouldn't ReflectionClass::newMockInstance() be a better name?
It is not specific to stubbing/mocking.
What other use cases exists?
ORM and stubbing/mocking should be enough.
--
Sebastian BergmannCo-Founder and Principal
On 25 August 2011 10:46, Sebastian Bergmann wrote:
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
>
> As there are certain internal classes tha
2011/8/25 Sebastian Bergmann :
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
>
> As there are certain internal classes that would "crash" when
On Thu, 25 Aug 2011 10:46:21 +0100, Sebastian Bergmann
wrote:
I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
implements ReflectionClass::newInstanceWithoutConstructor() to create
an
object a class without invoking the constructor.
As there are certain intern
hi,
On Thu, Aug 25, 2011 at 11:46 AM, Sebastian Bergmann wrote:
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
>
> As there are certain intern
I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
implements ReflectionClass::newInstanceWithoutConstructor() to create an
object a class without invoking the constructor.
As there are certain internal classes that would "crash" when their
constructor is not invoked, this
23 matches
Mail list logo