Skip to content

Commit

Permalink
migrate ErrorElement
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Mar 10, 2015
1 parent e8e0cd4 commit 06fac25
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Block/BaseBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Sonata\BlockBundle\Block;

use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Sonata\BlockBundle\Model\BlockInterface;
Expand Down
4 changes: 2 additions & 2 deletions Block/BlockAdminServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

interface BlockAdminServiceInterface
{
Expand Down Expand Up @@ -43,7 +43,7 @@ public function validateBlock(ErrorElement $errorElement, BlockInterface $block)

/**
* @param null $code
*
*
* @return MetadataInterface
*/
public function getBlockMetadata($code = null);
Expand Down
2 changes: 1 addition & 1 deletion Block/BlockServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
Expand Down
2 changes: 1 addition & 1 deletion Block/BlockServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Sonata\BlockBundle\Model\BlockInterface;

use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
Expand Down
2 changes: 1 addition & 1 deletion Block/BlockServiceManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Sonata\BlockBundle\Block;

use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;
use Sonata\BlockBundle\Model\BlockInterface;

interface BlockServiceManagerInterface
Expand Down
2 changes: 1 addition & 1 deletion Block/Service/ContainerBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Sonata\BlockBundle\Block\Service;

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

use Sonata\BlockBundle\Block\BaseBlockService;
use Sonata\BlockBundle\Block\BlockContextInterface;
Expand Down
2 changes: 1 addition & 1 deletion Block/Service/EmptyBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\HttpFoundation\Response;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;
use Sonata\BlockBundle\Block\BaseBlockService;

class EmptyBlockService extends BaseBlockService
Expand Down
2 changes: 1 addition & 1 deletion Block/Service/MenuBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Knp\Menu\ItemInterface;
use Knp\Menu\Provider\MenuProviderInterface;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;
use Sonata\BlockBundle\Block\BaseBlockService;
use Sonata\BlockBundle\Block\BlockContextInterface;
use Sonata\BlockBundle\Model\BlockInterface;
Expand Down
2 changes: 1 addition & 1 deletion Block/Service/RssBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\BlockBundle\Block\BlockContextInterface;
Expand Down
2 changes: 1 addition & 1 deletion Block/Service/TextBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\HttpFoundation\Response;

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;

use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\BlockBundle\Block\BaseBlockService;
Expand Down
6 changes: 3 additions & 3 deletions Resources/doc/reference/your_first_block.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The current RSS block will extend this base class. The other `use` statements ar
use Sonata\BlockBundle\Block\BlockContextInterface;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\CoreBundle\Validator\ErrorElement;
use Sonata\BlockBundle\Block\BaseBlockService;
Default settings
Expand Down Expand Up @@ -176,14 +176,14 @@ We are almost done! Now, just declare the block as a service:
Or using YAML:

.. code-block: yaml
services:
sonata.block.service.rss:
class: Sonata\BlockBundle\Block\Service\RssBlockService
arguments:
- sonata.block.service.rss
- @templating
tags:
tags:
- { name: sonata.block }
Then, add the service to Sonata configuration:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"symfony/http-kernel": "~2.2",
"symfony/form": "~2.2",
"doctrine/common": "~2.3",
"sonata-project/core-bundle": "~2.2",
"sonata-project/core-bundle": "~2.3,>=2.3.1",
"sonata-project/cache": "~1.0"
},
"require-dev": {
Expand Down

1 comment on commit 06fac25

@krzysztof-alboszta
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes will also need sonata-project/admin-bundle in newer version when it will be released
as sonata-project/admin-bundle 2.3.1 still use Sonata\AdminBundle\Validator\ErrorElement which violate new BlockAdminServiceInterface definition

Please sign in to comment.