EasyAdmin Upgrade Guide ======================= This document describes the backwards incompatible changes introduced by each EasyAdminBundle version and the needed changes to be made before upgrading to the next version. Upgrade to 2.0.0 (XX/XXX/201X) ------------------------------ * The route used to generate every backend URL is now called `easyadmin` instead of `admin`. This change has been introduce to prevent collisions with your existing backend routes, where is common to use the `admin` route name. In order to upgrade, you just need to replace `admin` by `easyadmin` in all `path()`, `generateUrl()` and `redirectToRoute()` calls. Upgrade to 1.13.0 (XX/April/2016) --------------------------------- * The configuration of the backend is no longer processed in a compiler pass but generated with a cache warmer. This is done to avoid issues with Doctrine and Twig services, which are needed to process the configuration but they are not fully available during the container compilation. * In the development environment, the backend config is fully processed for each request, so you might notice a slight performance impact. In exchange, you won't suffer any cache problem or any outdated config problem. In production the backend config is fully processed in the cache warmer or, if any problem happened, during the first request. Then the config is cached in the file system and reused in the following requests. * The `easyadmin.configurator` service has been renamed to `easyadmin.config.manager` * The `easyadmin.config` container parameter no longer contains the fully processed backend configuration. Now it only contains the configuration that the developer defined in their YAML files. The equivalent way to get the fully processed backend config is to use the `easyadmin.config.manager` service: // Before $backendConfig = $this->getParameter('easyadmin.config'); // After $backendConfig = $this->get('easyadmin.config.manager')->getBackendConfig(); Upgrade to 1.12.6 (15/April/2016) --------------------------------- * Web assets are now combined and minified to improve frontend performance. In previous versions, CSS and JS were included by loading lots of small files. Starting from this version, the backend only loads one CSS file (called `easyadmin-all.min.css`) and one JS file (called `easyadmin-all.min.js`). The individual CSS/JS files are still available in case you override the backend design and want to pick some of them individually. The new CSS/JSS files should be available in your application after upgrading this version bundle. If you have any problem, install the new assets executing the `assets:install --symlinks` console command. Upgrade to 1.12.5 (03/March/2016) --------------------------------- * The `renderCssAction()` method of the AdminController has been deprecated and its associated route `@Route("/_css/easyadmin.css", name="_easyadmin_render_css")` has been removed. The custom CSS now is preprocessed during container compilation and the result is stored in the `_internal.custom_css` option of the processed backend configuration. Upgrade to 1.11.6 (26/February/2016) ------------------------------------ * `findBy()` and `createSearchQueryBuilder()` methods now receive two new parameters called `$sortField` and `$sortDirection` to allow sorting the search results. Upgrade to 1.9.5 (13/December/2015) ----------------------------------- * The `isReadable` and `isWritable` options are no longer available for each property metadata. These options were needed when we introspected the getters and setters of the properties ourselves. We now use the Symfony PropertyAccessor component to get and set values for entity properties. * The `Configurator::introspectGettersAndSetters()` method, the `Reflection/ClassPropertyReflector` class and the `easyadmin.property_reflector` service have been deleted and replaced by the use of the `PropertyAccessor` class, its `getValue()` and `setValue()` methods and the `@property_accessor` service. Upgrade to 1.9.2 (24/November/2015) ----------------------------------- * The `render404error()` utility method has been removed from `AdminController`. This method was no longer used since we started throwing custom exceptions when an error occurs. * The `ajaxEdit()` method of the `AdminController` has been removed. This method had nothing to do with editing an entity via Ajax. It was just used to toggle the value of boolean properties. It has been replaced by a private method called `updateEntityProperty()`. Upgrade to 1.8.0 (8/November/2015) ---------------------------------- * The options that define if a entity property is readable and/or writable have changed their name to match the names used by Symfony: ```php // Before $propertyMetadata['canBeGet']; $propertyMetadata['canBeSet']; // After $propertyMetadata['isReadable']; $propertyMetadata['isWritable']; ``` This only affects you if you make a very advance use of the bundle and override lots of its functionalities. * The `form.html.twig` template has been removed and therefore, you cannot define the `easy_admin.design.templates.form` to override it by your own template. If you want to customize the forms of the backend, use a proper Symfony form theme and enable it in the `easy_admin.design.form_theme` option. Upgrade to 1.5.5 (22/June/2015) ------------------------------- In order to improve the consistency of the backend design, all CSS class names have been updated to use dashes instead of underscores, to match the syntax used by Bootstrap classes. This means that `field_date` is now `field-date`, `theme_boostrap...` is now `theme-bootstrap...`, etc. Moreover, the global `css` class applied to the `
` element of each view has changed: | View | OLD `` CSS class | NEW `` CSS class | ------ | -------------------------- | --------------------------------------- | `edit` | `admin edit