Skip to content

Commit 998aab8

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: (39 commits) [Form] Fix PHPDoc for builder setData methods The underlying data variable is typed as mixed whereas the methods paramers where typed as array. fixed CS [Intl] Improved bundle reader implementations [Console] guarded against invalid aliases switch before_script to before_install and script to install fixed typo [HttpFoundation] Request - URI - comment improvements [Validator] The ratio of the ImageValidator is rounded to two decimals now [Security] Added more tests remove `service` parameter type from XSD [Intl] Added exception handler to command line scripts [Intl] Fixed a few bugs in TextBundleWriter [Intl] Updated icu.ini up to ICU 53 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle Use separated function to resolve command and related arguments [SwiftmailerBridge] Bump allowed versions of swiftmailer [FrameworkBundle] Remove invalid markup [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle Remove routes for removed WebProfiler actions [Security] Fix usage of unexistent method in DoctrineAclCache. ... Conflicts: .travis.yml src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Process/PhpExecutableFinder.php
2 parents 394d508 + 3687a17 commit 998aab8

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

Command/ServerRunCommand.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
113113
}
114114

115115
$process->run($callback);
116+
117+
if (!$process->isSuccessful()) {
118+
$output->writeln('<error>Built-in server terminated unexpectedly</error>');
119+
120+
if (OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) {
121+
$output->writeln('<error>Run the command again with -v option for more details</error>');
122+
}
123+
}
124+
125+
return $process->getExitCode();
116126
}
117127

118128
private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env)
@@ -123,6 +133,14 @@ private function createPhpProcessBuilder(InputInterface $input, OutputInterface
123133
->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env))
124134
;
125135

136+
if (!file_exists($router)) {
137+
$output->writeln(sprintf('<error>The given router script "%s" does not exist</error>', $router));
138+
139+
return 1;
140+
}
141+
142+
$router = realpath($router);
143+
126144
return new ProcessBuilder(array(PHP_BINARY, '-S', $input->getArgument('address'), $router));
127145
}
128146
}

Resources/views/Form/form_widget_compound.html.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
22
<?php if (!$form->parent && $errors): ?>
3-
<tr>
4-
<td colspan="2">
5-
<?php echo $view['form']->errors($form) ?>
6-
</td>
7-
</tr>
3+
<?php echo $view['form']->errors($form) ?>
84
<?php endif ?>
95
<?php echo $view['form']->block($form, 'form_rows') ?>
106
<?php echo $view['form']->rest($form) ?>

Resources/views/FormTable/form_widget_compound.html.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<table <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
2-
<?php if (!$form->parent): ?>
3-
<?php echo $view['form']->errors($form) ?>
2+
<?php if (!$form->parent && $errors): ?>
3+
<tr>
4+
<td colspan="2">
5+
<?php echo $view['form']->errors($form) ?>
6+
</td>
7+
</tr>
48
<?php endif ?>
59
<?php echo $view['form']->block($form, 'form_rows') ?>
610
<?php echo $view['form']->rest($form) ?>

0 commit comments

Comments
 (0)