phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.77k stars 1.97k forks source link

[BUG]: PHP crashes without any message when trying mocking classes, inherited from Phalcon\Mvc\Model #16096

Closed ktsv closed 1 year ago

ktsv commented 1 year ago

[BUG]: PHP crashes without any message when trying mocking classes, inherited from Phalcon\Mvc\Model

Create test, mock any class, inherited from Phalcon\Mvc\Model.

        $this->entity = $this->createMock(Entity::class);

I expect mock to be returned Actually system fails without any message

ktsv commented 1 year ago

this probably happens because some methodh in Phalcon (I was able to find few besides this one) have null as return type

Jeckerson commented 1 year ago

Related https://github.com/phalcon/cphalcon/issues/16080

Jeckerson commented 1 year ago

Already fixed in https://github.com/phalcon/cphalcon/issues/16080

Jeckerson commented 1 year ago

This issue will be used to fix another similar bugs.

niden commented 1 year ago

Resolved in https://github.com/phalcon/cphalcon/pull/16100

Thank you @ktsv