Skip to content

Commit

Permalink
Move the palette manipulator exceptions into the correct namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Jan 11, 2019
1 parent 05fcb8f commit 85e6ee0
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/DataContainer/PaletteManipulator.php
Expand Up @@ -12,8 +12,6 @@

namespace Contao\CoreBundle\DataContainer;

use Contao\CoreBundle\Exception\PaletteNotFoundException;
use Contao\CoreBundle\Exception\PalettePositionException;
use Contao\StringUtil;

class PaletteManipulator
Expand Down
17 changes: 17 additions & 0 deletions src/DataContainer/PaletteNotFoundException.php
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/

namespace Contao\CoreBundle\DataContainer;

class PaletteNotFoundException extends \InvalidArgumentException
{
}
17 changes: 17 additions & 0 deletions src/DataContainer/PalettePositionException.php
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/

namespace Contao\CoreBundle\DataContainer;

class PalettePositionException extends \InvalidArgumentException
{
}
8 changes: 7 additions & 1 deletion src/Exception/PaletteNotFoundException.php
Expand Up @@ -12,6 +12,12 @@

namespace Contao\CoreBundle\Exception;

class PaletteNotFoundException extends \InvalidArgumentException
@trigger_error('Using the PaletteNotFoundException class has been deprecated and will no longer work in Contao 5.0. Use the Contao\CoreBundle\DataContainer\PaletteNotFoundException class instead.', E_USER_DEPRECATED);

/**
* @deprecated Deprecated since Contao 4.7, to be removed in Contao 5.0; use the
* Contao\CoreBundle\DataContainer\PaletteNotFoundException instead
*/
class PaletteNotFoundException extends \Contao\CoreBundle\DataContainer\PaletteNotFoundException
{
}
8 changes: 7 additions & 1 deletion src/Exception/PalettePositionException.php
Expand Up @@ -12,6 +12,12 @@

namespace Contao\CoreBundle\Exception;

class PalettePositionException extends \InvalidArgumentException
@trigger_error('Using the PalettePositionException class has been deprecated and will no longer work in Contao 5.0. Use the Contao\CoreBundle\DataContainer\PalettePositionException class instead.', E_USER_DEPRECATED);

/**
* @deprecated Deprecated since Contao 4.7, to be removed in Contao 5.0; use the
* Contao\CoreBundle\DataContainer\PalettePositionException instead
*/
class PalettePositionException extends \Contao\CoreBundle\DataContainer\PalettePositionException
{
}

0 comments on commit 85e6ee0

Please sign in to comment.