This PR was merged into the master branch.
Discussion
----------
removed deps checks in unit tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more.
see fabpot/Silex#626 where we did the same a while ago for Silex.
Commits
-------
de50621 removed deps checks in unit tests
* 2.3:
[Routing] fix phpdoc
[Form] Extracted ReferencingArrayIterator out of VirtualFormAwareIterator
[Yaml] Fix comment containing a colon on a scalar line being parsed as a hash.
[Form] Added a test that ensures that setData() reacts to dynamic modifications of a form's children
[Form] Removed exception in Button::setData(): setData() is now always called for all elements in the form tree during the initialization of the tree
[Form] Removed call to deprecated method
[Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms)
[Form] Removed superfluous reset() call
[Form] Fixed: submit() reacts to dynamic modifications of the form children
As Composer is now widely used in the PHP world, having to run composer
install before running the test suite is expected. This also has the
nice benefit of removing a bunch of code, making things easier to
maintain (there is only one place to declare a dev dependency), and
probably more.
* 2.3:
[Process] Revert change
[Process] Fix#8746 : slowness added in unit tests since #8741
[Process] Fix#8742 : Signal-terminated processes are not successful
corrected English grammar (s/does not exists/does not exist)
[Process] Add more precision to Process::stop timeout
[Process] Avoid zombie process in case of unit tests failure
[Process] Fix#8739
[Process] Add failing test for #8739
[Process] Fix CS
[TwigBridge] removed superflous ; when rendering form_enctype() (closes#8660)
Fixed documentation grammar for AuthenticationManagerInterface::authenticate()
[Validator] fixed the wrong isAbstract() check against the class (fixed#8589)
[TwigBridge] Prevent code extension to display warning
Fix internal sub-request creation
[FrameworkBundle] made code more generic
[Form] Moved auto_initialize option to the BaseType
Use strstr instead of strpos
Make sure ContextErrorException is loaded during compile time errors
Fix empty process argument escaping on Windows
Ignore null value in comparison validators
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
src/Symfony/Component/Process/Process.php
This PR was squashed before being merged into the 2.3 branch (closes#8349).
Discussion
----------
[Form] Moved auto_initialize option to the BaseType
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8162
| License | MIT
| Doc PR | -
I'm not fully confident in this change, so let someone review it before mergin please. My thinking was - since "auto_initialized" option is always passed to a form factory, it should be required by the base type.
Commits
-------
6ed0fdf [Form] Moved auto_initialize option to the BaseType
* 2.3:
moved some fixed dep versions from 2.2.* to ~2.2 (refs #8613)
[HttpKernel] added a missing dep for dev
[Form] fixed wrong call to setTimeZone() (closes#8644)
Fix issue with \DateTimeZone::UTC / 'UTC' for PHP 5.4
[Form] Fixed patched forms to be valid even if children are not submitted
Revert "[Form] Fix of "PATCH'ed forms are never valid""
[Form] Fixed: If a form is not present in a request, it is not automatically submitted
Fixes link indices
[Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser
Revert "[Form] Remove "value" attribute on empty_value option"
[routing] added ability for apache matcher to handle array values
removed dead code and fixed CS
[Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes#8589)
This PR was squashed before being merged into the master branch (closes#8430).
Discussion
----------
[Form] Validation listener remove count()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Removing what looks a extra count not needed.
Commits
-------
23a71e5 [Form] Validation listener remove count()
* 2.2:
Throw exception if value is passed to VALUE_NONE input, long syntax
fixed date type format pattern regex
[FrameworkBundle] tweaked previous merge (refs #8242)
do not re-register commands each time a Console\Application is run
[Process] moved env check to the Process class (refs #8227)
fix issue where $_ENV contains array vals
[DomCrawler] Fix handling file:// without a host
[Form] corrected interface bind() method defined against in deprecation notice
[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
Conflicts:
src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
src/Symfony/Component/DomCrawler/Link.php
src/Symfony/Component/Form/Form.php
* 2.2:
bumped Symfony version to 2.1.11-DEV
updated VERSION for 2.1.10
update CONTRIBUTORS for 2.1.10
updated CHANGELOG for 2.1.10
fixed CS
[Process] Cleanup tests & prevent assertion that kills randomly Travis-CI
[Filesystem] Fix regression introduced in 10dea948
Conflicts:
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
* 2.2:
added additional tests to cover invalid argument exceptions in OutputFormatterStyle component
added a missing check for the provider key
[Validator] fixed wrong URL for XSD
[Validator] Fixed: $traverse and $deep is passed to the visitor from Validator::validate()
[Form] Fixed transform()/reverseTransform() to always throw TransformationFailedExceptions
[Form] Fixed: String validation groups are never interpreted as callbacks
if the repository method returns an array ensure that it's internal poin...
[Form] Improved multi-byte handling of NumberToLocalizedStringTransformer
Fix wrong method in findTaggedServiceIds(), add example to docblock.
Conflicts:
src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php
* 2.1:
added additional tests to cover invalid argument exceptions in OutputFormatterStyle component
added a missing check for the provider key
[Validator] fixed wrong URL for XSD
[Form] Fixed transform()/reverseTransform() to always throw TransformationFailedExceptions
[Form] Fixed: String validation groups are never interpreted as callbacks
if the repository method returns an array ensure that it's internal poin...
Fix wrong method in findTaggedServiceIds(), add example to docblock.
Conflicts:
src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php
src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php
This PR was merged into the master branch.
Discussion
----------
[Form] Deprecated bind() and isBound() in favor of submit() and isSubmitted()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes (*)
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #5493
| License | MIT
| Doc PR | TODO
This change was discussed for a while in #5493. **(*)** It breaks BC *only for people who implemented* `FormInterface` *manually* (not a lot, so I hope). These can fix the problem by simply renaming `bind()` and `isBound()` in their implementation to `submit()` and `isSubmitted()`.
The main rationale is that with the request handlers introduced in #6522, people won't be confronted with the term "binding" anymore. As such, `isBound()` will be a very strange name to new users that have never used `bind()` manually.
See this code sample as example:
```php
$form = $this->createForm(...);
$form->handleRequest($request);
// Imagine you have never heard about bind() or binding. What does this mean?
if ($form->isBound()) {
// ...
}
```
In reality, `bind()` submits a form. Where-ever I renamed "bind" to "submit" in the comments, "submit" made actually much more sense. So it does in the code sample above:
```php
$form = $this->createForm(...);
$form->handleRequest($request);
// Aha!
if ($form->isSubmitted()) {
// ...
}
```
Also when using `submit()` directly, the code makes much more sense now:
```php
$text = $this->createForm('text');
$text->submit('New Value');
```
For current users, the current naming will be supported until 3.0.
Commits
-------
41b0127 [Form] Deprecated bind() and isBound() in favor of submit() and isSubmitted()
This PR was merged into the master branch.
Discussion
----------
[2.3] [Form] Renamed option "virtual" to "inherit_data" and improved handling of such forms
Bug fix: yes
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #5899, #5720, #5578
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#2107
This PR renames the option "virtual" to "inherit_data" for more clarity (the old option is deprecated and usable until 2.3). It also fixes the behavior of forms having that option set.
Forms with that option set will now correctly return their parents' data from `getData()`, `getNormData()` and `getViewData()`. Furthermore, `getPropertyPath()` was fixed for forms that inherit their parent data.
Commits
-------
1290b80 [Form] Fixed the deprecation notes for the "virtual" option
ac2ca44 [Form] Moved parent data inheritance from data mappers to Form
8ea5e1a [Form] Renamed option "virtual" to "inherit_data"
This PR was merged into the master branch.
Discussion
----------
[Intl] Refactored Locale component into two new components Icu and Intl
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #5279
| License | MIT
| Doc PR | symfony/symfony-docs#2312
The Intl component is now a simple drop-in replacement layer for the C intl extension. Install it via Composer and have it available automatically if the intl extension is not available.
Additionally, the component ships data from the ICU library which can be accessed through the methods:
```php
use Symfony\Component\Intl\Intl;
Intl::getCurrencyBundle()->...
Intl::getLanguageBundle()->...
Intl::getLocaleBundle()->...
Intl::getRegionBundle()->...
```
If the intl extension is installed, Composer will install the ICU data for the ICU version in the intl extension. If the intl extension is not installed, Composer will use stub ICU data for the latest ICU version (see `Intl::getStubIcuVersion()`).
See the [README](/bschussek/symfony/blob/intl/src/Symfony/Component/Intl/README.md) for more information.
Todo:
- [x] finish the Intl README file
- [x] update the Icu README file
- [x] update the documentation
- [x] make parameter `$locale` optional (default to `\Locale::getDefault()`) in resource bundle methods
- [x] remove `(Icu)?Version::compare` calls in the tests
- [x] solve deployment problem when trying to install incompatible symfony/icu version listed in composer.lock
Create the following branches in the [Icu component](https://github.com/symfony/Icu):
- [x] 1.0.x
- [x] 1.1.x
- [x] 1.2.x
Commits
-------
9118b4a [Locale] Removed "Stub" prefixes in Intl component
b4cccfd [Intl] Removed "Stub" prefix from stub classes
60f31d1 [Intl] Improved inline documentation
c2d37e6 [Intl] Improved error messages in the build scripts
1249f01 [Intl] Added scripts to test the compatibility of various versions of symfony/icu with the ICU version installed on the system
9dbafd7 [Intl] Split update-stubs.php script into two scripts to function with the changed Icu component versioning
e2c11cb [Intl] Added a check for the ICU data version to IntlTestHelper to prevent the stub class tests from failing
427d24a [Intl] Outsourced bundle reader creation to Icu component
0160fd5 [Intl] Moved stub data to Icu component 1.0.x
dbca3b7 [Intl] Added empty directory needed for the tests
a717ce9 [Intl] Removed ICU version comparisons from the tests
5d17de5 [Intl] Fixed version comparisons in the transformation rules
470927d [Intl] Improved build scripts
aceb20d [Form] Improved tests to use the IntlTestHelper class
3dd75ff [Locale] Improved tests to use the IntlTestHelper class
03b78b0 [Validator] Improved tests to use the IntlTestHelper class
9d9c389 [Intl] Simplified tests
c55c4a2 [Intl] Only the StubNumberFormatterTest requires stub data
17a480b [Intl] Added IntlTestHelper class for convenience
1dcdcd3 [Locale] Fixed failing tests
f6b75b9 [Intl] Changed composer.json to disallow future versions of the Icu component
080c880 [Intl] Bumped the stub version to 50.1.2
dd2d013 [Intl] Improved the bundle compilation process
f47e60a [Intl] Fixed small bugs in the resource bundle transformation
467cc93 [Intl] Fixed various problems in the resource compilation process
4a5c453 [Intl] Moved the content of the README file to symfony/symfony-docs
9899de7 [Intl] Updated the README
bfec58a [Intl] Fixed flawed PHPDoc
21323ba [Intl] Updated the README file
209a9cb [Validator] Adapted to latest Intl changes
f2a0aec [Form] Adapted to latest Intl changes
0f6277f [Locale] Adapted to latest Intl changes
2cd1be8 [Intl] Made the $locale parameter optional in the bundle interfaces
b9e9cb2 [Intl] Added autoload.php which was ignored by .gitignore
838798f [Intl] Removed method IntlTestCase::skipIfInsufficientIcuVersion()
dde1d34 [Intl] Changed Intl::getIcuVersion() to return the stub version if the intl extension is not loaded
99f6f8a [Form] Fixed failing tests
5d0b849 Fixed PHPDoc
b60866c [Intl] Changed Intl::getStubIcuVersion() to Intl::getIcuStubVersion()
b902b6b [Locale] Added default locale
01d0ee8 [Validator] Changed component to use the Intl component
0c1fe39 [Form] Changed component to use the Intl component
5917a2e [Intl] Refactored Locale component into two new components Icu and Intl
This PR was merged into the master branch.
Discussion
----------
[2.3] [Form] Support buttons in forms
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #5383
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#2489
The general idea of this PR is to be able to add buttons to forms like so:
```php
$builder->add('clickme', 'submit');
```
You can then check in the controller whether the button was clicked:
```php
if ($form->get('clickme')->isClicked()) {
// do stuff
}
```
Button-specific validation groups are also supported:
```php
$builder->add('clickme', 'submit', array(
'validation_groups' => 'OnlyClickMe',
));
```
The validation group will then override the one defined in the form if that button is clicked.
This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:
```php
$builder->add('clickme', 'submit', array(
'validation_groups' => false,
));
```
The same can be achieved (already before this PR) by passing an empty array:
```php
$builder->add('clickme', 'submit', array(
'validation_groups' => array(),
));
```
See the linked documentation for more information.
Commits
-------
faf8d7a [Form] Added upgrade information about setting "validation_groups" => false
d504732 [Form] Added leading backslashes to @exceptionMessage doc blocks
c8afa88 [Form] Removed deprecated code scheduled for removal in 2.3
36ca056 [Form] Simplified Twig code
ce29c70 [Form] Fixed incorrect doc comment
0bc7129 [Form] Fixed invalid use of FormException
600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.
277d6df [Form] Fixed concatenation operator CS (see 7c47e34928)
7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag
7b438a8 [Form] Made submit buttons able to convey validation groups
cc2118d [Form] Implemented support for buttons