magento-cloud-docker
magento-cloud-docker copied to clipboard
Add additional options for PCOV
https://github.com/krakjoe/pcov Can be used like xdebug, but is a lot more lightweight.
This will allow phpstorm to run code coverage reports very quickly: https://www.jetbrains.com/phpstorm/whatsnew/#ml-assisted-ranking-for-code-completion
PCOV was already added in an earlier PR, but it is missing the optional flag, and it also needs to not run in the xdebug container. https://github.com/magento/magento-cloud-docker/pull/136
This should be optional, with a flag --with-pcov and additionally, it should be installed into the normal CLI container, so that phpstorm can access.
One note:
interoperability with Xdebug is not possible interoperability with phpdbg is not possible
This means that the two options cannot be used in the same containers, this is ok as we do not run xdebug in the CLI or FPM container, they have their own containers and are routed to from nginx.
@aepod for some reason I recall us adding PCOV already. See: https://github.com/magento/magento-cloud-docker/pull/136 Didn't that work for you?
I missed that, good to go now. Thanks Yev!
Actually:
- It does not have the logic to not run this in the xdebug container, if this extension loads there it will cause problems.
- It is not an "optional" extension, should probably not be forced, like xdebug it should be a choice and not run in places like production.
So this Request is going to get changed, to improve these two things.
@aepod
Hi!
https://github.com/magento/magento-cloud-docker/issues/196#issuecomment-617897362, pcov
extension has already been added.
I think that the maximum that can be added here is if you try to enable these two extensions (xdebug
and pcov
) at the same time, then show a warning that this can lead to problems
Do you agree with me?
Note that when pcov extension is enabled blackfire profiling is not working correctly anymore, it does not show php path file of inspected scripts.