8000 Merge branch '4.4' into 5.2 · rubanooo/symfony@08c27ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 08c27ed

Browse files
Merge branch '4.4' into 5.2
* 4.4: [gha] Define COLUMNS properly [travis] keep compiling sodium
2 parents 93ca6cf + 058168e commit 08c27ed

File tree

6 files changed

+31
-13
lines changed

6 files changed

+31
-13
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
COMPOSER_HOME="$(composer config home)"
6262
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
6363
64+
echo COLUMNS=120 >> $GITHUB_ENV
6465
echo PHPUNIT="$(readlink -f ./phpunit) --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
6566
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV
6667
@@ -149,7 +150,6 @@ jobs:
149150
local ok=0
150151
local title="$1 $FLIP"
151152
local start=$(date -u +%s)
152-
export COLUMNS=120
153153
OUTPUT=$(bash -xc "$2" 2>&1) || ok=1
154154
local end=$(date -u +%s)
155155

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@
1818
class TextDescriptorTest extends AbstractDescriptorTest
1919
{
2020
private $fileLinkFormatter = null;
21+
private $colSize;
2122

2223
protected function setUp(): void
2324
{
24-
putenv('COLUMNS=121');
25+
$this->colSize = getenv('COLUMNS');
26+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
2527
}
2628

2729
protected function tearDown(): void
2830
{
29-
putenv('COLUMNS');
31+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
3032
}
3133

3234
protected function getDescriptor()

src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
2929
{
3030
/** @var CommandTester */
3131
private $passwordEncoderCommandTester;
32+
private $colSize;
33+
34+
protected function setUp(): void
35+
{
36+
$this->colSize = getenv('COLUMNS');
37+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
38+
}
39+
40+
protected function tearDown(): void
41+
{
42+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
43+
}
3244

3345
public function testEncodePasswordEmptySalt()
3446
{
@@ -314,7 +326,6 @@ public function testThrowsExceptionOnNoConfiguredEncoders()
314326

315327
protected function setUp(): void
316328
{
317-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
318329
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
319330
$kernel->boot();
320331

@@ -332,7 +343,6 @@ protected function tearDown(): void
332343

333344
private function setupArgon2i()
334345
{
335-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
336346
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'argon2i.yml']);
337347
$kernel->boot();
338348

@@ -345,7 +355,6 @@ private function setupArgon2i()
345355

346356
private function setupArgon2id()
347357
{
348-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
349358
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'argon2id.yml']);
350359
$kernel->boot();
351360

@@ -358,7 +367,6 @@ private function setupArgon2id()
358367

359368
private function setupBcrypt()
360369
{
361-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
362370
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'bcrypt.yml']);
363371
$kernel->boot();
364372

@@ -371,7 +379,6 @@ private function setupBcrypt()
371379

372380
private function setupSodium()
373381
{
374-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
375382
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'sodium.yml']);
376383
$kernel->boot();
377384

src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515

1616
class JsonDescriptorTest extends AbstractDescriptorTest
1717
{
18+
private $colSize;
19+
1820
protected function setUp(): void
1921
{
20-
putenv('COLUMNS=121');
22+
$this->colSize = getenv('COLUMNS');
23+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
2124
}
2225

2326
protected function tearDown(): void
2427
{
25-
putenv('COLUMNS');
28+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
2629
}
2730

2831
protected function getDescriptor()

src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515

1616
class TextDescriptorTest extends AbstractDescriptorTest
1717
{
18+
private $colSize;
19+
1820
protected function setUp(): void
1921
{
20-
putenv('COLUMNS=121');
22+
$this->colSize = getenv('COLUMNS');
23+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
2124
}
2225

2326
protected function tearDown(): void
2427
{
25-
putenv('COLUMNS');
28+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
2629
}
2730

2831
protected function getDescriptor()

src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@
2929
*/
3030
class DebugCommandTest extends TestCase
3131
{
32+
private $colSize;
33+
3234
protected function setUp(): void
3335
{
36+
$this->colSize = getenv('COLUMNS');
3437
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
3538
}
3639

3740
protected function tearDown(): void
3841
{
39-
putenv('COLUMNS');
42+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
4043
}
4144

4245
public function testOutput()

0 commit comments

Comments
 (0)
0