Skip to content

Commit

Permalink
Replace deprecation messages and comment for 3.0 (#3733)
Browse files Browse the repository at this point in the history
Old planned version was 2.4. It's now 3.0.

See why on #3731.
  • Loading branch information
soullivaneuh committed Apr 20, 2016
1 parent 0a83abb commit 2f26b5b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Admin/AdminInterface.php
Expand Up @@ -655,7 +655,7 @@ public function create($object);
*/
public function delete($object);

//TODO: uncomment this method for 3.0
//TODO: uncomment this method for 4.0
// /**
// * @param mixed $object
// */
Expand Down
4 changes: 2 additions & 2 deletions Controller/CRUDController.php
Expand Up @@ -385,7 +385,7 @@ public function editAction($id = null)
$form->handleRequest($request);

if ($form->isSubmitted()) {
//TODO: remove this check for 3.0
//TODO: remove this check for 4.0
if (method_exists($this->admin, 'preValidate')) {
$this->admin->preValidate($object);
}
Expand Down Expand Up @@ -670,7 +670,7 @@ public function createAction()
$form->handleRequest($request);

if ($form->isSubmitted()) {
//TODO: remove this check for 3.0
//TODO: remove this check for 4.0
if (method_exists($this->admin, 'preValidate')) {
$this->admin->preValidate($object);
}
Expand Down
2 changes: 1 addition & 1 deletion Controller/CoreController.php
Expand Up @@ -144,7 +144,7 @@ public function searchAction(Request $request)
* This method is compatible with both Symfony 2.3 and Symfony 3
*
* @deprecated Use the Request action argument. This method will be removed
* in SonataAdminBundle 3.0 and the action methods adjusted.
* in SonataAdminBundle 4.0 and the action methods adjusted.
*
* @return Request
*/
Expand Down
2 changes: 1 addition & 1 deletion Datagrid/ListMapper.php
Expand Up @@ -78,7 +78,7 @@ public function add($name, $type = null, array $fieldDescriptionOptions = array(
// Change deprecated inline action "view" to "show"
if ($name == '_action' && $type == 'actions') {
if (isset($fieldDescriptionOptions['actions']['view'])) {
@trigger_error('Inline action "view" is deprecated since version 2.2.4 and will be removed in 3.0. Use inline action "show" instead.', E_USER_DEPRECATED);
@trigger_error('Inline action "view" is deprecated since version 2.2.4 and will be removed in 4.0. Use inline action "show" instead.', E_USER_DEPRECATED);

$fieldDescriptionOptions['actions']['show'] = $fieldDescriptionOptions['actions']['view'];

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/cookbook/recipe_bootlint.rst
Expand Up @@ -2,7 +2,7 @@ Bootlint
========

The admin comes with `Bootlint`_ integration
since version 2.4.0. Bootlint is an HTML linter for Bootstrap projects.
since version 3.0. Bootlint is an HTML linter for Bootstrap projects.

You should use it when you want add some contributions on Sonata UI to check
the eventual Twitter Bootstrap conventions' mistakes.
Expand Down
@@ -1,7 +1,7 @@
Customizing a mosaic list
=========================

Since version 2.4, the AdminBundle now include a mosaic list mode in order to have a more visual representation.
Since version 3.0, the AdminBundle now include a mosaic list mode in order to have a more visual representation.

.. figure:: ../images/list_mosaic_default.png
:align: center
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/Admin.js
Expand Up @@ -138,10 +138,10 @@ var Admin = {
},

/**
* @deprecated in version 2.4
* @deprecated in version 3.0
*/
add_pretty_errors: function() {
console.warn('Admin.add_pretty_errors() was deprecated in version 2.4');
console.warn('Admin.add_pretty_errors() was deprecated in version 3.0');
},

stopEvent: function(event) {
Expand Down
8 changes: 4 additions & 4 deletions Util/AdminObjectAclData.php
Expand Up @@ -186,11 +186,11 @@ public function getMasks()
*
* @return AdminObjectAclData
*
* @deprecated Deprecated since version 2.4. Use setAclUsersForm() instead.
* @deprecated Deprecated since version 3.0. Use setAclUsersForm() instead.
*/
public function setForm(Form $form)
{
trigger_error('setForm() is deprecated since version 2.4. Use setAclUsersForm() instead.', E_USER_DEPRECATED);
trigger_error('setForm() is deprecated since version 3.0. Use setAclUsersForm() instead.', E_USER_DEPRECATED);

return $this->setAclUsersForm($form);
}
Expand All @@ -200,11 +200,11 @@ public function setForm(Form $form)
*
* @return Form
*
* @deprecated Deprecated since version 2.4. Use getAclUsersForm() instead.
* @deprecated Deprecated since version 3.0. Use getAclUsersForm() instead.
*/
public function getForm()
{
trigger_error('getForm() is deprecated since version 2.4. Use getAclUsersForm() instead.', E_USER_DEPRECATED);
trigger_error('getForm() is deprecated since version 3.0. Use getAclUsersForm() instead.', E_USER_DEPRECATED);

return $this->getAclUsersForm();
}
Expand Down
8 changes: 4 additions & 4 deletions Util/AdminObjectAclManipulator.php
Expand Up @@ -68,11 +68,11 @@ public function getMaskBuilderClass()
*
* @return Form
*
* @deprecated Deprecated since version 2.4. Use createAclUsersForm() instead.
* @deprecated Deprecated since version 3.0. Use createAclUsersForm() instead.
*/
public function createForm(AdminObjectAclData $data)
{
trigger_error('createForm() is deprecated since version 2.4. Use createAclUsersForm() instead.', E_USER_DEPRECATED);
trigger_error('createForm() is deprecated since version 3.0. Use createAclUsersForm() instead.', E_USER_DEPRECATED);

return $this->createAclUsersForm($data);
}
Expand Down Expand Up @@ -142,11 +142,11 @@ public function updateAclRoles(AdminObjectAclData $data)
*
* @param AdminObjectAclData $data
*
* @deprecated Deprecated since version 2.4. Use updateAclUsers() instead.
* @deprecated Deprecated since version 3.0. Use updateAclUsers() instead.
*/
public function updateAcl(AdminObjectAclData $data)
{
trigger_error('updateAcl() is deprecated since version 2.4. Use updateAclUsers() instead.', E_USER_DEPRECATED);
trigger_error('updateAcl() is deprecated since version 3.0. Use updateAclUsers() instead.', E_USER_DEPRECATED);

$this->updateAclUsers($data);
}
Expand Down

0 comments on commit 2f26b5b

Please sign in to comment.