You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I would like to try few things with this lib (more to come) but I'm facing something strange. So I would like to know if this "normal".
I installed the lib as described in the INSTALL.md (BTW you don't tell about loading the extension in the php.ini or with something like -dextension=/home/gregoire/dev/labs/candle/pcov/modules/pcov.so).
Afterwards, I created a fresh Symfony project (composer create-project symfony/website-skeleton demo -s dev master -vvv),
and added a simple entity + controller (CRUD) with the make bundle. Anyway :)
In the frontend controller I did that:
diff --git a/public/index.php b/public/index.php
index e30f90c..fa0c10c 100644
--- a/public/index.php+++ b/public/index.php@@ -4,6 +4,8 @@ use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
+\pcov\start();+
require dirname(__DIR__).'/config/bootstrap.php';
if ($_SERVER['APP_DEBUG']) {
@@ -23,5 +25,6 @@ if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
+echo json_encode(\pcov\collect());die;
$response->send();
$kernel->terminate($request, $response);
If you don't know Symfony, I'm basically starting the coverage report ASAP, and then I dump the report instead if the regular response.
At the first glance, I thought it might be caused by OPCache, so I removed it.
But it did not change anything. So I removed Blackfire, and (OH I did not notice
that before) XDebug. Still the same result.
So, to me this is strange, that's why I would like to know what I'm doing wrong.
Note about my arch
# php -v
PHP 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
I'm using the cli-server SAPI through Symfony. But Symfony does not transfer all PHP config to the "server"
I had to manually edit WebsServer.php:
$process = newProcess(array_merge(
[$binary],
$finder->findArguments(),
$xdebugArgs,
['-dextension=/home/gregoire/dev/labs/candle/pcov/modules/pcov.so'], // I added that
['-dpcov.directory=/home/gregoire/dev/labs/candle/demo/src'], // And that
['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()],
));
I hope you have all information to solve this issue ❤️
The text was updated successfully, but these errors were encountered:
Hello.
First, thanks a lot for this lib :D
Then, I would like to try few things with this lib (more to come) but I'm facing something strange. So I would like to know if this "normal".
I installed the lib as described in the
INSTALL.md
(BTW you don't tell about loading the extension in thephp.ini
or with something like-dextension=/home/gregoire/dev/labs/candle/pcov/modules/pcov.so
).Afterwards, I created a fresh Symfony project (
composer create-project symfony/website-skeleton demo -s dev master -vvv
),and added a simple entity + controller (CRUD) with the make bundle. Anyway :)
In the frontend controller I did that:
If you don't know Symfony, I'm basically starting the coverage report ASAP, and then I dump the report instead if the regular response.
On the very first run, I got something like:
This is perfect, and thanks again :D
But, on next runs, I got something like:
At the first glance, I thought it might be caused by OPCache, so I removed it.
But it did not change anything. So I removed Blackfire, and (OH I did not notice
that before) XDebug. Still the same result.
So, to me this is strange, that's why I would like to know what I'm doing wrong.
Note about my arch
I'm using the
cli-server
SAPI through Symfony. But Symfony does not transfer all PHP config to the "server"I had to manually edit
WebsServer.php
:I hope you have all information to solve this issue ❤️
The text was updated successfully, but these errors were encountered: