Skip to content

Commit 121961d

Browse files
author
Florian Eckerstorfer
committed
Merge branch 'develop'
* develop: Fix tests Update README for v2.1.2 Don't throw exception if no settings to restore Added the missing less file.
2 parents 7f2ee2d + c301bae commit 121961d

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ This bundle has two main dependencies, Symfony and Bootstrap. The following tabl
104104
Changelog
105105
---------
106106

107+
### Version 2.1.2 (6 March 2015)
108+
109+
- When restoring form settings, don't throw an exception if there are no settings to restore (by [florianeckerstorfer](https://github.com/florianeckerstorfer))
110+
- [#356](https://github.com/braincrafted/bootstrap-bundle/pull/356) Add missing `responsive-embed.less` (by [blaues0cke](https://github.com/blaues0cke))
111+
107112
### Version 2.1.1 (31 January 2015)
108113

109114
- [#301](https://github.com/braincrafted/bootstrap-bundle/pull/301) Fix generate command for Symfony v2.5 (by [mumia](https://github.com/mumia))

Resources/views/Bootstrap/bootstrap.less.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
@import "{{ assets_dir }}less/panels.less";
4949
@import "{{ assets_dir }}less/wells.less";
5050
@import "{{ assets_dir }}less/close.less";
51+
@import "{{ assets_dir }}less/responsive-embed.less";
5152

5253
// Components w/ JavaScript
5354
@import "{{ assets_dir }}less/modals.less";

Tests/Twig/BootstrapFormExtensionTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,8 @@ public function testBackupFormSettingsRestoreFormSettings()
125125
$this->assertEquals(2, $this->extension->getLabelCol());
126126
$this->assertEquals(3, $this->extension->getSimpleCol());
127127

128-
try {
129-
$this->extension->restoreFormSettings();
130-
$this->fail('Expected UnderflowException not thrown');
131-
} catch (\UnderflowException $e) {
132-
}
128+
// Nothing happens if we try to restore form settings but none exist
129+
$this->extension->restoreFormSettings();
133130
}
134131

135132
/**

Twig/BootstrapFormExtension.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,11 @@ public function backupFormSettings()
207207
*
208208
* @internal Should only be used at the end of form_end.
209209
* @see backupFormSettings
210-
* @throws \UnderflowException
211210
*/
212211
public function restoreFormSettings()
213212
{
214213
if (count($this->settingsStack) < 1) {
215-
throw new \UnderflowException("No settings on the stack to restore");
214+
return;
216215
}
217216

218217
$settings = array_pop($this->settingsStack);

0 commit comments

Comments
 (0)