diff --git a/UPDATE.md b/UPDATE.md index c44a4a4609..8438a79bec 100644 --- a/UPDATE.md +++ b/UPDATE.md @@ -15,117 +15,147 @@ beta1 to beta2 Before: - /** - * @orm:Entity - */ - class MyUser - { - /** - * @orm:Id - * @orm:GeneratedValue(strategy = "AUTO") - * @orm:Column(type="integer") - * @var integer - */ - private $id; - - /** - * @orm:Column(type="string", nullable=false) - * @assert:NotBlank - * @var string - */ - private $name; - } +``` php +getParameter('doctrine.orm.entity_managers') $container->getParameter('doctrine.orm.default_entity_manager') $container->getParameter('doctrine.orm.default_connection') - After: + After: $container->get('doctrine')->getEntityManagerNames() $container->get('doctrine')->getDefaultEntityManagerName() $container->get('doctrine')->getDefaultConnectionName() - But you don't really need to use these methods anymore, as to get an entity - manager, you can now use the registry directly: + But you don't really need to use these methods anymore, as to get an entity + manager, you can now use the registry directly: - Before: + Before: $em = $this->get('doctrine.orm.entity_manager'); $em = $this->get('doctrine.orm.foobar_entity_manager'); - After: + After: $em = $this->get('doctrine')->getEntityManager(); $em = $this->get('doctrine')->getEntityManager('foobar'); @@ -204,51 +234,51 @@ beta1 to beta2 Before: - app/translations/catalogue.fr.xml + app/translations/catalogue.fr.xml After: - app/Resources/translations/catalogue.fr.xml + app/Resources/translations/catalogue.fr.xml -* The option "modifiable" of the "collection" form type was split into two - options "allow_add" and "allow_delete". +* The option `modifiable` of the `collection` form type was split into two + options `allow_add` and `allow_delete`. Before: - $builder->add('tags', 'collection', array( - 'type' => 'text', - 'modifiable' => true, - )); + $builder->add('tags', 'collection', array( + 'type' => 'text', + 'modifiable' => true, + )); After: - $builder->add('tags', 'collection', array( - 'type' => 'text', - 'allow_add' => true, - 'allow_delete' => true, - )); + $builder->add('tags', 'collection', array( + 'type' => 'text', + 'allow_add' => true, + 'allow_delete' => true, + )); -* Request::hasSession() has been renamed to Request::hasPreviousSession(). The - method hasSession() still exists, but only checks if the request contains a +* `Request::hasSession()` has been renamed to `Request::hasPreviousSession()`. The + method `hasSession()` still exists, but only checks if the request contains a session object, not if the session was started in a previous request. * Serializer: The NormalizerInterface's `supports()` method has been split in - two methods: `supportsNormalization` and `supportsDenormalization`. + two methods: `supportsNormalization()` and `supportsDenormalization()`. -* ParameterBag::getDeep() has been removed, and is replaced with a boolean flag - on the ParameterBag::get() method. +* `ParameterBag::getDeep()` has been removed, and is replaced with a boolean flag + on the `ParameterBag::get()` method. * Serializer: `AbstractEncoder` & `AbstractNormalizer` were renamed to `SerializerAwareEncoder` & `SerializerAwareNormalizer`. * Serializer: The `$properties` argument has been dropped from all interfaces. -* Form: Renamed option value "text" of "widget" option of the "date" type was - renamed to "single-text". "text" indicates to use separate text boxes now - (like for the "time" type). +* Form: Renamed option value `text` of `widget` option of the `date` type was + renamed to `single-text`. `text` indicates to use separate text boxes now + (like for the `time` type). -* Form: Renamed view variable "name" to "full_name". The variable "name" now - contains the local, short name (equivalent to $form->getName()). +* Form: Renamed view variable `name` to `full_name`. The variable `name` now + contains the local, short name (equivalent to `$form->getName()`). PR12 to beta1 ------------- @@ -291,27 +321,27 @@ PR12 to beta1 * The `trans` tag does not accept a message as an argument anymore: - {% trans "foo" %} - {% trans foo %} + {% trans "foo" %} + {% trans foo %} - Use the long version the tags or the filter instead: + Use the long version the tags or the filter instead: - {% trans %}foo{% endtrans %} - {{ foo|trans }} + {% trans %}foo{% endtrans %} + {{ foo|trans }} - This has been done to clarify the usage of the tag and filter and also to - make it clearer when the automatic output escaping rules are applied (see - the doc for more information). + This has been done to clarify the usage of the tag and filter and also to + make it clearer when the automatic output escaping rules are applied (see + the doc for more information). -* Some methods in the DependencyInjection component's ContainerBuilder and - Definition classes have been renamed to be more specific and consistent: +* Some methods in the DependencyInjection component's `ContainerBuilder` and + `Definition` classes have been renamed to be more specific and consistent: - Before: + Before: $container->remove('my_definition'); $definition->setArgument(0, 'foo'); - After: + After: $container->removeDefinition('my_definition'); $definition->replaceArgument(0, 'foo'); @@ -322,18 +352,18 @@ PR12 to beta1 PR11 to PR12 ------------ -* HttpFoundation\Cookie::getExpire() was renamed to getExpiresTime() +* `HttpFoundation\Cookie::getExpire()` was renamed to `getExpiresTime()` * XML configurations have been normalized. All tags with only one attribute have been converted to tag content: - Before: + Before: - After: + After: MyBundle twig @@ -356,7 +386,7 @@ PR10 to PR11 that the BC is kept but implementing this interface in your extensions will allow for further developments. -* The "fingerscrossed" Monolog option has been renamed to "fingers_crossed". +* The `fingerscrossed` Monolog option has been renamed to `fingers_crossed`. PR9 to PR10 ----------- @@ -454,11 +484,11 @@ PR8 to PR9 * Assetic filters must be now explicitly loaded: - assetic: - filters: - cssrewrite: ~ - yui_css: - jar: "/path/to/yuicompressor.jar" - my_filter: - resource: "%kernel.root_dir%/config/my_filter.xml" - foo: bar + assetic: + filters: + cssrewrite: ~ + yui_css: + jar: "/path/to/yuicompressor.jar" + my_filter: + resource: "%kernel.root_dir%/config/my_filter.xml" + foo: bar \ No newline at end of file