Skip to content

[Form] Rename CollectionType options type and options #13820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ebe0889
Revert "removed 3.0 constraints from 2.7 composer files"
fabpot Apr 10, 2015
38374f9
updated version to 2.8
fabpot Apr 10, 2015
222701f
Merge branch '2.7' into 2.8
fabpot Apr 11, 2015
3694e5e
[Translation] added FileLoader.
aitboudad Apr 15, 2015
fbe1a43
[FrameworkBundle][Server Command] add address port number option.
aitboudad Apr 16, 2015
6bab76d
feature #14383 [FrameworkBundle][Server Command] add address port num…
fabpot Apr 18, 2015
862bdf1
feature #14359 [Translation] added FileLoader. (aitboudad)
fabpot Apr 18, 2015
eb50b13
[VarDumper] Added support for SplFileInfo
lyrixx Apr 20, 2015
e75c233
[VarDumper] Added support for SplFileObject
lyrixx Apr 21, 2015
ff4424a
[Console] Bind the closure (code) to the Command if possible
lyrixx Apr 21, 2015
449b18c
feature #14424 [VarDumper] Added support for SplFileInfo (lyrixx)
nicolas-grekas Apr 22, 2015
208ca94
[VarDumper] Allow preserving a subset of cut arrays
nicolas-grekas Apr 22, 2015
e861134
feature #14431 [Console] Bind the closure (code) to the Command if po…
stof Apr 23, 2015
a4e3e07
feature #14443 [VarDumper] Allow preserving a subset of cut arrays (n…
nicolas-grekas Apr 23, 2015
f5a0ac2
Merge branch '2.7' into 2.8
nicolas-grekas Apr 24, 2015
e6d05b7
Merge branch '2.7' into 2.8
nicolas-grekas Apr 24, 2015
dc89425
Merge branch '2.7' into 2.8
nicolas-grekas Apr 24, 2015
b09df56
Merge branch '2.7' into 2.8
nicolas-grekas Apr 24, 2015
b941bd3
Changed output for translation:debug command
Apr 26, 2015
7e29d2c
feature #14473 [DX] Minor improvement for the translation:debug outpu…
aitboudad Apr 26, 2015
0e7fe79
added the --all option to the debug:translation command
sgehrig Apr 11, 2015
1973960
feature #14320 [Translation] added an --all option to the debug:trans…
aitboudad Apr 29, 2015
952929c
[FrameworkBundle][EventDispatcher] Add priorities to the debug:event-…
Seldaek May 5, 2015
2869a32
[Translator] deprecate getMessages in favor of getCatalogue.
aitboudad May 4, 2015
55b3525
feature #14546 [Translator] deprecate getMessages in favor of getCata…
aitboudad May 6, 2015
da0194b
feature #14563 [FrameworkBundle][EventDispatcher] Add priorities to t…
fabpot May 6, 2015
128140e
fixed CS
fabpot May 6, 2015
bba0a25
[FrameworkBundle][DX] Add option to specify additional translation lo…
Seldaek May 5, 2015
88b7e7c
feature #14561 [FrameworkBundle][DX] Add option to specify additional…
aitboudad May 6, 2015
bb8b076
Merge branch '2.7' into 2.8
nicolas-grekas May 12, 2015
5133bf2
Merge branch '2.7' into 2.8
nicolas-grekas May 12, 2015
aef24cb
Merge branch '2.7' into 2.8
nicolas-grekas May 13, 2015
2119bf3
Merge branch '2.7' into 2.8
nicolas-grekas May 15, 2015
4b71fe0
Merge branch '2.7' into 2.8
fabpot May 15, 2015
5fdc650
[WebProfilerBundle] Improved page for logs
hason Jan 7, 2015
65d4ae0
feature #13324 [WebProfilerBundle] Improved page for logs (hason)
fabpot May 17, 2015
53330e1
[Form] deprecate read_only option
Tobion Apr 18, 2015
791e583
feature #14403 [Form] deprecate read_only option (Tobion)
fabpot May 20, 2015
29ec5ca
[Translation] add options 'as_tree', 'inline' to YamlFileDumper to du…
gepo Apr 21, 2015
a57ce90
feature #14630 [Translator] Dump translation constants as tree instea…
aitboudad May 20, 2015
3fd7cea
[Security] Add setVoters() on AccessDecisionManager
nicolas-grekas May 23, 2015
0573f28
Support for array denormalization.
derrabus Apr 13, 2015
2983ecb
feature #14756 [Serializer] Support for array denormalization (derrabus)
dunglas May 27, 2015
78cf382
feature #14733 [Security] Add setVoters() on AccessDecisionManager (n…
fabpot Jun 1, 2015
73f0ee2
[DI][Routing] recursive directory loading
lavoiesl Jun 10, 2014
60b1c5b
Added CHANGELOG entries, cleanups
nicolas-grekas May 20, 2015
5593bdd
Merge branch '2.7' into 2.8
fabpot Jun 4, 2015
d04cc5e
feature #14700 [DependencyInjection] [Routing] [Config] Recursive dir…
fabpot Jun 5, 2015
99ec717
Merge branch '2.7' into 2.8
fabpot Jun 5, 2015
3cbff05
[TwigBundle] Reconfigure twig paths when they are updated
chbruyand May 29, 2015
4133aad
feature #14781 [TwigBundle] Reconfigure twig paths when they are upda…
fabpot Jun 5, 2015
9004e29
Removed route name from the debugbar.
jbgomond Jun 7, 2015
1baf05a
added missing "
OskarStark Jun 8, 2015
90f771c
minor #14909 added missing " (OskarStark)
fabpot Jun 8, 2015
5b67bbd
[toolbar] Merged colored icons in toolbar
jbgomond Jun 7, 2015
567af65
feature #14904 [toolbar] Merged colored icons in toolbar (MJBGO)
fabpot Jun 8, 2015
0315e5d
feature #14903 [profiler][request toolbar] Removed route name from th…
fabpot Jun 8, 2015
f38296b
Merge branch '2.7' into 2.8
fabpot Jun 9, 2015
2ad3b0d
[HttpFoundation] Postpone setting the date header on a Response
jakzal Jun 8, 2015
a44ceb3
feature #14912 [HttpFoundation] Postpone setting the date header on a…
Tobion Jun 9, 2015
ae470cd
Merge branch '2.7' into 2.8
fabpot Jun 11, 2015
692deff
fix Merge branch '2.7' into 2.8 JsonFileLoader
gimler Jun 11, 2015
5f36605
minor #14954 fix Merge branch '2.7' into 2.8 JsonFileLoader (gimler)
fabpot Jun 11, 2015
65f9291
[Profiler][Translation] added filter.
aitboudad Jun 15, 2015
15ff865
feature #14993 [Profiler][Translation] added filter. (aitboudad)
fabpot Jun 15, 2015
b52e197
[Form] Added the 'range' FormType
jaytaph Sep 27, 2014
09fabfe
feature #12067 [Form] Added the 'range' FormType (jaytaph)
webmozart Jun 17, 2015
80b0a80
[Form] Add "prototype_data" option to collection type
kgilden Oct 24, 2014
54bd6f7
feature #12314 [Form] Add "prototype_data" option to collection type …
webmozart Jun 17, 2015
6c554c6
[Form] Deprecated "cascade_validation"
webmozart Oct 16, 2014
04ae391
feature #15019 [Form] Deprecated "cascade_validation" (webmozart)
fabpot Jun 17, 2015
74d794b
[Form] [EventListener] fixed sending non array data on submit to Resi…
BruceWouaigne Mar 5, 2015
63c8ce9
bug #13851 [Form] [EventListener] fixed sending non array data on pre…
webmozart Jun 18, 2015
e2a051d
Rename CollectionType options for entries
wouterj Mar 1, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ install:
script:
- if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
- if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
- if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data,legacy || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
- if [ "$deps" = "low" ]; then echo "$components" | parallel --gnu --keep-order -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
67 changes: 67 additions & 0 deletions UPGRADE-2.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
UPGRADE FROM 2.7 to 2.8
=======================

Form
----

* The "cascade_validation" option was deprecated. Use the "constraints"
option together with the `Valid` constraint instead. Contrary to
"cascade_validation", "constraints" must be set on the respective child forms,
not the parent form.

Before:

```php
$form = $this->createForm('form', $article, array('cascade_validation' => true))
->add('author', new AuthorType())
->getForm();
```

After:

```php
use Symfony\Component\Validator\Constraints\Valid;

$form = $this->createForm('form', $article)
->add('author', new AuthorType(), array(
'constraints' => new Valid(),
))
->getForm();
```

Alternatively, you can set the `Valid` constraint in the model itself:

```php
use Symfony\Component\Validator\Constraints as Assert;

class Article
{
/**
* @Assert\Valid
*/
private $author;
}
```

Translator
----------

* The `getMessages()` method of the `Symfony\Component\Translation\Translator` was deprecated and will be removed in
Symfony 3.0. You should use the `getCatalogue()` method of the `Symfony\Component\Translation\TranslatorBagInterface`.

Before:

```php
$messages = $translator->getMessages();
```

After:

```php
$catalogue = $translator->getCatalogue($locale);
$messages = $catalogue->all();

while ($catalogue = $catalogue->getFallbackCatalogue()) {
$messages = array_replace_recursive($catalogue->all(), $messages);
}
```
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
22 changes: 11 additions & 11 deletions src/Symfony/Bridge/Doctrine/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
"doctrine/common": "~2.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.2",
"symfony/dependency-injection": "~2.2",
"symfony/form": "~2.7,>=2.7.1",
"symfony/http-kernel": "~2.2",
"symfony/property-access": "~2.3",
"symfony/security": "~2.2",
"symfony/expression-language": "~2.2",
"symfony/validator": "~2.5,>=2.5.5",
"symfony/translation": "~2.0,>=2.0.5",
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/stopwatch": "~2.2|~3.0.0",
"symfony/dependency-injection": "~2.2|~3.0.0",
"symfony/form": "~2.7,>=2.7.1|~3.0.0",
"symfony/http-kernel": "~2.2|~3.0.0",
"symfony/property-access": "~2.3|~3.0.0",
"symfony/security": "~2.2|~3.0.0",
"symfony/expression-language": "~2.2|~3.0.0",
"symfony/validator": "~2.5,>=2.5.5|~3.0.0",
"symfony/translation": "~2.0,>=2.0.5|~3.0.0",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.2",
"doctrine/orm": "~2.2,>=2.2.3"
Expand All @@ -47,7 +47,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function getLogs()
'priority' => $record['level'],
'priorityName' => $record['level_name'],
'context' => $record['context'],
'channel' => isset($record['channel']) ? $record['channel'] : '',
);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Symfony/Bridge/Monolog/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"monolog/monolog": "~1.11"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/http-kernel": "~2.4",
"symfony/console": "~2.4",
"symfony/event-dispatcher": "~2.2"
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/http-kernel": "~2.4|~3.0.0",
"symfony/console": "~2.4|~3.0.0",
"symfony/event-dispatcher": "~2.2|~3.0.0"
},
"suggest": {
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
Expand All @@ -36,7 +36,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
8 changes: 4 additions & 4 deletions src/Symfony/Bridge/ProxyManager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
],
"require": {
"php": ">=5.3.9",
"symfony/dependency-injection": "~2.3",
"symfony/dependency-injection": "~2.3|~3.0.0",
"ocramius/proxy-manager": "~0.4|~1.0"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/config": "~2.3"
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/config": "~2.3|~3.0.0"
},
"autoload": {
"psr-4": { "Symfony\\Bridge\\ProxyManager\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Swiftmailer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"swiftmailer/swiftmailer": ">=4.2.0,<6.0-dev"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
"symfony/phpunit-bridge": "~2.7|~3.0.0"
},
"suggest": {
"symfony/http-kernel": ""
Expand All @@ -31,7 +31,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@
{{ block('form_widget_simple') }}
{%- endblock email_widget -%}

{%- block range_widget -%}
{% set type = type|default('range') %}
{{- block('form_widget_simple') -}}
{%- endblock range_widget %}

{%- block button_widget -%}
{%- if label is empty -%}
{%- if label_format is not empty -%}
Expand Down Expand Up @@ -314,7 +319,6 @@

{%- block widget_attributes -%}
id="{{ id }}" name="{{ full_name }}"
{%- if read_only %} readonly="readonly"{% endif -%}
{%- if disabled %} disabled="disabled"{% endif -%}
{%- if required %} required="required"{% endif -%}
{%- for attrname, attrvalue in attr -%}
Expand Down
32 changes: 16 additions & 16 deletions src/Symfony/Bridge/Twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
"twig/twig": "~1.18"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/asset": "~2.7",
"symfony/finder": "~2.3",
"symfony/form": "~2.7,>=2.7.1",
"symfony/http-kernel": "~2.3",
"symfony/intl": "~2.3",
"symfony/routing": "~2.2",
"symfony/templating": "~2.1",
"symfony/translation": "~2.7",
"symfony/yaml": "~2.0,>=2.0.5",
"symfony/security": "~2.6",
"symfony/stopwatch": "~2.2",
"symfony/console": "~2.7",
"symfony/var-dumper": "~2.6",
"symfony/expression-language": "~2.4"
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/asset": "~2.7|~3.0.0",
"symfony/finder": "~2.3|~3.0.0",
"symfony/form": "~2.8|~3.0.0",
"symfony/http-kernel": "~2.3|~3.0.0",
"symfony/intl": "~2.3|~3.0.0",
"symfony/routing": "~2.2|~3.0.0",
"symfony/templating": "~2.1|~3.0.0",
"symfony/translation": "~2.7|~3.0.0",
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
"symfony/security": "~2.6|~3.0.0",
"symfony/stopwatch": "~2.2|~3.0.0",
"symfony/console": "~2.7|~3.0.0",
"symfony/var-dumper": "~2.6|~3.0.0",
"symfony/expression-language": "~2.4|~3.0.0"
},
"suggest": {
"symfony/finder": "",
Expand All @@ -56,7 +56,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
16 changes: 8 additions & 8 deletions src/Symfony/Bundle/DebugBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
],
"require": {
"php": ">=5.3.9",
"symfony/http-kernel": "~2.6",
"symfony/twig-bridge": "~2.6",
"symfony/var-dumper": "~2.6"
"symfony/http-kernel": "~2.6|~3.0.0",
"symfony/twig-bridge": "~2.6|~3.0.0",
"symfony/var-dumper": "~2.6|~3.0.0"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/config": "~2.3",
"symfony/dependency-injection": "~2.3",
"symfony/web-profiler-bundle": "~2.3"
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/config": "~2.3|~3.0.0",
"symfony/dependency-injection": "~2.3|~3.0.0",
"symfony/web-profiler-bundle": "~2.3|~3.0.0"
},
"suggest": {
"symfony/config": "For service container configuration",
Expand All @@ -37,7 +37,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ protected function configure()
{
$this
->setDefinition(array(
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'),
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'),
new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'),
new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null),
new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'),
))
Expand Down Expand Up @@ -99,9 +100,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$address = $input->getArgument('address');

if (false === strpos($address, ':')) {
$output->writeln('The address has to be of the form <comment>bind-address:port</comment>.');

return 1;
$address = $address.':'.$input->getOption('port');
}

if ($this->isOtherServerProcessRunning($address)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ protected function configure()
{
$this
->setDefinition(array(
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'),
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'),
new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'),
new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null),
new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'),
))
Expand Down Expand Up @@ -106,9 +107,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$address = $input->getArgument('address');

if (false === strpos($address, ':')) {
$output->writeln('The address has to be of the form <comment>bind-address:port</comment>.');

return 1;
$address = $address.':'.$input->getOption('port');
}

if ($this->isOtherServerProcessRunning($address)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;

/**
* Stops a background process running PHP's built-in web server.
Expand All @@ -29,7 +30,8 @@ protected function configure()
{
$this
->setDefinition(array(
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'),
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'),
new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'),
))
->setName('server:stop')
->setDescription('Stops PHP\'s built-in web server that was started with the server:start command')
Expand All @@ -53,6 +55,10 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$address = $input->getArgument('address');
if (false === strpos($address, ':')) {
$address = $address.':'.$input->getOption('port');
}

$lockFile = $this->getLockFile($address);

if (!file_exists($lockFile)) {
Expand Down
Loading