This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier 1de60c902c merged branch ricardclau/rename_choice_to_oneof (PR #6360)
This PR was merged into the master branch.

Commits
-------

9071676 create oneof constraint and add deprecation messages in choice, also make choice extend new oneOf constraint to avoid duplicate code

Discussion
----------

[Validator] Rename "Choice" to "OneOf"

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6324
Todo:
License of the code: MIT
Documentation PR: https://github.com/symfony/symfony-docs/issues/2025

---------------------------------------------------------------------------

by bschussek at 2012-12-14T18:20:56Z

Can you let `Choice` and `ChoiceValidator` extend the renamed classes? Then we avoid the code duplication. You can also remove `ChoiceValidatorTest` then.

---------------------------------------------------------------------------

by ricardclau at 2012-12-14T18:26:58Z

For sure! BTW there seems to be a problem with SF2 build when testing BR currency :S maybe it is the new ICU version supported, I guess you are aware of this but just in case!

---------------------------------------------------------------------------

by stof at 2012-12-14T21:14:04Z

the ``Choice`` constraint should trigger a ``E_USER_DEPRECATED`` in its constructor (and calling the parent constructor) as we agreed on this. The PR adding these calls everywhere is not merged yet, but it would avoid missing it when merging the PRs separately

---------------------------------------------------------------------------

by bschussek at 2012-12-14T21:19:45Z

Things missing:

* add a deprecation note to the Validator's CHANGELOG
* add a block in UPGRADE-2.2 under the Validator's "Deprecations" section that explains how to upgrade with a before/after sample
* add `trigger_error()` calls to the constructors of `Choice` and `ChoiceValidator`

See #6180 for more information about how to call `trigger_error()`.

---------------------------------------------------------------------------

by ricardclau at 2012-12-14T22:45:55Z

Sorry I was not aware of the trigger_error() agreement, absolutely +1 on it.

I hope I understood everything properly, if there is something else or some other errors please tell me!

---------------------------------------------------------------------------

by bschussek at 2012-12-15T08:46:51Z

The entry in the CHANGELOG is still missing.

---------------------------------------------------------------------------

by ricardclau at 2012-12-15T09:36:28Z

By the CHANGELOG you mean what I just added right? Hope now it is ok!

---------------------------------------------------------------------------

by bschussek at 2012-12-15T09:45:16Z

Awesome! 👍
2012-12-15 13:25:28 +01:00
src/Symfony merged branch ricardclau/rename_choice_to_oneof (PR #6360) 2012-12-15 13:25:28 +01:00
.editorconfig Add EditorConfig File 2012-06-16 14:08:15 +02:00
.gitignore ignore composer.phar 2012-04-20 14:10:06 +01:00
.travis.yml [travis-ci] Zend Garbage Collection only for PHP5.4 2012-11-19 15:21:43 +01:00
autoload.php.dist [travis-ci] Zend Garbage Collection only for PHP5.4 2012-11-19 15:21:43 +01:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.19 2012-11-29 12:35:10 +01:00
CHANGELOG-2.1.md fix date in changelog 2012-12-10 19:38:43 +00:00
composer.json bumped min version of Twig to 1.11.0 2012-12-13 15:33:46 +01:00
CONTRIBUTING.md Create CONTRIBUTING.md file for auto-linking in PR's 2012-09-17 14:40:53 -04:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.19 2012-11-29 12:35:34 +01:00
LICENSE Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
phpunit.xml.dist [Locale] fixed tests 2012-12-05 14:13:56 +01:00
README.md Merge branch '2.0' into 2.1 2012-12-11 11:33:11 +01:00
UPGRADE-2.1.md Merge branch '2.1' 2012-11-29 11:32:45 +01:00
UPGRADE-2.2.md create oneof constraint and add deprecation messages in choice, also make choice extend new oneOf constraint to avoid duplicate code 2012-12-15 10:29:01 +01:00

README

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.3 and up.

Be warned that PHP versions before 5.3.8 are known to be buggy and might not work for you:

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.

Running Symfony2 Tests

Information on how to run the Symfony2 test suite can be found in the Running Symfony2 Tests section.