Skip to content

Commit 4094d78

Browse files
committed
revert broken table feature
1 parent 4be35a5 commit 4094d78

File tree

6 files changed

+2
-228
lines changed

6 files changed

+2
-228
lines changed

src/Illuminate/Console/Concerns/InteractsWithIO.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,11 @@ public function choice($question, array $choices, $default = null, $attempts = n
219219
* @param \Illuminate\Contracts\Support\Arrayable|array $rows
220220
* @param string $tableStyle
221221
* @param array $columnStyles
222-
* @return \Symfony\Component\Console\Helper\Table
222+
* @return void
223223
*/
224224
public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = [])
225225
{
226-
$output = $this->output->getOutput();
227-
228-
$table = new Table($output instanceof ConsoleOutput ? $output->section() : $output);
226+
$table = new Table($this->output);
229227

230228
if ($rows instanceof Arrayable) {
231229
$rows = $rows->toArray();
@@ -238,8 +236,6 @@ public function table($headers, $rows, $tableStyle = 'default', array $columnSty
238236
}
239237

240238
$table->render();
241-
242-
return $table;
243239
}
244240

245241
/**

src/Illuminate/Console/OutputStyle.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,4 @@ public function isDebug()
6868
{
6969
return $this->output->isDebug();
7070
}
71-
72-
/**
73-
* Get the underlying Symfony output implementation.
74-
*
75-
* @return \Symfony\Component\Console\Output\OutputInterface
76-
*/
77-
public function getOutput()
78-
{
79-
return $this->output;
80-
}
8171
}

src/Illuminate/Foundation/Testing/MockStream.php

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/Illuminate/Foundation/Testing/PendingCommand.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
use Mockery;
88
use Mockery\Exception\NoMatchingExpectationException;
99
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
10-
use Symfony\Component\Console\Formatter\OutputFormatter;
1110
use Symfony\Component\Console\Input\ArrayInput;
1211
use Symfony\Component\Console\Output\BufferedOutput;
13-
use Symfony\Component\Console\Output\ConsoleSectionOutput;
1412
use Symfony\Component\Console\Output\Output;
1513

1614
class PendingCommand
@@ -196,21 +194,6 @@ private function createABufferedOutputMock()
196194
->shouldAllowMockingProtectedMethods()
197195
->shouldIgnoreMissing();
198196

199-
MockStream::register($mock);
200-
201-
$stream = fopen('mock://stream', 'r+');
202-
203-
$consoleOutputSections = [];
204-
205-
$mock->shouldReceive('section')
206-
->andReturn(new ConsoleSectionOutput(
207-
$stream,
208-
$consoleOutputSections,
209-
Output::VERBOSITY_NORMAL,
210-
false,
211-
new OutputFormatter)
212-
);
213-
214197
foreach ($this->test->expectedOutput as $i => $output) {
215198
$mock->shouldReceive('doWrite')
216199
->once()
@@ -236,7 +219,5 @@ public function __destruct()
236219
}
237220

238221
$this->run();
239-
240-
MockStream::restore();
241222
}
242223
}

tests/Foundation/Testing/MockStreamTest.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/Integration/Console/CommandWithTableTest.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)