Skip to content

Commit

Permalink
Merge 111dce5 into 9035b25
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed May 29, 2020
2 parents 9035b25 + 111dce5 commit 343424b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -26,6 +26,7 @@ $rules = [
'header_comment' => [
'header' => $header,
],
'logical_operators' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_extra_blank_lines' => true,
'no_php4_constructor' => true,
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,31 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.67.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.66.0...3.67.0) - 2020-05-28
### Added
- Manage class definition which is using "%parameter%" syntax.
- Added some `AbstractAdmin::configureDefaultSortValues` to override $datagridValues.
- Added some `AbstractAdminExtension::configureDefaultSortValues` to override $datagridValues.

### Fixed
- Reference to configuration option in `legacy_twig_text_extension` deprecation message.
- Call to deprecated `trans` method of `AbstractAdmin`
- Declare missing `one_to_many`, `many_to_many`, `many_to_one` and `one_to_one` type templates.

### Changed
- Update `doctrine/inflection` to ^1.4 || ^2.0
- update index of the first element in collection from 1 to 0

### Deprecated
- Accessing to a non existing value when adding field to `showMapper` and `listMapper`.
- Deprecate the `AbstractAdmin::maxPerPage` property
- Deprecate the `AbstractAdmin::setMaxPerPage` method
- Deprecate the `AbstractAdmin::perPageOption` property
- Deprecate the `AbstractAdmin::setPerPageOption` method
- Deprecate the `AbstractAdmin::predefinePerPageOptions` method
- Deprecate the `AbstractAdmin::datagridValues` property
- Deprecate implementing `ModelManagerInterface` without implementing `DatagridManagerInterface`

## [3.66.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.65.0...3.66.0) - 2020-05-03
### Added
- The possibility to edit/create an object without any field set in the configureFormField.
Expand Down
16 changes: 8 additions & 8 deletions src/Admin/AbstractAdmin.php
Expand Up @@ -109,7 +109,7 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
*
* The number of result to display in the list.
*
* @deprecated since sonata-project/admin-bundle 3.x.
* @deprecated since sonata-project/admin-bundle 3.67.
*
* @var int
*/
Expand Down Expand Up @@ -169,7 +169,7 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
*
* Default values to the datagrid.
*
* @deprecated since sonata-project/admin-bundle 3.x, use configureDefaultSortValues() instead.
* @deprecated since sonata-project/admin-bundle 3.67, use configureDefaultSortValues() instead.
*
* @var array
*/
Expand All @@ -183,7 +183,7 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
*
* Predefined per page options.
*
* @deprecated since sonata-project/admin-bundle 3.x.
* @deprecated since sonata-project/admin-bundle 3.67.
*
* @var array
*/
Expand Down Expand Up @@ -1379,12 +1379,12 @@ public function setFilterPersister(?FilterPersisterInterface $filterPersister =
/**
* NEXT_MAJOR: Remove this method.
*
* @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/admin-bundle 3.67, to be removed in 4.0.
*/
public function setMaxPerPage(int $maxPerPage): void
{
@trigger_error(sprintf(
'The method %s is deprecated since sonata-project/admin-bundle 3.x and will be removed in 4.0.',
'The method %s is deprecated since sonata-project/admin-bundle 3.67 and will be removed in 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand Down Expand Up @@ -2357,14 +2357,14 @@ public function supportsPreviewMode(): bool
/**
* NEXT_MAJOR: Remove this.
*
* @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/admin-bundle 3.67, to be removed in 4.0.
*
* Set custom per page options.
*/
public function setPerPageOptions(array $options): void
{
@trigger_error(sprintf(
'The method %s is deprecated since sonata-project/admin-bundle 3.x and will be removed in 4.0.',
'The method %s is deprecated since sonata-project/admin-bundle 3.67 and will be removed in 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand Down Expand Up @@ -2929,7 +2929,7 @@ protected function attachInlineValidator(): void
/**
* NEXT_MAJOR: Remove this function.
*
* @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/admin-bundle 3.67, to be removed in 4.0.
*
* Predefine per page options.
*/
Expand Down
8 changes: 8 additions & 0 deletions src/DependencyInjection/AbstractSonataAdminExtension.php
Expand Up @@ -53,6 +53,10 @@ protected function fixTemplatesConfiguration(
'choice' => '@SonataAdmin/CRUD/list_choice.html.twig',
'url' => '@SonataAdmin/CRUD/list_url.html.twig',
'html' => '@SonataAdmin/CRUD/list_html.html.twig',
'many_to_many' => '@SonataAdmin/CRUD/Association/list_many_to_many.html.twig',
'many_to_one' => '@SonataAdmin/CRUD/Association/list_many_to_one.html.twig',
'one_to_many' => '@SonataAdmin/CRUD/Association/list_one_to_many.html.twig',
'one_to_one' => '@SonataAdmin/CRUD/Association/list_one_to_one.html.twig',
],
'show' => [
'array' => '@SonataAdmin/CRUD/show_array.html.twig',
Expand All @@ -73,6 +77,10 @@ protected function fixTemplatesConfiguration(
'choice' => '@SonataAdmin/CRUD/show_choice.html.twig',
'url' => '@SonataAdmin/CRUD/show_url.html.twig',
'html' => '@SonataAdmin/CRUD/show_html.html.twig',
'many_to_many' => '@SonataAdmin/CRUD/Association/show_many_to_many.html.twig',
'many_to_one' => '@SonataAdmin/CRUD/Association/show_many_to_one.html.twig',
'one_to_many' => '@SonataAdmin/CRUD/Association/show_one_to_many.html.twig',
'one_to_one' => '@SonataAdmin/CRUD/Association/show_one_to_one.html.twig',
],
],
],
Expand Down
6 changes: 3 additions & 3 deletions src/Twig/Extension/SonataAdminExtension.php
Expand Up @@ -203,7 +203,7 @@ public function renderViewElement(
// NEXT_MAJOR: Remove the try catch in order to throw the NoValueException.
@trigger_error(
'Accessing a non existing value is deprecated'
.' since sonata-project/admin-bundle 3.x and will throw an exception in 4.0.',
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
E_USER_DEPRECATED
);

Expand Down Expand Up @@ -244,7 +244,7 @@ public function renderViewElementCompare(
// NEXT_MAJOR: Remove the try catch in order to throw the NoValueException.
@trigger_error(
'Accessing a non existing value is deprecated'
.' since sonata-project/admin-bundle 3.x and will throw an exception in 4.0.',
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
E_USER_DEPRECATED
);

Expand All @@ -257,7 +257,7 @@ public function renderViewElementCompare(
// NEXT_MAJOR: Remove the try catch in order to throw the NoValueException.
@trigger_error(
'Accessing a non existing value is deprecated'
.' since sonata-project/admin-bundle 3.x and will throw an exception in 4.0.',
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
E_USER_DEPRECATED
);

Expand Down

0 comments on commit 343424b

Please sign in to comment.