Bug #73484 [Asn->Nab]: phpdbg executes code incorrectly

From: Date: Sun, 13 Nov 2016 16:30:15 +0000
Subject: Bug #73484 [Asn->Nab]: phpdbg executes code incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205338@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73484&edit=1 ID: 73484 Updated by: bwoebi@php.net Reported by: deviantintegral at gmail dot com Summary: phpdbg executes code incorrectly -Status: Assigned +Status: Not a bug Type: Bug Package: phpdbg Operating System: Linux PHP Version: 7.1.0RC5 Assigned To: bwoebi Block user comment: N Private report: N New Comment: This is not a PHP bug. This is phpunit reading from php://input (which is used for e.g. POST bodies) in src/Util/PHP/eval-stdin.php instead of php://stdin, effectively reading an empty string and thus not executing anything. Previous Comments: ------------------------------------------------------------------------ [2016-11-09 21:00:09] deviantintegral at gmail dot com Description: ------------ I've been attempting to use phpdbg for code coverage reports with phpunit. I've had rather strange behaviour with it running Drupal 8's test suite. phpunit 4.8 tests simply stop running, with no error or segfault. I switched over to phpunit 5.4, so the warnings below can be ignored for now. Under PHP 7, tests pass, but on further inspection, the assertions are not all being run correctly. For example, under php7: Time: 14.94 seconds, Memory: 120.00Mb OK (15 tests, 176 assertions Under phpdbg: Time: 5.31 seconds, Memory: 140.00Mb OK (15 tests, 8 assertions) This also affects PHP7.0, as I see similar behaviour there in the Ubuntu PPA for it: https://github.com/oerdnj/deb.sury.org/issues/485 Test script: --------------- Here's a Dockerfile to replicate this bug against the latest RC: FROM php:7.1-rc RUN curl -OJ https://ftp.drupal.org/files/projects/drupal-8.2.2.tar.gz RUN tar xzvf drupal-8.2.2.tar.gz ENV SIMPLETEST_DB="sqlite://localhost//tmp/drupal.sqlite" CMD cd drupal-8.2.2 \ && php vendor/bin/phpunit --verbose --debug -c core/phpunit.xml.dist --group aggregator \ && phpdbg -rrq vendor/bin/phpunit --verbose --debug -c core/phpunit.xml.dist --group aggregator Build it with docker build, and then use docker run <image id> and note that the assertion counts are different. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73484&edit=1

« previous php.bugs (#205338) next »