Page MenuHomePhabricator

php-session-serializer tests fail on PHP 7.2: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
Closed, ResolvedPublic

Description

104:30:01 PHPUnit 6.5.8 by Sebastian Bergmann and contributors.
204:30:01
304:30:01 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 55 / 55 (100%)
404:30:01
504:30:01 Time: 53 ms, Memory: 4.00MB
604:30:01
704:30:01 There were 55 errors:
804:30:01
904:30:01 1) Wikimedia\PhpSessionSerializerTest::testSetSerializeHandler
1004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
1104:30:01
1204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
1304:30:01
1404:30:01 2) Wikimedia\PhpSessionSerializerTest::testEncode with data set #0 ('php', 'test|b:1;')
1504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
1604:30:01
1704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
1804:30:01
1904:30:01 3) Wikimedia\PhpSessionSerializerTest::testEncode with data set #1 ('php_binary', Binary String: 0x0474657374623a313b)
2004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
2104:30:01
2204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
2304:30:01
2404:30:01 4) Wikimedia\PhpSessionSerializerTest::testEncode with data set #2 ('php_serialize', 'a:1:{s:4:"test";b:1;}')
2504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
2604:30:01
2704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
2804:30:01
2904:30:01 5) Wikimedia\PhpSessionSerializerTest::testEncode with data set #3 ('bogus', DomainException Object (...))
3004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
3104:30:01
3204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
3304:30:01
3404:30:01 6) Wikimedia\PhpSessionSerializerTest::testEncode with data set #4 (false, UnexpectedValueException Object (...))
3504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
3604:30:01
3704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
3804:30:01
3904:30:01 7) Wikimedia\PhpSessionSerializerTest::testDecode with data set #0 ('php', 'test|b:1;')
4004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
4104:30:01
4204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
4304:30:01
4404:30:01 8) Wikimedia\PhpSessionSerializerTest::testDecode with data set #1 ('php_binary', Binary String: 0x0474657374623a313b)
4504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
4604:30:01
4704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
4804:30:01
4904:30:01 9) Wikimedia\PhpSessionSerializerTest::testDecode with data set #2 ('php_serialize', 'a:1:{s:4:"test";b:1;}')
5004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
5104:30:01
5204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
5304:30:01
5404:30:01 10) Wikimedia\PhpSessionSerializerTest::testDecode with data set #3 ('bogus', DomainException Object (...))
5504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
5604:30:01
5704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
5804:30:01
5904:30:01 11) Wikimedia\PhpSessionSerializerTest::testDecode with data set #4 (false, UnexpectedValueException Object (...))
6004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
6104:30:01
6204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
6304:30:01
6404:30:01 12) Wikimedia\PhpSessionSerializerTest::testEncodePhp with data set "std" (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key', 42, 'long key'), 'true|b:1;false|b:0;int|i:42;z... key";', array(array('warning', 'Ignoring unsupported integer key "42"')))
6504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
6604:30:01
6704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
6804:30:01
6904:30:01 13) Wikimedia\PhpSessionSerializerTest::testEncodePhp with data set #0 (array('piped'), null, array(array('error', 'Serialization failed: Key wit...e|key"')))
7004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
7104:30:01
7204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
7304:30:01
7404:30:01 14) Wikimedia\PhpSessionSerializerTest::testEncodePhp with data set #1 (array('banged'), null, array(array('error', 'Serialization failed: Key wit...g!key"')))
7504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
7604:30:01
7704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
7804:30:01
7904:30:01 15) Wikimedia\PhpSessionSerializerTest::testEncodePhp with data set #2 (array(NAN), 'nan|d:NAN;', array())
8004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
8104:30:01
8204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
8304:30:01
8404:30:01 16) Wikimedia\PhpSessionSerializerTest::testEncodePhp with data set #3 (array(Closure Object (...)), null, array(array('error', 'Value serialization failed: [...error]')))
8504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
8604:30:01
8704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
8804:30:01
8904:30:01 17) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set "std" (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key', 'long key'), 'true|b:1;false|b:0;int|i:42;z... key";', array())
9004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
9104:30:01
9204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
9304:30:01
9404:30:01 18) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #0 (array(NAN), 'nan|d:NAN;', array())
9504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
9604:30:01
9704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
9804:30:01
9904:30:01 19) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #1 (null, 'test|i:042;', array(array('error', 'Value unserialization failed:...string')))
10004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
10104:30:01
10204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
10304:30:01
10404:30:01 20) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #2 (null, 'test|i:42', array(array('error', 'Value unserialization failed:...error]')))
10504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
10604:30:01
10704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
10804:30:01
10904:30:01 21) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #3 (null, 'test|i:42;X|', array(array('error', 'Unserialize failed: unexpecte...string')))
11004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
11104:30:01
11204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
11304:30:01
11404:30:01 22) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #4 (array(42, 43), 'test|i:42;test2|i:43;X!', array())
11504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
11604:30:01
11704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
11804:30:01
11904:30:01 23) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #5 (array(42, 43), 'test|i:42;X!test2|i:43;', array(array('warning', 'Decoding found a key with uns...test2"')))
12004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
12104:30:01
12204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
12304:30:01
12404:30:01 24) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #6 (array(), 'test!', array())
12504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
12604:30:01
12704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
12804:30:01
12904:30:01 25) Wikimedia\PhpSessionSerializerTest::testDecodePhp with data set #7 (array(42), 'test|i:42;test2', array(array('warning', 'Ignoring garbage at end of string')))
13004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
13104:30:01
13204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
13304:30:01
13404:30:01 26) Wikimedia\PhpSessionSerializerTest::testEncodePhpBinary with data set "std" (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key', 42, 'long key'), Binary String: 0x0474727565623...579223b, array(array('warning', 'Ignoring unsupported integer key "42"'), array('warning', 'Ignoring overlong key "long k...-----"')))
13504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
13604:30:01
13704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
13804:30:01
13904:30:01 27) Wikimedia\PhpSessionSerializerTest::testEncodePhpBinary with data set #0 (array('piped'), Binary String: 0x08706970657c6...564223b, array())
14004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
14104:30:01
14204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
14304:30:01
14404:30:01 28) Wikimedia\PhpSessionSerializerTest::testEncodePhpBinary with data set #1 (array('banged'), Binary String: 0x0862616e67216...564223b, array())
14504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
14604:30:01
14704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
14804:30:01
14904:30:01 29) Wikimedia\PhpSessionSerializerTest::testEncodePhpBinary with data set #2 (array(NAN), Binary String: 0x036e616e643a4e414e3b, array())
15004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
15104:30:01
15204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
15304:30:01
15404:30:01 30) Wikimedia\PhpSessionSerializerTest::testEncodePhpBinary with data set #3 (array(Closure Object (...)), null, array(array('error', 'Value serialization failed: [...error]')))
15504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
15604:30:01
15704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
15804:30:01
15904:30:01 31) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set "std" (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key'), Binary String: 0x0474727565623...579223b, array())
16004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
16104:30:01
16204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
16304:30:01
16404:30:01 32) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #0 (array('piped'), Binary String: 0x08706970657c6...564223b, array())
16504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
16604:30:01
16704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
16804:30:01
16904:30:01 33) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #1 (array('banged'), Binary String: 0x0862616e67216...564223b, array())
17004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
17104:30:01
17204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
17304:30:01
17404:30:01 34) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #2 (array(NAN), Binary String: 0x036e616e643a4e414e3b, array())
17504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
17604:30:01
17704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
17804:30:01
17904:30:01 35) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #3 (null, Binary String: 0x0474657374693a3034323b, array(array('error', 'Value unserialization failed:...string')))
18004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
18104:30:01
18204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
18304:30:01
18404:30:01 36) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #4 (null, Binary String: 0x0474657374693a3432, array(array('error', 'Value unserialization failed:...error]')))
18504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
18604:30:01
18704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
18804:30:01
18904:30:01 37) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #5 (null, 'Ptest', array(array('error', 'Unserialize failed: unexpecte...string')))
19004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
19104:30:01
19204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
19304:30:01
19404:30:01 38) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #6 (null, Binary String: 0x0474657374, array(array('error', 'Unserialize failed: unexpecte...string')))
19504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
19604:30:01
19704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
19804:30:01
19904:30:01 39) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #7 (array(42, 43), Binary String: 0x0474657374693...33b8158, array())
20004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
20104:30:01
20204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
20304:30:01
20404:30:01 40) Wikimedia\PhpSessionSerializerTest::testDecodePhpBinary with data set #8 (array(), '�test', array())
20504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
20604:30:01
20704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
20804:30:01
20904:30:01 41) Wikimedia\PhpSessionSerializerTest::testEncodePhpSerialize with data set #0 (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key', 42, 'long key'), 'a:17:{s:4:"true";b:1;s:5:"fal...key";}', array())
21004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
21104:30:01
21204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
21304:30:01
21404:30:01 42) Wikimedia\PhpSessionSerializerTest::testEncodePhpSerialize with data set #1 (array('piped'), 'a:1:{s:8:"pipe|key";s:5:"piped";}', array())
21504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
21604:30:01
21704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
21804:30:01
21904:30:01 43) Wikimedia\PhpSessionSerializerTest::testEncodePhpSerialize with data set #2 (array('banged'), 'a:1:{s:8:"bang!key";s:6:"banged";}', array())
22004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
22104:30:01
22204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
22304:30:01
22404:30:01 44) Wikimedia\PhpSessionSerializerTest::testEncodePhpSerialize with data set #3 (array(NAN), 'a:1:{s:3:"nan";d:NAN;}', array())
22504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
22604:30:01
22704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
22804:30:01
22904:30:01 45) Wikimedia\PhpSessionSerializerTest::testEncodePhpSerialize with data set #4 (array(Closure Object (...)), null, array(array('error', 'PHP serialization failed: [se...error]')))
23004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
23104:30:01
23204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
23304:30:01
23404:30:01 46) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #0 (array(true, false, 42, 0, 12.75, INF, -INF, 'string', '', array(0, 1, 100, 3, 2, 'bar'), array(), stdClass Object (...), stdClass Object (), null, 'empty key', 42, 'long key'), 'a:17:{s:4:"true";b:1;s:5:"fal...key";}', array())
23504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
23604:30:01
23704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
23804:30:01
23904:30:01 47) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #1 (array('piped'), 'a:1:{s:8:"pipe|key";s:5:"piped";}', array())
24004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
24104:30:01
24204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
24304:30:01
24404:30:01 48) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #2 (array('banged'), 'a:1:{s:8:"bang!key";s:6:"banged";}', array())
24504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
24604:30:01
24704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
24804:30:01
24904:30:01 49) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #3 (array(NAN), 'a:1:{s:3:"nan";d:NAN;}', array())
25004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
25104:30:01
25204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
25304:30:01
25404:30:01 50) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #4 (null, 'Bogus', array(array('error', 'PHP unserialization failed: [...error]')))
25504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
25604:30:01
25704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
25804:30:01
25904:30:01 51) Wikimedia\PhpSessionSerializerTest::testDecodePhpSerialize with data set #5 (null, 'O:8:"stdClass":1:{s:3:"foo";s...bar";}', array(array('error', 'PHP unserialization failed (v...array)')))
26004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
26104:30:01
26204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
26304:30:01
26404:30:01 52) Wikimedia\PhpSessionSerializerTest::testDecoderTypeCheck with data set #0 ('decode')
26504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
26604:30:01
26704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
26804:30:01
26904:30:01 53) Wikimedia\PhpSessionSerializerTest::testDecoderTypeCheck with data set #1 ('decodePhp')
27004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
27104:30:01
27204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
27304:30:01
27404:30:01 54) Wikimedia\PhpSessionSerializerTest::testDecoderTypeCheck with data set #2 ('decodePhpBinary')
27504:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
27604:30:01
27704:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124
27804:30:01
27904:30:01 55) Wikimedia\PhpSessionSerializerTest::testDecoderTypeCheck with data set #3 ('decodePhpSerialize')
28004:30:01 ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
28104:30:01
28204:30:01 /src/tests/Wikimedia/PhpSessionSerializerTest.php:124

Full jenkins log: https://integration.wikimedia.org/ci/job/composer-package-php72-docker/8/console

Event Timeline

Legoktm created this task.May 6 2018, 4:36 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 6 2018, 4:36 AM
Anomie added a comment.EditedMay 7 2018, 2:07 PM

I've seen this general error show up several times in different places. What changed in either PHP 7.2 or PHPUnit to make this suddenly start being a problem in unit testing?

Tgr added a comment.May 7 2018, 2:44 PM

Session handling has been cleaned up considerably in PHP 7.2: https://github.com/php/php-src/commit/7f196e3
They treat it as an error to change session settings at a point in the lifecycle where it won't meaningfully affect the response anymore. I imagine those tests will have to be done inside an output buffer.

Anomie added a comment.May 7 2018, 2:50 PM

So how do you make the whole of PHPUnit do its thing inside an output buffer so it doesn't get tripped up by this somewhat bogus[1] change?

[1]: "Somewhat bogus" in that CLI execution doesn't have headers to send in the first place, so choosing to make unit tests fail because the unit testing framework prints progress indicators is breaking things for no good reason.

Tgr added a comment.May 7 2018, 3:02 PM

I suppose you could execute such tests in a separate batch (using @group), with the --process-isolation option.

Tgr added a comment.May 7 2018, 3:04 PM

Or, apparently, use the @runTestsInSeparateProcesses annotation.

Anomie added a comment.May 7 2018, 3:18 PM

I've not had very good luck with @runInSeparateProcess and the like in the past, but maybe it'll work here for the one test where it matters.

Change 431589 had a related patch set uploaded (by Anomie; owner: Anomie):
[php-session-serializer@master] Tests: Work around PHP 7.2 stupidity

https://gerrit.wikimedia.org/r/431589

Anomie added a comment.May 7 2018, 3:22 PM
15:21:22 ----------------------------------------------------------------------
15:21:22 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
15:21:22 ----------------------------------------------------------------------
15:21:22  130 | WARNING | The phpunit annotation @runInSeparateProcess should not
15:21:22      |         | be used.
15:21:22      |         | (MediaWiki.Commenting.PhpunitAnnotations.ForbiddenRunInSeparateProcess)
15:21:22 ----------------------------------------------------------------------

Wonderful.

Change 431589 merged by jenkins-bot:
[php-session-serializer@master] Tests: Work around PHP 7.2 stupidity

https://gerrit.wikimedia.org/r/431589

15:21:22 ----------------------------------------------------------------------
15:21:22 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
15:21:22 ----------------------------------------------------------------------
15:21:22  130 | WARNING | The phpunit annotation @runInSeparateProcess should not
15:21:22      |         | be used.
15:21:22      |         | (MediaWiki.Commenting.PhpunitAnnotations.ForbiddenRunInSeparateProcess)
15:21:22 ----------------------------------------------------------------------

Wonderful.

I think that error is fine to override if there's a good reason for it. I believe it's banned because it would cause issues in MediaWiki's PHPUnit tests. (cc @Umherirrender )

15:21:22 ----------------------------------------------------------------------
15:21:22 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
15:21:22 ----------------------------------------------------------------------
15:21:22  130 | WARNING | The phpunit annotation @runInSeparateProcess should not
15:21:22      |         | be used.
15:21:22      |         | (MediaWiki.Commenting.PhpunitAnnotations.ForbiddenRunInSeparateProcess)
15:21:22 ----------------------------------------------------------------------

Wonderful.

I think that error is fine to override if there's a good reason for it. I believe it's banned because it would cause issues in MediaWiki's PHPUnit tests. (cc @Umherirrender )

It was unused in the existing code and from the description[1] I have not found an useful use case inside mediawiki and the extensions. Feel free to exclude the sniff or move it to the whitelist inside the sniff definition.

[1] https://phpunit.de/manual/6.5/en/appendixes.annotations.html#appendixes.annotations.runInSeparateProcess

Yesterday I have tried to use @runInSeparateProcess to write a test for headers/cookies, there are a few things that need to be fixed first but eventually it leads to an infinite loop. I have filled T193957

Vvjjkkii renamed this task from php-session-serializer tests fail on PHP 7.2: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time to mjdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from mjdaaaaaaa to php-session-serializer tests fail on PHP 7.2: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time.Jul 2 2018, 4:26 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Change 467025 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[php-session-serializer@master] Fix test disabled on PHP 7.2 by sending PHPUnit output to stderr

https://gerrit.wikimedia.org/r/467025

Legoktm claimed this task.Oct 13 2018, 6:54 AM

Change 467025 merged by jenkins-bot:
[php-session-serializer@master] Fix test disabled on PHP 7.2 by sending PHPUnit output to stderr

https://gerrit.wikimedia.org/r/467025

Legoktm closed this task as Resolved.Oct 13 2018, 7:02 AM

I think everything is fixed now, please re-open if not.