Skip to content

Commit 85f90fc

Browse files
Merge branch '1.8' into fix/symfony4_structure
2 parents 07403a6 + ff12c8e commit 85f90fc

15 files changed

+37
-6
lines changed

Command/BuildCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ protected function configure()
4141
/**
4242
* @see Command
4343
*
44+
* @return int 0 if everything went fine, or an exit code
45+
*
4446
* @throws \InvalidArgumentException When the target directory does not exist
4547
*/
4648
protected function execute(InputInterface $input, OutputInterface $output)

Command/DatabaseCreateCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ protected function configure()
3535
/**
3636
* @see Command
3737
*
38+
* @return int 0 if everything went fine, or an exit code
39+
*
3840
* @throws \InvalidArgumentException When the target directory does not exist
3941
*/
4042
protected function execute(InputInterface $input, OutputInterface $output)

Command/DatabaseDropCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ protected function configure()
4646
/**
4747
* @see Command
4848
*
49+
* @return int 0 if everything went fine, or an exit code
50+
*
4951
* @throws \InvalidArgumentException When the target directory does not exist
5052
*/
5153
protected function execute(InputInterface $input, OutputInterface $output)

Command/FixturesDumpCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ protected function configure()
5454
/**
5555
* @see Command
5656
*
57+
* @return int 0 if everything went fine, or an exit code
58+
*
5759
* @throws \InvalidArgumentException When the target directory does not exist
5860
*/
5961
protected function execute(InputInterface $input, OutputInterface $output)

Command/FixturesLoadCommand.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ protected function configure()
111111
/**
112112
* @see Command
113113
*
114+
* @return int 0 if everything went fine, or an exit code
115+
*
114116
* @throws \InvalidArgumentException When the target directory does not exist
115117
*/
116118
protected function execute(InputInterface $input, OutputInterface $output)
@@ -156,12 +158,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
156158
*
157159
* @param \Symfony\Component\Console\Input\InputInterface $input
158160
* @param \Symfony\Component\Console\Output\OutputInterface $output
159-
* @return void
161+
* @return int
160162
*/
161163
protected function loadFixtures(InputInterface $input, OutputInterface $output, $type = null)
162164
{
163165
if (null === $type) {
164-
return;
166+
return -2;
165167
}
166168

167169
$datas = $this->getFixtureFiles($type);
@@ -177,7 +179,7 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
177179
} elseif ('xml' === $type) {
178180
$loader = new XmlDataLoader($this->getApplication()->getKernel()->getProjectDir() . '/app');
179181
} else {
180-
return;
182+
return -3;
181183
}
182184

183185
try {
@@ -188,20 +190,20 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
188190
'',
189191
$e->getMessage()), 'fg=white;bg=red');
190192

191-
return false;
193+
return -4;
192194
}
193195

194196
$output->writeln(sprintf('<comment>%s</comment> %s fixtures file%s loaded.', $nb, strtoupper($type), $nb > 1 ? 's' : ''));
195197

196-
return true;
198+
return 0;
197199
}
198200

199201
/**
200202
* Load SQL fixtures
201203
*
202204
* @param \Symfony\Component\Console\Input\InputInterface $input
203205
* @param \Symfony\Component\Console\Output\OutputInterface $output
204-
* @return void
206+
* @return int
205207
*/
206208
protected function loadSqlFixtures(InputInterface $input, OutputInterface $output)
207209
{

Command/FormGenerateCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ protected function configure()
4747
/**
4848
* @see Command
4949
*
50+
* @return int 0 if everything went fine, or an exit code
51+
*
5052
* @throws \InvalidArgumentException When the target directory does not exist
5153
*/
5254
protected function execute(InputInterface $input, OutputInterface $output)

Command/GraphvizGenerateCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ protected function configure()
3939
/**
4040
* @see Command
4141
*
42+
* @return int 0 if everything went fine, or an exit code
43+
*
4244
* @throws \InvalidArgumentException When the target directory does not exist
4345
*/
4446
protected function execute(InputInterface $input, OutputInterface $output)

Command/MigrationGenerateDiffCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ protected function configure()
4141
/**
4242
* @see Command
4343
*
44+
* @return int 0 if everything went fine, or an exit code
45+
*
4446
* @throws \InvalidArgumentException When the target directory does not exist
4547
*/
4648
protected function execute(InputInterface $input, OutputInterface $output)
4749
{
4850
if (true === $this->callPhing('diff')) {
4951
$this->writeSummary($output, 'propel-sql-diff');
52+
return 0;
5053
} elseif ( strpos( $this->buffer, 'Uncommitted migrations have been found' ) ) {
5154
$this->writeSection($output, array(
5255
'[Propel] Error',

Command/MigrationMigrateCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ protected function configure()
5050
/**
5151
* @see Command
5252
*
53+
* @return int 0 if everything went fine, or an exit code
54+
*
5355
* @throws \InvalidArgumentException When the target directory does not exist
5456
*/
5557
protected function execute(InputInterface $input, OutputInterface $output)

Command/MigrationStatusCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ protected function configure()
3939
/**
4040
* @see Command
4141
*
42+
* @return int 0 if everything went fine, or an exit code
43+
*
4244
* @throws \InvalidArgumentException When the target directory does not exist
4345
*/
4446
protected function execute(InputInterface $input, OutputInterface $output)

0 commit comments

Comments
 (0)