Skip to content

Commit 3687a17

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: (35 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 [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. backport more error information from 2.6 to 2.3 ... Conflicts: .travis.yml src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Process/PhpExecutableFinder.php
2 parents d7dd9e0 + d8f7c9e commit 3687a17

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

Command/ServerRunCommand.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,34 @@ protected function execute(InputInterface $input, OutputInterface $output)
101101
->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env))
102102
;
103103

104+
if (!file_exists($router)) {
105+
$output->writeln(sprintf('<error>The given router script "%s" does not exist</error>', $router));
106+
107+
return 1;
108+
}
109+
110+
$router = realpath($router);
111+
104112
$output->writeln(sprintf("Server running on <info>http://%s</info>\n", $input->getArgument('address')));
105113

106114
$builder = new ProcessBuilder(array(PHP_BINARY, '-S', $input->getArgument('address'), $router));
107115
$builder->setWorkingDirectory($documentRoot);
108116
$builder->setTimeout(null);
109-
$builder->getProcess()->run(function ($type, $buffer) use ($output) {
117+
$process = $builder->getProcess();
118+
$process->run(function ($type, $buffer) use ($output) {
110119
if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
111120
$output->write($buffer);
112121
}
113122
});
123+
124+
if (!$process->isSuccessful()) {
125+
$output->writeln('<error>Built-in server terminated unexpectedly</error>');
126+
127+
if (OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) {
128+
$output->writeln('<error>Run the command again with -v option for more details</error>');
129+
}
130+
}
131+
132+
return $process->getExitCode();
114133
}
115134
}

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)