Make UPDATE file more "githubish" ;-)

Added info about setting attributes on form field labels
This commit is contained in:
Joseph Bielawski 2011-06-02 03:51:23 -07:00
parent 4b86b15105
commit c244545255

138
UPDATE.md
View File

@ -21,90 +21,114 @@ beta3 to beta4
valid PHP callable. valid PHP callable.
* `EventDispatcher::addListener($eventName, $listener, $priority = 0)`: * `EventDispatcher::addListener($eventName, $listener, $priority = 0)`:
`$eventName` is the event name (cannot be an array anymore) and * `$eventName` is the event name (cannot be an array anymore),
`$listener` is a PHP callable. * `$listener` is a PHP callable.
* The events classes and constants have been renamed: * The events classes and constants have been renamed:
* `Symfony\Component\Form\Events` to `Symfony\Component\Form\FormEvents` * Old class name `Symfony\Component\Form\Events` and constants:
-Events::preBind = 'preBind' Events::preBind = 'preBind'
-Events::postBind = 'postBind' Events::postBind = 'postBind'
-Events::preSetData = 'preSetData' Events::preSetData = 'preSetData'
-Events::postSetData = 'postSetData' Events::postSetData = 'postSetData'
-Events::onBindClientData = 'onBindClientData' Events::onBindClientData = 'onBindClientData'
-Events::onBindNormData = 'onBindNormData' Events::onBindNormData = 'onBindNormData'
-Events::onSetData = 'onSetData' Events::onSetData = 'onSetData'
+FormEvents::PRE_BIND = 'form.pre_bind' * New class name `Symfony\Component\Form\FormEvents` and constants:
+FormEvents::POST_BIND = 'form.post_bind'
+FormEvents::PRE_SET_DATA = 'form.pre_set_data'
+FormEvents::POST_SET_DATA = 'form.post_set_data'
+FormEvents::BIND_CLIENT_DATA = 'form.bind_client_data'
+FormEvents::BIND_NORM_DATA = 'form.bind_norm_data'
+FormEvents::SET_DATA = 'form.set_data'
* `Symfony\Component\HttpKernel\Events` to `Symfony\Component\HttpKernel\CoreEvents` FormEvents::PRE_BIND = 'form.pre_bind'
FormEvents::POST_BIND = 'form.post_bind'
FormEvents::PRE_SET_DATA = 'form.pre_set_data'
FormEvents::POST_SET_DATA = 'form.post_set_data'
FormEvents::BIND_CLIENT_DATA = 'form.bind_client_data'
FormEvents::BIND_NORM_DATA = 'form.bind_norm_data'
FormEvents::SET_DATA = 'form.set_data'
-Events::onCoreRequest = 'onCoreRequest' * Old class name `Symfony\Component\HttpKernel\Events` and constants:
-Events::onCoreException = 'onCoreException'
-Events::onCoreView = 'onCoreView'
-Events::onCoreController = 'onCoreController'
-Events::onCoreResponse = 'onCoreResponse'
+CoreEvents::REQUEST = 'core.request' Events::onCoreRequest = 'onCoreRequest'
+CoreEvents::EXCEPTION = 'core.exception' Events::onCoreException = 'onCoreException'
+CoreEvents::VIEW = 'core.view' Events::onCoreView = 'onCoreView'
+CoreEvents::CONTROLLER = 'core.controller' Events::onCoreController = 'onCoreController'
+CoreEvents::RESPONSE = 'core.response' Events::onCoreResponse = 'onCoreResponse'
* `Symfony\Component\Security\Http\Events` to `Symfony\Component\Security\Http\SecurityEvents` * New class name `Symfony\Component\HttpKernel\CoreEvents` and constants:
-Events::onSecurityInteractiveLogin = 'onSecurityInteractiveLogin' CoreEvents::REQUEST = 'core.request'
-Events::onSecuritySwitchUser = 'onSecuritySwitchUser' CoreEvents::EXCEPTION = 'core.exception'
CoreEvents::VIEW = 'core.view'
CoreEvents::CONTROLLER = 'core.controller'
CoreEvents::RESPONSE = 'core.response'
+SecurityEvents::INTERACTIVE_LOGIN = 'security.interactive_login' * Old class name `Symfony\Component\Security\Http\Events` and constants:
+SecurityEvents::SWITCH_USER = 'security.switch_user'
Events::onSecurityInteractiveLogin = 'onSecurityInteractiveLogin'
Events::onSecuritySwitchUser = 'onSecuritySwitchUser'
* New class name `Symfony\Component\Security\Http\SecurityEvents` and constants:
SecurityEvents::INTERACTIVE_LOGIN = 'security.interactive_login'
SecurityEvents::SWITCH_USER = 'security.switch_user'
* `addListenerService` now only takes a single event name as its first * `addListenerService` now only takes a single event name as its first
argument. argument,
* Tags in configuration must now set the method to call: * Tags in configuration must now set the method to call:
-<tag name="kernel.listener" event="onCoreRequest" /> * Before:
+<tag name="kernel.listener" event="core.request" method="onCoreRequest" />
<tag name="kernel.listener" event="onCoreRequest" />
* After:
<tag name="kernel.listener" event="core.request" method="onCoreRequest" />
* Subscribers must now always return a hash: * Subscribers must now always return a hash:
public static function getSubscribedEvents() * Before:
{
- return Events::onBindNormData;
+ return array(FormEvents::BIND_NORM_DATA => 'onBindNormData');
}
* Form DateType parameter single-text changed to single_text public static function getSubscribedEvents()
{
return Events::onBindNormData;
}
* After:
public static function getSubscribedEvents()
{
return array(FormEvents::BIND_NORM_DATA => 'onBindNormData');
}
* Form `DateType` parameter `single-text` changed to `single_text`
* Form field label helpers now accepts setting attributes, i.e.:
```html+jinja
{{ form_label(form.name, 'Custom label', { 'attr': {'class': 'name_field'} }) }}
```
beta2 to beta3 beta2 to beta3
-------------- --------------
* The settings under "framework.annotations" have changed slightly: * The settings under `framework.annotations` have changed slightly:
Before: Before:
framework: framework:
annotations: annotations:
cache: file cache: file
file_cache: file_cache:
debug: true debug: true
dir: /foo dir: /foo
After: After:
framework: framework:
annotations: annotations:
cache: file cache: file
debug: true debug: true
file_cache_dir: /foo file_cache_dir: /foo
beta1 to beta2 beta1 to beta2
-------------- --------------
@ -591,4 +615,4 @@ PR8 to PR9
jar: "/path/to/yuicompressor.jar" jar: "/path/to/yuicompressor.jar"
my_filter: my_filter:
resource: "%kernel.root_dir%/config/my_filter.xml" resource: "%kernel.root_dir%/config/my_filter.xml"
foo: bar foo: bar