Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0af3ca3

Browse filesBrowse files
committed
Merge branch '2.4'
* 2.4: udpated LICENSE year update year on licenses rundown and typo fix [Process] Fix #9861 : Revert TTY mode [Form] Update minimal requirement in composer.json Fix Empty translations with Qt files [Console] Fixed command name guessing if an alternative is an alias. Update UPGRADE-2.3.md to account for #9388 [WebProfilerBundle] Fixed profiler toolbar icons for XHTML. [BrowserKit] Throw exception on invalid cookie expiration timestamp [Propel1Bridge][ModelChoiceList] add exception message for invalid classes
2 parents ef12af9 + 7955999 commit 0af3ca3
Copy full SHA for 0af3ca3

File tree

Expand file treeCollapse file tree

66 files changed

+178
-70
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

66 files changed

+178
-70
lines changed

‎UPGRADE-2.3.md

Copy file name to clipboardExpand all lines: UPGRADE-2.3.md
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,32 @@ Form
170170
$form = $builder->getForm();
171171
```
172172

173+
* Previously, when the "data" option of a field was set to `null` and the
174+
containing form was mapped to an object, the field would receive the data
175+
from the object as default value. This functionality was unintended and fixed
176+
to use `null` as default value in Symfony 2.3.
177+
178+
In cases where you made use of the previous behavior, you should now remove
179+
the "data" option altogether.
180+
181+
Before:
182+
183+
```
184+
$builder->add('field', 'text', array(
185+
'data' => $defaultData ?: null,
186+
));
187+
```
188+
189+
After:
190+
191+
```
192+
$options = array();
193+
if ($defaultData) {
194+
$options['data'] = $defaultData;
195+
}
196+
$builder->add('field', 'text', $options);
197+
```
198+
173199
PropertyAccess
174200
--------------
175201

‎src/Symfony/Bridge/Doctrine/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bridge/Monolog/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
use Symfony\Component\Form\Exception\StringCastException;
1919
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
20+
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
21+
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
2022
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
2123

2224
/**
@@ -84,6 +86,13 @@ public function __construct($class, $labelPath = null, $choices = null, $queryOb
8486
$this->class = $class;
8587

8688
$queryClass = $this->class.'Query';
89+
if (!class_exists($queryClass)) {
90+
if (empty($this->class)) {
91+
throw new MissingOptionsException('The "class" parameter is empty, you should provide the model class');
92+
}
93+
throw new InvalidOptionsException(sprintf('The query class "%s" is not found, you should provide the FQCN of the model class', $queryClass));
94+
}
95+
8796
$query = new $queryClass();
8897

8998
$this->query = $queryObject ?: $query;

‎src/Symfony/Bridge/Propel1/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,20 @@ public function testDontAllowInvalidChoiceValues()
243243
$this->assertEquals(array(), $choiceList->getValuesForChoices(array(new Item(2, 'Bar'))));
244244
$this->assertEquals(array(), $choiceList->getChoicesForValues(array(2)));
245245
}
246+
247+
/**
248+
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
249+
*/
250+
public function testEmptyClass()
251+
{
252+
$choiceList = new ModelChoiceList('');
253+
}
254+
255+
/**
256+
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
257+
*/
258+
public function testInvalidClass()
259+
{
260+
$choiceList = new ModelChoiceList('Foo\Bar\DoesNotExistClass');
261+
}
246262
}

‎src/Symfony/Bridge/ProxyManager/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bridge/Swiftmailer/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Swiftmailer/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bridge/Twig/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

‎src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2013 Fabien Potencier
1+
Copyright (c) 2004-2014 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.