Skip to content

Commit

Permalink
3.69.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jun 14, 2020
1 parent bde0095 commit f807ac1
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 17 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,47 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.69.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.68.0...3.69.0) - 2020-06-14
### Added
- Added `FieldDescriptionInterface::getParent()`.
- Added `FieldDescriptionInterface::getAssociationAdmin()`.
- Added `FieldDescriptionInterface::getAdmin()`.
- Body classes `sonata-icheck` and `sonata-select2` when iCheck or Select2 are
enabled.
- Added `Sonata\AdminBundle\EventListener\AssetsInstallCommandListener` to add
`sonatacore` asssets when SonataCoreBundle is not installed

### Fixed
- Type guessing the `_action` list field.
- Styling of checkboxes and radio buttons when iCheck is disabled.

### Changed
- Changed use of `truncate` filter with `u` filter.
- ignore `sonata.admin.configuration.legacy_twig_text_extension` when
SonataCoreBundle is not installed

### Deprecated
- Calling `AbstractAdmin::getChild()` when there is no child.
- Calling `BaseFieldDescription::getParent()` when there is no parent.
- Calling `BaseFieldDescription::getAssociationAdmin()` when there is no
association admin.
- Calling `BaseFieldDescription::getAdmin()` when there is no admin.
- Calling `Pool::getAdminByClass()` when there is no admin for the class.
- Deprecated `Sonata\AdminBundle\Twig\Extension\UnicodeString` in favor of
`Symfony\Component\String\UnicodeString`.
- Deprecated `sonata_truncate` in favor of `u.truncate`.
- Deprecated `FieldDescriptionInterface::getTargetEntity()` in favor of
`FieldDescriptionInterface::getTargetModel()`;
- Deprecated `AdminHelper::getEntityClassName()` in favor of
`AdminHelper::getModelClassName()`;
- Deprecated `GenerateObjectAclCommand::getUserEntityClass()` in favor of
`GenerateObjectAclCommand::getUserModelClass()`.
- Deprecated `--user_entity` option in favor of `--user_model` at
`sonata:admin:generate-object-acl` command.

### Removed
- remove all `SonataCoreBundle` dependencies

## [3.68.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.67.0...3.68.0) - 2020-05-31
### Added
- Added `TemplateRegistry::TYPE_*` constant to be used instead of string value.
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ public function getFormFieldDescription($name)

if (!$this->hasFormFieldDescription($name)) {
@trigger_error(sprintf(
'Calling %s() when there is no form field description is deprecated since sonata-project/admin-bundle 3.x and will throw an exception in 4.0. '.
'Calling %s() when there is no form field description is deprecated since sonata-project/admin-bundle 3.69 and will throw an exception in 4.0. '.
'Use %s::hasFormFieldDescription() to know if there is a form field description.',
__METHOD__,
__CLASS__
Expand Down Expand Up @@ -1898,7 +1898,7 @@ public function getShowFieldDescription($name)

if (!$this->hasShowFieldDescription($name)) {
@trigger_error(sprintf(
'Calling %s() when there is no show field description is deprecated since sonata-project/admin-bundle 3.x and will throw an exception in 4.0. '.
'Calling %s() when there is no show field description is deprecated since sonata-project/admin-bundle 3.69 and will throw an exception in 4.0. '.
'Use %s::hasFormFieldDescription() to know if there is a show field description.',
__METHOD__,
__CLASS__
Expand Down Expand Up @@ -1988,7 +1988,7 @@ public function getFilterFieldDescription($name)

if (!$this->hasFilterFieldDescription($name)) {
@trigger_error(sprintf(
'Calling %s() when there is no filter field description is deprecated since sonata-project/admin-bundle 3.x and will throw an exception in 4.0. '.
'Calling %s() when there is no filter field description is deprecated since sonata-project/admin-bundle 3.69 and will throw an exception in 4.0. '.
'Use %s::hasFilterFieldDescription() to know if there is a filter field description.',
__METHOD__,
__CLASS__
Expand Down Expand Up @@ -2078,7 +2078,7 @@ public function getChild($code)
{
if (!$this->hasChild($code)) {
@trigger_error(sprintf(
'Calling %s() when there is no child is deprecated since sonata-project/admin-bundle 3.x'
'Calling %s() when there is no child is deprecated since sonata-project/admin-bundle 3.69'
.' and will throw an exception in 4.0. Use %s::hasChild() to know if the child exists.',
__METHOD__,
__CLASS__
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/AdminHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ protected function getModelClassName(AdminInterface $admin, array $elements): st
/**
* NEXT_MAJOR: Remove this method and move its body to `getModelClassName()`.
*
* @deprecated since sonata-project/admin-bundle 3.x. Use `getModelClassName()` instead.
* @deprecated since sonata-project/admin-bundle 3.69. Use `getModelClassName()` instead.
*
* @param array $elements
*
Expand All @@ -357,7 +357,7 @@ protected function getEntityClassName(AdminInterface $admin, $elements)
{
if (self::class !== static::class) {
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/admin-bundle 3.x and will be removed in version 4.0.'
'Method %s() is deprecated since sonata-project/admin-bundle 3.69 and will be removed in version 4.0.'
.' Use %s::getModelClassName() instead.',
__METHOD__,
__CLASS__
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/BaseFieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function getParent()
if (!$this->hasParent()) {
@trigger_error(
sprintf(
'Calling %s() when there is no parent is deprecated since sonata-project/admin-bundle 3.x'
'Calling %s() when there is no parent is deprecated since sonata-project/admin-bundle 3.69'
.' and will throw an exception in 4.0. Use %s::hasParent() to know if there is a parent.',
__METHOD__,
__CLASS__
Expand Down Expand Up @@ -284,7 +284,7 @@ public function getAssociationAdmin()
if (!$this->hasAssociationAdmin()) {
@trigger_error(
sprintf(
'Calling %s() when there is no association admin is deprecated since sonata-project/admin-bundle 3.x'
'Calling %s() when there is no association admin is deprecated since sonata-project/admin-bundle 3.69'
.' and will throw an exception in 4.0. Use %s::hasAssociationAdmin() to know if there is an association admin.',
__METHOD__,
__CLASS__
Expand Down Expand Up @@ -371,7 +371,7 @@ public function getAdmin()
if (!$this->hasAdmin()) {
@trigger_error(
sprintf(
'Calling %s() when there is no admin is deprecated since sonata-project/admin-bundle 3.x'
'Calling %s() when there is no admin is deprecated since sonata-project/admin-bundle 3.69'
.' and will throw an exception in 4.0. Use %s::hasAdmin() to know if there is an admin.',
__METHOD__,
__CLASS__
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/FieldDescriptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getAssociationMapping();
*
* Returns the related Target object model.
*
* @deprecated since sonata-project/admin-bundle 3.x. Use `getTargetModel()` instead.
* @deprecated since sonata-project/admin-bundle 3.69. Use `getTargetModel()` instead.
*
* @return string|null
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function getAdminByClass($class)
if (!$this->hasAdminByClass($class)) {
@trigger_error(sprintf(
'Calling %s() when there is no admin for the class %s is deprecated since sonata-project/admin-bundle'
.' 3.x and will throw an exception in 4.0. Use %s::hasAdminByClass() to know if the admin exists.',
.' 3.69 and will throw an exception in 4.0. Use %s::hasAdminByClass() to know if the admin exists.',
__METHOD__,
$class,
__CLASS__
Expand Down
8 changes: 4 additions & 4 deletions src/Command/GenerateObjectAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ protected function initialize(InputInterface $input, OutputInterface $output)
// NEXT_MAJOR: Remove the following conditional block.
if (null !== $input->getOption('user_entity')) {
$output->writeln([
'Option <comment>user_entity</comment> is deprecated since sonata-project/admin-bundle 3.x and will be removed in version 4.0.'
'Option <comment>user_entity</comment> is deprecated since sonata-project/admin-bundle 3.69 and will be removed in version 4.0.'
.' Use <comment>user_model</comment> option instead.',
'',
]);

@trigger_error(
'Option "user_entity" is deprecated since sonata-project/admin-bundle 3.x and will be removed in version 4.0.'
'Option "user_entity" is deprecated since sonata-project/admin-bundle 3.69 and will be removed in version 4.0.'
.' Use "user_model" option instead.',
E_USER_DEPRECATED
);
Expand All @@ -207,15 +207,15 @@ protected function getUserModelClass(InputInterface $input, OutputInterface $out
/**
* NEXT_MAJOR: Remove this method and move its body to `getUserModelClass()`.
*
* @deprecated since sonata-project/admin-bundle 3.x. Use `getUserModelClass()` instead.
* @deprecated since sonata-project/admin-bundle 3.69. Use `getUserModelClass()` instead.
*
* @return string
*/
protected function getUserEntityClass(InputInterface $input, OutputInterface $output)
{
if (self::class !== static::class) {
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/admin-bundle 3.x and will be removed in version 4.0.'
'Method %s() is deprecated since sonata-project/admin-bundle 3.69 and will be removed in version 4.0.'
.' Use %s::getUserModelClass() instead.',
__METHOD__,
__CLASS__
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/Extension/StringExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function deprecatedTruncate(Environment $env, ?string $text, int $length
{
@trigger_error(
'The "sonata_truncate" twig filter is deprecated'
.' since sonata-project/admin-bundle 3.x and will be removed in 4.0. Use "u.truncate" instead.',
.' since sonata-project/admin-bundle 3.69 and will be removed in 4.0. Use "u.truncate" instead.',
E_USER_DEPRECATED
);

Expand Down
2 changes: 1 addition & 1 deletion src/Twig/Extension/UnicodeString.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @see https://github.com/symfony/symfony/pull/35649
*
* NEXT_MAJOR: Remove this class
* @deprecated since sonata-project/admin-bundle 3.x, use Symfony\Component\String\UnicodeString instead.
* @deprecated since sonata-project/admin-bundle 3.69, use Symfony\Component\String\UnicodeString instead.
*
* @throws ExceptionInterface
*
Expand Down

0 comments on commit f807ac1

Please sign in to comment.