Hello :-),
Thank you for the RFC. I really appreciate it, for sure, but I would
like to raise a concern regarding the atoum test framework [1].
atoum provides 3 mock engines, resp. for class-like entitites,
functions, and constants.
The function and constant mock engines are both based on the same
principle, i.e. it relies on the “entity bubble look up resolution”
algorithm to mock functions or constants. Typically, one might mock the
`file_exists` function like this: `$this->function->file_exists =
function (…) { … };`. In this case, atoum creates a new `file_exists`
function in the same namespace than the system under test (if testing
`A\B\C`, then atoum creates `A\B\file_exists`).
It is a very convinient and beloved way to mock functions and constants.
And thus, this RFC raises the following issue: *This feature is used a
lot by atoum users. The RFC will destroy this feature. It's not about
atoum loosing a master feature, it's more about: How users will be able
to mock functions and constants after that? This is an important question*.
That's a hard question to answer, I know, but in its actual form, the
RFC breaks a non-negligeable part of the testing ecosystem. This is
something to take into account :-).
It is still possible to use moles instead of mocks to achieve the same
behavior, but restricted to user-defined functions only. Moles do not
allow to change the behavior of “VM-defined” functions.
Regards.
[1] http://atoum.org/
On 03.02.18 09:27, Wes wrote:
Hello PHPeople. I just published the RFC "Deprecation of fallback to root
scope".
It is quite a substantial change, but as you can read in the RFC, can be a
(basically) transparent one.
I'm referring to the possibility to shim it in userland. Essentially, this
would move the feature from core to userland.
I hope you like it. Let me know what you think.
https://wiki.php.net/rfc/fallback-to-root-scope-deprecation
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php