Alexander Makarov

Results 1745 comments of Alexander Makarov

It was forbidden to override default validator while solving the issue: https://github.com/yiisoft/yii2/pull/14499 If it can be fixed without breaking that case again we can have it.

@rhertogh do you have a use-case for it or is it based mainly on the contradiction of current code with phpdoc?

@rhertogh maybe. I've posted there in a discussion.

1. That might break things. Incorrectly assumed things but still. 2. There is a performance hit. 3. Can it be done with `is_callable([$object, $method])`?

Well, could be solved like this: https://3v4l.org/aCl1r See `checkOutsideContextFromInside()`. Liklely that is way faster than reflection + backtracing.

That's called "friendly classes" and it is fine. It works the same way as PHP works for classes.

> Is PHP visibility compliance worth a few milliseconds of processing time for a commonly used feature? Could be since it is basically everywhere in Yii2.

I'm not saying that we should not fix it. I'm insisting on doing the benchmarks before applying any solution and checking if the performance drop is significant.

@belisoful do you have some time to prepare a pull request with some tests and the code changes (and maybe a benchmark)? Having the tests we can optimize the code...