Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that process isolation works with PHP 8.3 #5356

Closed
sebastianbergmann opened this issue May 9, 2023 · 5 comments
Closed

Ensure that process isolation works with PHP 8.3 #5356

sebastianbergmann opened this issue May 9, 2023 · 5 comments
Assignees
Labels
type/change-in-php-requires-adaptation A change in PHP requires a change in PHPUnit version/8 Something affects PHPUnit 8 version/9 Something affects PHPUnit 9 version/10 Something affects PHPUnit 10
Milestone

Comments

@sebastianbergmann
Copy link
Owner

PHPUnit 8.5

PHPUnit 8.5.33-19-g22c8daa475 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.0-dev
Configuration: /usr/local/src/phpunit/phpunit.xml

F                                                                   1 / 1 (100%)

Time: 365 ms, Memory: 4.00 MB

There was 1 failure:

1) /usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 PHPUnit 8.5.33-19-g22c8daa475 by Sebastian Bergmann and contributors.
 
-.
-STDOUT does not break test result
-E                                                                  2 / 2 (100%)
+EE                                                                  2 / 2 (100%)
 
-Time: %s, Memory: %s
+Time: 177 ms, Memory: 6.00 MB
 
-There was 1 error:
+There were 2 errors:
 
-1) Issue1348Test::testSTDERR
+1) Issue1348Test::testSTDOUT
+PHPUnit\Framework\Exception: STDOUT does not break test result
+a:4:{s:10:"testResult";N;s:13:"numAssertions";i:1;s:6:"result";O:28:"PHPUnit\Framework\TestResult":35:{s:36:"PHPUnit\Framework\TestResultpassed";a:1:{s:25:"Issue1348Test::testSTDOUT";a:2:{s:6:"result";N;s:4:"size";i:-1;}}s:36:"PHPUnit\Framework\TestResulterrors";a:0:{}s:38:"PHPUnit\Framework\TestResultfailures";a:0:{}s:38:"PHPUnit\Framework\TestResultwarnings";a:0:{}s:44:"PHPUnit\Framework\TestResultnotImplemented";a:0:{}s:35:"PHPUnit\Framework\TestResultrisky";a:0:{}s:37:"PHPUnit\Framework\TestResultskipped";a:0:{}s:39:"PHPUnit\Framework\TestResultlisteners";a:0:{}s:38:"PHPUnit\Framework\TestResultrunTests";i:1;s:34:"PHPUnit\Framework\TestResulttime";d:0.0015439987182617188;s:42:"PHPUnit\Framework\TestResulttopTestSuite";N;s:42:"PHPUnit\Framework\TestResultcodeCoverage";N;s:61:"PHPUnit\Framework\TestResultconvertDeprecationsToExceptions";b:0;s:55:"PHPUnit\Framework\TestResultconvertErrorsToExceptions";b:1;s:56:"PHPUnit\Framework\TestResultconvertNoticesToExceptions";b:1;s:57:"PHPUnit\Framework\TestResultconvertWarningsToExceptions";b:1;s:34:"PHPUnit\Framework\TestResultstop";b:0;s:41:"PHPUnit\Framework\TestResultstopOnError";b:0;s:43:"PHPUnit\Framework\TestResultstopOnFailure";b:0;s:43:"PHPUnit\Framework\TestResultstopOnWarning";b:0;s:69:"PHPUnit\Framework\TestResultbeStrictAboutTestsThatDoNotTestAnything";b:1;s:60:"PHPUnit\Framework\TestResultbeStrictAboutOutputDuringTests";b:0;s:61:"PHPUnit\Framework\TestResultbeStrictAboutTodoAnnotatedTests";b:0;s:72:"PHPUnit\Framework\TestResultbeStrictAboutResourceUsageDuringSmallTests";b:0;s:46:"PHPUnit\Framework\TestResultenforceTimeLimit";b:0;s:50:"PHPUnit\Framework\TestResulttimeoutForSmallTests";i:1;s:51:"PHPUnit\Framework\TestResulttimeoutForMediumTests";i:10;s:50:"PHPUnit\Framework\TestResulttimeoutForLargeTests";i:60;s:41:"PHPUnit\Framework\TestResultstopOnRisky";b:0;s:46:"PHPUnit\Framework\TestResultstopOnIncomplete";b:0;s:43:"PHPUnit\Framework\TestResultstopOnSkipped";b:0;s:44:"PHPUnit\Framework\TestResultlastTestFailed";b:0;s:46:"PHPUnit\Framework\TestResultdefaultTimeLimit";i:0;s:42:"PHPUnit\Framework\TestResultstopOnDefect";b:0;s:77:"PHPUnit\Framework\TestResultregisterMockObjectsFromTestArgumentsRecursively";b:0;}s:6:"output";s:0:"";}
+
+Caused by
+ErrorException: unserialize(): Error at offset 0 of 2331 bytes in /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php:289
+Stack trace:
+#0 [internal function]: PHPUnit\Util\PHP\AbstractPhpProcess::PHPUnit\Util\PHP\{closure}(2, 'unserialize(): ...', '/usr/local/src/...', 289)
+#1 /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php(289): unserialize('\nSTDOUT does no...')
+#2 /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php(183): PHPUnit\Util\PHP\AbstractPhpProcess->processChildResult(Object(Issue1348Test), Object(PHPUnit\Framework\TestResult), '\nSTDOUT does no...', '')
+#3 /usr/local/src/phpunit/src/Framework/TestCase.php(836): PHPUnit\Util\PHP\AbstractPhpProcess->runTestJob('<?php\nuse PHPUn...', Object(Issue1348Test), Object(PHPUnit\Framework\TestResult))
+#4 /usr/local/src/phpunit/src/Framework/TestSuite.php(622): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
+#5 /usr/local/src/phpunit/src/TextUI/TestRunner.php(645): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
+#6 /usr/local/src/phpunit/src/TextUI/Command.php(235): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
+#7 /usr/local/src/phpunit/src/TextUI/Command.php(194): PHPUnit\TextUI\Command->run(Array, true)
+#8 Standard input code(8): PHPUnit\TextUI\Command::main()
+#9 {main}
+
+2) Issue1348Test::testSTDERR
 PHPUnit\Framework\Exception: STDERR works as usual.
 
 ERRORS!
-Tests: 2, Assertions: 1, Errors: 1.
+Tests: 2, Assertions: 0, Errors: 2.

/usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt:18
/usr/local/src/phpunit/src/Framework/TestSuite.php:622
/usr/local/src/phpunit/src/TextUI/TestRunner.php:645
/usr/local/src/phpunit/src/TextUI/Command.php:235
/usr/local/src/phpunit/src/TextUI/Command.php:194

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

PHPUnit 9.6

PHPUnit 9.6.7-5-g71b53aef43 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.0-dev
Configuration: /usr/local/src/phpunit/phpunit.xml

F                                                                   1 / 1 (100%)

Time: 00:00.236, Memory: 8.00 MB

There was 1 failure:

1) /usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 PHPUnit 9.6.7-5-g71b53aef43 by Sebastian Bergmann and contributors.
 
-.
-STDOUT does not break test result
-E                                                                  2 / 2 (100%)
+EE                                                                  2 / 2 (100%)
 
-Time: %s, Memory: %s
+Time: 00:00.111, Memory: 6.00 MB
 
-There was 1 error:
+There were 2 errors:
 
-1) Issue1348Test::testSTDERR
+1) Issue1348Test::testSTDOUT
+PHPUnit\Framework\Exception: STDOUT does not break test result
+a:4:{s:10:"testResult";N;s:13:"numAssertions";i:1;s:6:"result";O:28:"PHPUnit\Framework\TestResult":37:{s:36:"PHPUnit\Framework\TestResultpassed";a:1:{s:25:"Issue1348Test::testSTDOUT";a:2:{s:6:"result";N;s:4:"size";i:-1;}}s:47:"PHPUnit\Framework\TestResultpassedTestClasses";a:0:{}s:52:"PHPUnit\Framework\TestResultcurrentTestSuiteFailed";b:0;s:36:"PHPUnit\Framework\TestResulterrors";a:0:{}s:38:"PHPUnit\Framework\TestResultfailures";a:0:{}s:38:"PHPUnit\Framework\TestResultwarnings";a:0:{}s:44:"PHPUnit\Framework\TestResultnotImplemented";a:0:{}s:35:"PHPUnit\Framework\TestResultrisky";a:0:{}s:37:"PHPUnit\Framework\TestResultskipped";a:0:{}s:39:"PHPUnit\Framework\TestResultlisteners";a:0:{}s:38:"PHPUnit\Framework\TestResultrunTests";i:1;s:34:"PHPUnit\Framework\TestResulttime";d:0.002838104;s:42:"PHPUnit\Framework\TestResultcodeCoverage";N;s:61:"PHPUnit\Framework\TestResultconvertDeprecationsToExceptions";b:0;s:55:"PHPUnit\Framework\TestResultconvertErrorsToExceptions";b:1;s:56:"PHPUnit\Framework\TestResultconvertNoticesToExceptions";b:1;s:57:"PHPUnit\Framework\TestResultconvertWarningsToExceptions";b:1;s:34:"PHPUnit\Framework\TestResultstop";b:0;s:41:"PHPUnit\Framework\TestResultstopOnError";b:0;s:43:"PHPUnit\Framework\TestResultstopOnFailure";b:0;s:43:"PHPUnit\Framework\TestResultstopOnWarning";b:0;s:69:"PHPUnit\Framework\TestResultbeStrictAboutTestsThatDoNotTestAnything";b:1;s:60:"PHPUnit\Framework\TestResultbeStrictAboutOutputDuringTests";b:0;s:61:"PHPUnit\Framework\TestResultbeStrictAboutTodoAnnotatedTests";b:0;s:72:"PHPUnit\Framework\TestResultbeStrictAboutResourceUsageDuringSmallTests";b:0;s:46:"PHPUnit\Framework\TestResultenforceTimeLimit";b:0;s:51:"PHPUnit\Framework\TestResultforceCoversAnnotation";b:0;s:50:"PHPUnit\Framework\TestResulttimeoutForSmallTests";i:1;s:51:"PHPUnit\Framework\TestResulttimeoutForMediumTests";i:10;s:50:"PHPUnit\Framework\TestResulttimeoutForLargeTests";i:60;s:41:"PHPUnit\Framework\TestResultstopOnRisky";b:0;s:46:"PHPUnit\Framework\TestResultstopOnIncomplete";b:0;s:43:"PHPUnit\Framework\TestResultstopOnSkipped";b:0;s:44:"PHPUnit\Framework\TestResultlastTestFailed";b:0;s:46:"PHPUnit\Framework\TestResultdefaultTimeLimit";i:0;s:42:"PHPUnit\Framework\TestResultstopOnDefect";b:0;s:77:"PHPUnit\Framework\TestResultregisterMockObjectsFromTestArgumentsRecursively";b:0;}s:6:"output";s:0:"";}
+
+Caused by
+ErrorException: unserialize(): Error at offset 0 of 2457 bytes in /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php:289
+Stack trace:
+#0 [internal function]: PHPUnit\Util\PHP\AbstractPhpProcess::PHPUnit\Util\PHP\{closure}(2, 'unserialize(): ...', '/usr/local/src/...', 289)
+#1 /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php(289): unserialize('\nSTDOUT does no...')
+#2 /usr/local/src/phpunit/src/Util/PHP/AbstractPhpProcess.php(183): PHPUnit\Util\PHP\AbstractPhpProcess->processChildResult(Object(Issue1348Test), Object(PHPUnit\Framework\TestResult), '\nSTDOUT does no...', '')
+#3 /usr/local/src/phpunit/src/Framework/TestCase.php(962): PHPUnit\Util\PHP\AbstractPhpProcess->runTestJob('<?php\nuse PHPUn...', Object(Issue1348Test), Object(PHPUnit\Framework\TestResult))
+#4 /usr/local/src/phpunit/src/Framework/TestSuite.php(684): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
+#5 /usr/local/src/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
+#6 /usr/local/src/phpunit/src/TextUI/Command.php(144): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
+#7 /usr/local/src/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true)
+#8 Standard input code(8): PHPUnit\TextUI\Command::main()
+#9 {main}
+
+2) Issue1348Test::testSTDERR
 PHPUnit\Framework\Exception: STDERR works as usual.
 
 ERRORS!
-Tests: 2, Assertions: 1, Errors: 1.
+Tests: 2, Assertions: 0, Errors: 2.

/usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt:18
/usr/local/src/phpunit/src/Framework/TestSuite.php:684
/usr/local/src/phpunit/src/TextUI/TestRunner.php:651
/usr/local/src/phpunit/src/TextUI/Command.php:144
/usr/local/src/phpunit/src/TextUI/Command.php:97

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

PHPUnit 10.1

PHPUnit 10.1.2-13-gb54dec3557 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.0-dev
Configuration: /usr/local/src/phpunit/phpunit.xml

F                                                                   1 / 1 (100%)

Time: 00:00.356, Memory: 8.00 MB

There was 1 failure:

1) /usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 
 Runtime:       PHP 8.3.0-dev
 
-.
-STDOUT does not break test result
-E                                                                  2 / 2 (100%)
+EE                                                                  2 / 2 (100%)
 
-Time: %s, Memory: %s
+Time: 00:00.136, Memory: 6.00 MB
 
-There was 1 error:
+There were 2 errors:
 
-1) PHPUnit\TestFixture\Issue1348Test::testSTDERR
+1) PHPUnit\TestFixture\Issue1348Test::testSTDOUT
+PHPUnit\Framework\Exception: STDOUT does not break test result
+a:6:{s:10:"testResult";N;s:12:"codeCoverage";N;s:13:"numAssertions";i:1;s:6:"output";s:0:"";s:6:"events";O:29:"PHPUnit\Event\EventCollection":1:{s:37:"PHPUnit\Event\EventCollectionevents";a:5:{i:0;O:37:"PHPUnit\Event\Test\PreparationStarted":2:{s:52:"PHPUnit\Event\Test\PreparationStartedtelemetryInfo";O:28:"PHPUnit\Event\Telemetry\Info":5:{s:37:"PHPUnit\Event\Telemetry\Infocurrent";O:32:"PHPUnit\Event\Telemetry\Snapshot":4:{s:38:"PHPUnit\Event\Telemetry\Snapshottime";O:30:"PHPUnit\Event\Telemetry\HRTime":2:{s:39:"PHPUnit\Event\Telemetry\HRTimeseconds";i:15122;s:43:"PHPUnit\Event\Telemetry\HRTimenanoseconds";i:68315310;}s:45:"PHPUnit\Event\Telemetry\SnapshotmemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:49:"PHPUnit\Event\Telemetry\SnapshotpeakMemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:56:"PHPUnit\Event\Telemetry\SnapshotgarbageCollectorStatus";O:46:"PHPUnit\Event\Telemetry\GarbageCollectorStatus":8:{s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusruns";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatuscollected";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusthreshold";i:10001;s:53:"PHPUnit\Event\Telemetry\GarbageCollectorStatusroots";i:63;s:55:"PHPUnit\Event\Telemetry\GarbageCollectorStatusrunning";b:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusprotected";b:0;s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusfull";b:0;s:58:"PHPUnit\Event\Telemetry\GarbageCollectorStatusbufferSize";i:16384;}}s:48:"PHPUnit\Event\Telemetry\InfodurationSinceStart";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:65000154;}s:46:"PHPUnit\Event\Telemetry\InfomemorySinceStart";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}s:51:"PHPUnit\Event\Telemetry\InfodurationSincePrevious";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:4615517;}s:49:"PHPUnit\Event\Telemetry\InfomemorySincePrevious";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}}s:43:"PHPUnit\Event\Test\PreparationStartedtest";O:29:"PHPUnit\Event\Code\TestMethod":7:{s:29:"PHPUnit\Event\Code\Testfile";s:73:"/usr/local/src/phpunit/tests/end-to-end/regression/1348/Issue1348Test.php";s:40:"PHPUnit\Event\Code\TestMethodclassName";s:33:"PHPUnit\TestFixture\Issue1348Test";s:41:"PHPUnit\Event\Code\TestMethodmethodName";s:10:"testSTDOUT";s:35:"PHPUnit\Event\Code\TestMethodline";i:19;s:38:"PHPUnit\Event\Code\TestMethodtestDox";O:26:"PHPUnit\Event\Code\TestDox":3:{s:47:"PHPUnit\Event\Code\TestDoxprettifiedClassName";s:41:"Issue1348 (PHPUnit\TestFixture\Issue1348)";s:48:"PHPUnit\Event\Code\TestDoxprettifiedMethodName";s:11:"S t d o u t";s:60:"PHPUnit\Event\Code\TestDoxprettifiedAndColorizedMethodName";s:11:"S t d o u t";}s:39:"PHPUnit\Event\Code\TestMethodmetadata";O:35:"PHPUnit\Metadata\MetadataCollection":1:{s:45:"PHPUnit\Metadata\MetadataCollectionmetadata";a:0:{}}s:39:"PHPUnit\Event\Code\TestMethodtestData";O:41:"PHPUnit\Event\TestData\TestDataCollection":2:{s:47:"PHPUnit\Event\TestData\TestDataCollectiondata";a:0:{}s:59:"PHPUnit\Event\TestData\TestDataCollectionfromDataProvider";N;}}}i:1;O:27:"PHPUnit\Event\Test\Prepared":2:{s:42:"PHPUnit\Event\Test\PreparedtelemetryInfo";O:28:"PHPUnit\Event\Telemetry\Info":5:{s:37:"PHPUnit\Event\Telemetry\Infocurrent";O:32:"PHPUnit\Event\Telemetry\Snapshot":4:{s:38:"PHPUnit\Event\Telemetry\Snapshottime";O:30:"PHPUnit\Event\Telemetry\HRTime":2:{s:39:"PHPUnit\Event\Telemetry\HRTimeseconds";i:15122;s:43:"PHPUnit\Event\Telemetry\HRTimenanoseconds";i:68822657;}s:45:"PHPUnit\Event\Telemetry\SnapshotmemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:49:"PHPUnit\Event\Telemetry\SnapshotpeakMemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:56:"PHPUnit\Event\Telemetry\SnapshotgarbageCollectorStatus";O:46:"PHPUnit\Event\Telemetry\GarbageCollectorStatus":8:{s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusruns";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatuscollected";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusthreshold";i:10001;s:53:"PHPUnit\Event\Telemetry\GarbageCollectorStatusroots";i:78;s:55:"PHPUnit\Event\Telemetry\GarbageCollectorStatusrunning";b:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusprotected";b:0;s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusfull";b:0;s:58:"PHPUnit\Event\Telemetry\GarbageCollectorStatusbufferSize";i:16384;}}s:48:"PHPUnit\Event\Telemetry\InfodurationSinceStart";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:65507501;}s:46:"PHPUnit\Event\Telemetry\InfomemorySinceStart";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}s:51:"PHPUnit\Event\Telemetry\InfodurationSincePrevious";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:507347;}s:49:"PHPUnit\Event\Telemetry\InfomemorySincePrevious";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}}s:33:"PHPUnit\Event\Test\Preparedtest";r:37;}i:2;O:37:"PHPUnit\Event\Test\AssertionSucceeded":5:{s:52:"PHPUnit\Event\Test\AssertionSucceededtelemetryInfo";O:28:"PHPUnit\Event\Telemetry\Info":5:{s:37:"PHPUnit\Event\Telemetry\Infocurrent";O:32:"PHPUnit\Event\Telemetry\Snapshot":4:{s:38:"PHPUnit\Event\Telemetry\Snapshottime";O:30:"PHPUnit\Event\Telemetry\HRTime":2:{s:39:"PHPUnit\Event\Telemetry\HRTimeseconds";i:15122;s:43:"PHPUnit\Event\Telemetry\HRTimenanoseconds";i:69161675;}s:45:"PHPUnit\Event\Telemetry\SnapshotmemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:49:"PHPUnit\Event\Telemetry\SnapshotpeakMemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:56:"PHPUnit\Event\Telemetry\SnapshotgarbageCollectorStatus";O:46:"PHPUnit\Event\Telemetry\GarbageCollectorStatus":8:{s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusruns";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatuscollected";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusthreshold";i:10001;s:53:"PHPUnit\Event\Telemetry\GarbageCollectorStatusroots";i:90;s:55:"PHPUnit\Event\Telemetry\GarbageCollectorStatusrunning";b:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusprotected";b:0;s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusfull";b:0;s:58:"PHPUnit\Event\Telemetry\GarbageCollectorStatusbufferSize";i:16384;}}s:48:"PHPUnit\Event\Telemetry\InfodurationSinceStart";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:65846519;}s:46:"PHPUnit\Event\Telemetry\InfomemorySinceStart";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}s:51:"PHPUnit\Event\Telemetry\InfodurationSincePrevious";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:339018;}s:49:"PHPUnit\Event\Telemetry\InfomemorySincePrevious";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}}s:44:"PHPUnit\Event\Test\AssertionSucceededvalue";s:4:"true";s:49:"PHPUnit\Event\Test\AssertionSucceededconstraint";s:7:"is true";s:44:"PHPUnit\Event\Test\AssertionSucceededcount";i:1;s:46:"PHPUnit\Event\Test\AssertionSucceededmessage";s:0:"";}i:3;O:25:"PHPUnit\Event\Test\Passed":2:{s:40:"PHPUnit\Event\Test\PassedtelemetryInfo";O:28:"PHPUnit\Event\Telemetry\Info":5:{s:37:"PHPUnit\Event\Telemetry\Infocurrent";O:32:"PHPUnit\Event\Telemetry\Snapshot":4:{s:38:"PHPUnit\Event\Telemetry\Snapshottime";O:30:"PHPUnit\Event\Telemetry\HRTime":2:{s:39:"PHPUnit\Event\Telemetry\HRTimeseconds";i:15122;s:43:"PHPUnit\Event\Telemetry\HRTimenanoseconds";i:69454488;}s:45:"PHPUnit\Event\Telemetry\SnapshotmemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:49:"PHPUnit\Event\Telemetry\SnapshotpeakMemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:4194304;}s:56:"PHPUnit\Event\Telemetry\SnapshotgarbageCollectorStatus";O:46:"PHPUnit\Event\Telemetry\GarbageCollectorStatus":8:{s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusruns";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatuscollected";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusthreshold";i:10001;s:53:"PHPUnit\Event\Telemetry\GarbageCollectorStatusroots";i:101;s:55:"PHPUnit\Event\Telemetry\GarbageCollectorStatusrunning";b:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusprotected";b:0;s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusfull";b:0;s:58:"PHPUnit\Event\Telemetry\GarbageCollectorStatusbufferSize";i:16384;}}s:48:"PHPUnit\Event\Telemetry\InfodurationSinceStart";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:66139332;}s:46:"PHPUnit\Event\Telemetry\InfomemorySinceStart";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}s:51:"PHPUnit\Event\Telemetry\InfodurationSincePrevious";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:292813;}s:49:"PHPUnit\Event\Telemetry\InfomemorySincePrevious";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:0;}}s:31:"PHPUnit\Event\Test\Passedtest";r:37;}i:4;O:27:"PHPUnit\Event\Test\Finished":3:{s:42:"PHPUnit\Event\Test\FinishedtelemetryInfo";O:28:"PHPUnit\Event\Telemetry\Info":5:{s:37:"PHPUnit\Event\Telemetry\Infocurrent";O:32:"PHPUnit\Event\Telemetry\Snapshot":4:{s:38:"PHPUnit\Event\Telemetry\Snapshottime";O:30:"PHPUnit\Event\Telemetry\HRTime":2:{s:39:"PHPUnit\Event\Telemetry\HRTimeseconds";i:15122;s:43:"PHPUnit\Event\Telemetry\HRTimenanoseconds";i:70576687;}s:45:"PHPUnit\Event\Telemetry\SnapshotmemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:6291456;}s:49:"PHPUnit\Event\Telemetry\SnapshotpeakMemoryUsage";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:6291456;}s:56:"PHPUnit\Event\Telemetry\SnapshotgarbageCollectorStatus";O:46:"PHPUnit\Event\Telemetry\GarbageCollectorStatus":8:{s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusruns";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatuscollected";i:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusthreshold";i:10001;s:53:"PHPUnit\Event\Telemetry\GarbageCollectorStatusroots";i:131;s:55:"PHPUnit\Event\Telemetry\GarbageCollectorStatusrunning";b:0;s:57:"PHPUnit\Event\Telemetry\GarbageCollectorStatusprotected";b:0;s:52:"PHPUnit\Event\Telemetry\GarbageCollectorStatusfull";b:0;s:58:"PHPUnit\Event\Telemetry\GarbageCollectorStatusbufferSize";i:16384;}}s:48:"PHPUnit\Event\Telemetry\InfodurationSinceStart";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:67261531;}s:46:"PHPUnit\Event\Telemetry\InfomemorySinceStart";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:2097152;}s:51:"PHPUnit\Event\Telemetry\InfodurationSincePrevious";O:32:"PHPUnit\Event\Telemetry\Duration":2:{s:41:"PHPUnit\Event\Telemetry\Durationseconds";i:0;s:45:"PHPUnit\Event\Telemetry\Durationnanoseconds";i:1122199;}s:49:"PHPUnit\Event\Telemetry\InfomemorySincePrevious";O:35:"PHPUnit\Event\Telemetry\MemoryUsage":1:{s:42:"PHPUnit\Event\Telemetry\MemoryUsagebytes";i:2097152;}}s:33:"PHPUnit\Event\Test\Finishedtest";O:29:"PHPUnit\Event\Code\TestMethod":7:{s:29:"PHPUnit\Event\Code\Testfile";s:73:"/usr/local/src/phpunit/tests/end-to-end/regression/1348/Issue1348Test.php";s:40:"PHPUnit\Event\Code\TestMethodclassName";s:33:"PHPUnit\TestFixture\Issue1348Test";s:41:"PHPUnit\Event\Code\TestMethodmethodName";s:10:"testSTDOUT";s:35:"PHPUnit\Event\Code\TestMethodline";i:19;s:38:"PHPUnit\Event\Code\TestMethodtestDox";O:26:"PHPUnit\Event\Code\TestDox":3:{s:47:"PHPUnit\Event\Code\TestDoxprettifiedClassName";s:41:"Issue1348 (PHPUnit\TestFixture\Issue1348)";s:48:"PHPUnit\Event\Code\TestDoxprettifiedMethodName";s:11:"S t d o u t";s:60:"PHPUnit\Event\Code\TestDoxprettifiedAndColorizedMethodName";s:11:"S t d o u t";}s:39:"PHPUnit\Event\Code\TestMethodmetadata";r:46;s:39:"PHPUnit\Event\Code\TestMethodtestData";O:41:"PHPUnit\Event\TestData\TestDataCollection":2:{s:47:"PHPUnit\Event\TestData\TestDataCollectiondata";a:0:{}s:59:"PHPUnit\Event\TestData\TestDataCollectionfromDataProvider";N;}}s:56:"PHPUnit\Event\Test\FinishednumberOfAssertionsPerformed";i:1;}}}s:11:"passedTests";O:41:"PHPUnit\TestRunner\TestResult\PassedTests":2:{s:60:"PHPUnit\TestRunner\TestResult\PassedTestspassedTestClasses";a:0:{}s:60:"PHPUnit\TestRunner\TestResult\PassedTestspassedTestMethods";a:1:{s:45:"PHPUnit\TestFixture\Issue1348Test::testSTDOUT";a:2:{s:11:"returnValue";N;s:4:"size";O:34:"PHPUnit\Framework\TestSize\Unknown":0:{}}}}}
+
+Caused by
+ErrorException: unserialize(): Error at offset 0 of 14069 bytes
+
+2) PHPUnit\TestFixture\Issue1348Test::testSTDERR
 PHPUnit\Framework\Exception: STDERR works as usual.
 
 ERRORS!
-Tests: 2, Assertions: 1, Errors: 1.
+Tests: 2, Assertions: 0, Errors: 2.

/usr/local/src/phpunit/tests/end-to-end/regression/1348.phpt:18
/usr/local/src/phpunit/src/Framework/TestSuite.php:357
/usr/local/src/phpunit/src/TextUI/TestRunner.php:63
/usr/local/src/phpunit/src/TextUI/Application.php:168

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
@sebastianbergmann sebastianbergmann added type/change-in-php-requires-adaptation A change in PHP requires a change in PHPUnit version/9 Something affects PHPUnit 9 version/10 Something affects PHPUnit 10 version/8 Something affects PHPUnit 8 labels May 9, 2023
@sebastianbergmann
Copy link
Owner Author

Identified the change in PHP 8.3 that causes this using git bisect: php/php-src@f6c0c60 (php/php-src#11169) by @nielsdos.

@nielsdos
Copy link

nielsdos commented May 9, 2023

Huh, I certainly did not expect BC breaks from that change.
In any case, I had a look at this. It seems that you send the test results via stdout, and then deserialize it. The tests fail because the string "\nSTDOUT does not break test result\n" is now sent to stdout, which causes the unserialization to break.

I see that you override STDOUT and STDERR if they're not defined yet:

if (!defined('STDOUT')) {
    define('STDOUT', fopen('php://temp', 'w+b'));
    define('STDERR', fopen('php://stderr', 'wb'));
}

But since we now always define those, this breaks.

As a side note I found that the following breaks even in current versions of PHP:

$f = fopen("php://stdout", "w");
fwrite($f, "abc");
fclose($f);

As for a solution I see three options:

  1. Revert the fix in php-src.
  2. Add an option to the CLI SAPI to bypass defining those constants.
  3. When you launch the process from within phpunit, perform output redirection at the process level instead of within PHP. This will fix this regression and also fix the problematic case I gave. I'm not sure how easy (if possible) this is to implement though, I only had a very brief look at phpunit's source code.

Let me know what you think. cc @iluuu1994

@iluuu1994
Copy link
Sponsor

iluuu1994 commented May 9, 2023

Add an option to the CLI SAPI to bypass defining those constants.

I think we should avoid options with very rare use-cases.

When you launch the process from within phpunit, perform output redirection at the process level instead of within PHP.

This does sound like a more robust solution. The fact that these FD constants were missing seems more like an oversight, rather than a conscious design decision.

@sebastianbergmann WDYT? Can you trivially change this? If this causes issues for you, then of course reverting this is no problem.

@sebastianbergmann
Copy link
Owner Author

All the more reason then to reimplement process isolation (#5290). Thanks!

@sebastianbergmann sebastianbergmann self-assigned this May 16, 2023
@sebastianbergmann sebastianbergmann added this to the PHPUnit 10.4 milestone Jul 18, 2023
@sebastianbergmann sebastianbergmann changed the title Test Failure with current PHP 8.3.0-dev Ensure that process isolation works with PHP 8.3 Jul 18, 2023
@sebastianbergmann
Copy link
Owner Author

I discussed this with @theseer today and we came to the following conclusions:

pento pushed a commit to WordPress/wordpress-develop that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes #59394.

git-svn-id: https://develop.svn.wordpress.org/trunk@56622 602fd350-edb4-49c9-b593-d223f7449a82
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes #59394.
Built from https://develop.svn.wordpress.org/trunk@56622


git-svn-id: https://core.svn.wordpress.org/trunk@56134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
markjaquith pushed a commit to markjaquith/WordPress that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes #59394.
Built from https://develop.svn.wordpress.org/trunk@56622


git-svn-id: http://core.svn.wordpress.org/trunk@56134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit to WordPress/wordpress-develop that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Merges [56622] to the 6.3 branch.
See #59394.

git-svn-id: https://develop.svn.wordpress.org/branches/6.3@56624 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to WordPress/WordPress that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Merges [56622] to the 6.3 branch.
See #59394.
Built from https://develop.svn.wordpress.org/branches/6.3@56624


git-svn-id: http://core.svn.wordpress.org/branches/6.3@56136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit to WordPress/wordpress-develop that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Merges [56622] to the 6.2 branch.
See #59394.

git-svn-id: https://develop.svn.wordpress.org/branches/6.2@56625 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this issue Sep 19, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Merges [56622] to the 6.2 branch.
See #59394.
Built from https://develop.svn.wordpress.org/branches/6.2@56625


git-svn-id: http://core.svn.wordpress.org/branches/6.2@56137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
mattyrob pushed a commit to ClassicPress/ClassicPress-v2 that referenced this issue Sep 19, 2023
…r` tests.

In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

WP:Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes https://core.trac.wordpress.org/ticket/59394.

---

Merges https://core.trac.wordpress.org/changeset/56622 / WordPress/wordpress-develop@7d96189ba1 to ClassicPress.
mattyrob added a commit to ClassicPress/ClassicPress-v2 that referenced this issue Sep 20, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

WP:Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes https://core.trac.wordpress.org/ticket/59394.

---

Merges https://core.trac.wordpress.org/changeset/56622 / WordPress/wordpress-develop@7d96189ba1 to ClassicPress.

Co-authored-by: Colin Stewart <costdev@git.wordpress.org>
mattyrob added a commit to ClassicPress/ClassicPress-v2 that referenced this issue Sep 21, 2023
* Update nav-menu.js

Improve feedback for accessibility when moving items in nav menu

* Use localized strings in nav-menu.js

* Add new localized strings to nav-menus.php

Adds new localized strings to `nav-menus.php` to make them available in `nav-menu.js`

* Renovate[bot]: Update dependency rollup to v3.29.2 (#211)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Renovate[bot]: Update dependency grunt-contrib-qunit to v8.0.1 (#212)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* JS Coding standards fixes

* Update common.css

Removes CSS that's no longer needed because of previous commits, and adds new CSS to make the nav menu page more accessible.

* Renovate[bot]: Update dependency postcss to v8.4.30 (#215)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update common.css

Changes `focus-within` to use `outline` instead of `border`

* Update nav-menu.js

After some testing, I have found that merely adding `setTimeout` in itself creates enough of a delay to enable the correct message to be generated. There is no need to set a value greater than 0.

* WP-r56622: Add `sys_get_temp_dir()` to `open_basedir` tests. (#218)

In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

WP:Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes https://core.trac.wordpress.org/ticket/59394.

---

Merges https://core.trac.wordpress.org/changeset/56622 / WordPress/wordpress-develop@7d96189ba1 to ClassicPress.

Co-authored-by: Colin Stewart <costdev@git.wordpress.org>

* Renovate[bot]: Update dependency node to v18.18.0 (#216)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update nav-menu.js

Improve feedback for accessibility when moving items in nav menu

* Use localized strings in nav-menu.js

* Add new localized strings to nav-menus.php

Adds new localized strings to `nav-menus.php` to make them available in `nav-menu.js`

* JS Coding standards fixes

* Update common.css

Removes CSS that's no longer needed because of previous commits, and adds new CSS to make the nav menu page more accessible.

* Update common.css

Changes `focus-within` to use `outline` instead of `border`

* Update nav-menu.js

After some testing, I have found that merely adding `setTimeout` in itself creates enough of a delay to enable the correct message to be generated. There is no need to set a value greater than 0.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mattyrob <mattyrobuk@gmail.com>
Co-authored-by: Colin Stewart <costdev@git.wordpress.org>
pereirinha pushed a commit to pereirinha/wordpress-develop that referenced this issue Sep 21, 2023
In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes #59394.

git-svn-id: https://develop.svn.wordpress.org/trunk@56622 602fd350-edb4-49c9-b593-d223f7449a82
mattyrob added a commit to ClassicPress/ClassicPress-v2 that referenced this issue Oct 5, 2023
* Adds details and summary elements to post metaboxes and dashboard widgets

This enhances accessibility for post metaboxes and dashboard widgets and enables them to be toggled open and closed without JavaScript.

* Update edit.css

Ensures that post metaboxes and dashboard widgets look the same as before the use of details and summary elements.

* Update common.css

Enures that post metaboxes and dashboard widgets look the same as before the use of details and summary elements.

* Update postbox.js

Ensures that open/closed state of post metaboxes and dashboard widgets is preserved across page loads. Before it was based on the presence or otherwise of the class "closed"; now it is dependent on the presence or otherwise of the attribute "open".

* Update sortable.js

Sortable widgets in the CP backend currently rely on jQuery UI. While it would be nice to replace that with something more modern (like SortableJS), that has to wait for another day. In the meantime, we need a fix to address the fact that the HTML5 elements `details` and `summary` were introduced after development ceased on jQuery UI.

This fix simply avoids the presence of an ugly artefact when dragging and dropping a `details` element.

* WP-r56622: Add `sys_get_temp_dir()` to `open_basedir` tests. (#218)

In PHPUnit 10.3.5, 9.6.13 and 8.5.34, the child processes used for process isolation now use temporary files to communicate their result to the parent process.

This caused a failure in some tests that set the `open_basedir` PHP directive to a value that did not include `sys_get_temp_dir()`.

This adds `sys_get_temp_dir()` to the `open_basedir` value set by the tests to ensure that permission is still granted for the temporary directory.

PHPUnit uses `sys_get_temp_dir()`. To ensure the result is the same, Core's `get_temp_dir()` function is not used.

References:
- sebastianbergmann/phpunit#5356

WP:Props desrosj, mukesh27, SergeyBiryukov, costdev.
Fixes https://core.trac.wordpress.org/ticket/59394.

---

Merges https://core.trac.wordpress.org/changeset/56622 / WordPress/wordpress-develop@7d96189ba1 to ClassicPress.

Co-authored-by: Colin Stewart <costdev@git.wordpress.org>

* Renovate[bot]: Update dependency node to v18.18.0 (#216)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Adds details and summary elements to post metaboxes and dashboard widgets

This enhances accessibility for post metaboxes and dashboard widgets and enables them to be toggled open and closed without JavaScript.

* Update edit.css

Ensures that post metaboxes and dashboard widgets look the same as before the use of details and summary elements.

* Update common.css

Enures that post metaboxes and dashboard widgets look the same as before the use of details and summary elements.

* Update postbox.js

Ensures that open/closed state of post metaboxes and dashboard widgets is preserved across page loads. Before it was based on the presence or otherwise of the class "closed"; now it is dependent on the presence or otherwise of the attribute "open".

* Update sortable.js

Sortable widgets in the CP backend currently rely on jQuery UI. While it would be nice to replace that with something more modern (like SortableJS), that has to wait for another day. In the meantime, we need a fix to address the fact that the HTML5 elements `details` and `summary` were introduced after development ceased on jQuery UI.

This fix simply avoids the presence of an ugly artefact when dragging and dropping a `details` element.

* PHP Coding standards

* JS Coding Standards

* Update common.js to address Safari's failure to respect effect of closure of details element

Addresses the focusable issue mentioned in this comment: #217 (comment)

This commit applies the `inert` attribute to elements within a closed `details` element. This appears to be supported by both desktop and mobile versions of Safari: see https://caniuse.com/?search=inert

* Update common.css to replace details arrows via CSS so that they can also have a pointer cursor.

* Update common.css to improve style of arrows

* JS syntax corrections

* Update common.css to make `details` marker bigger and remove the default in Safari.

* Compliant CSS comment

* Suggested Safari fix

* Update common.css for summary header and custom marker

* Update template.php to add back `h2` and `h3` tags.

This responds to feedback at #217 (comment)

This should also resolve the issue where clicking on the pointer icon still enabled the widget to be dragged. Dragging is now possible only where the draggable icon appears.

* Update template.php to move a class to avoid causing problems on the admin menus page.

* Update common.css to modify styling on admin menus page.

The changes made elsewhere in the PR have an impact on the visual styling of the admin menus page. For reasons long forgotten, and as noted in this file already, that page works differently from other admin pages that use widgets. So some modifications are necessary to ensure the menus page continues to look as expected.

* Update template.php to remove tabindex and enqueuing of deleted script.

* Fix whitespace in wp-admin/includes/template.php

---------

Co-authored-by: Matt Robinson <mattyrobuk@gmail.com>
Co-authored-by: Colin Stewart <costdev@git.wordpress.org>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
bepsvpt added a commit to bepsvpt/secure-headers that referenced this issue Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/change-in-php-requires-adaptation A change in PHP requires a change in PHPUnit version/8 Something affects PHPUnit 8 version/9 Something affects PHPUnit 9 version/10 Something affects PHPUnit 10
Projects
None yet
Development

No branches or pull requests

3 participants