Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from weierophinney/feature/container-interop-r…
Browse files Browse the repository at this point in the history
…emoval

Switch from `container-interop/container-interop` to `psr/container` in a backward compatible manner
  • Loading branch information
Ocramius authored Apr 12, 2022
2 parents a0008a2 + 9876d05 commit 0972bb9
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 54 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"ext-mbstring": "*",
"container-interop/container-interop": "^1.2",
"laminas/laminas-math": "^3.4",
"laminas/laminas-stdlib": "^3.6"
"laminas/laminas-servicemanager": "^3.11.2",
"laminas/laminas-stdlib": "^3.6",
"psr/container": "^1.1"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.3.0",
Expand Down
129 changes: 92 additions & 37 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/BlockCipher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Laminas\Crypt;

use Interop\Container\ContainerInterface;
use Interop\Container\Exception\NotFoundException;
use Laminas\Crypt\Key\Derivation\Pbkdf2;
use Laminas\Crypt\Symmetric\SymmetricInterface;
use Laminas\Math\Rand;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface as NotFoundException;

use function base64_decode;
use function base64_encode;
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Laminas\Crypt\Exception;

use DomainException;
use Interop\Container\Exception\NotFoundException as InteropNotFoundException;
use Psr\Container\NotFoundExceptionInterface as PsrNotFoundException;

/**
* Runtime argument exception
*/
class NotFoundException extends DomainException implements InteropNotFoundException
class NotFoundException extends DomainException implements PsrNotFoundException
{
}
6 changes: 3 additions & 3 deletions src/Symmetric/Mcrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Laminas\Crypt\Symmetric;

use Interop\Container\ContainerInterface;
use Laminas\Stdlib\ArrayUtils;
use Psr\Container\ContainerInterface;
use Traversable;

use function array_key_exists;
Expand Down Expand Up @@ -82,7 +82,7 @@ class Mcrypt implements SymmetricInterface
/**
* Padding plugins
*
* @var Interop\Container\ContainerInterface
* @var ContainerInterface
*/
protected static $paddingPlugins;

Expand Down Expand Up @@ -239,7 +239,7 @@ public static function setPaddingPluginManager($plugins)
}
if (! $plugins instanceof ContainerInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Padding plugins must implements Interop\Container\ContainerInterface; received "%s"',
'Padding plugins must implements Psr\Container\ContainerInterface; received "%s"',
is_object($plugins) ? get_class($plugins) : gettype($plugins)
));
}
Expand Down
4 changes: 2 additions & 2 deletions src/Symmetric/Openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Laminas\Crypt\Symmetric;

use Interop\Container\ContainerInterface;
use Laminas\Stdlib\ArrayUtils;
use Psr\Container\ContainerInterface;
use Traversable;

use function array_push;
Expand Down Expand Up @@ -80,7 +80,7 @@ class Openssl implements SymmetricInterface
/**
* Padding plugins
*
* @var Interop\Container\ContainerInterface
* @var ContainerInterface
*/
protected static $paddingPlugins;

Expand Down
2 changes: 1 addition & 1 deletion src/Symmetric/PaddingPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Laminas\Crypt\Symmetric;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;

use function array_key_exists;
use function sprintf;
Expand Down
2 changes: 1 addition & 1 deletion src/SymmetricPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Laminas\Crypt;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;

use function array_key_exists;
use function sprintf;
Expand Down
2 changes: 1 addition & 1 deletion test/BlockCipher/AbstractBlockCipherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace LaminasTest\Crypt\BlockCipher;

use Interop\Container\ContainerInterface;
use Laminas\Crypt\BlockCipher;
use Laminas\Crypt\Exception;
use Laminas\Crypt\Symmetric;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

use function file_get_contents;
use function get_class;
Expand Down
2 changes: 1 addition & 1 deletion test/Symmetric/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace LaminasTest\Crypt\Symmetric;

use ArrayObject;
use Interop\Container\ContainerInterface;
use Laminas\Crypt\Symmetric\Exception;
use Laminas\Crypt\Symmetric\Padding\NoPadding;
use Laminas\Crypt\Symmetric\Padding\PKCS7;
use Laminas\Math\Rand;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use stdClass;

use function file_get_contents;
Expand Down
2 changes: 1 addition & 1 deletion test/Symmetric/Padding/PaddingPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace LaminasTest\Crypt\Symmetric\Padding;

use Interop\Container\ContainerInterface;
use Laminas\Crypt\Symmetric\Exception;
use Laminas\Crypt\Symmetric\Padding\PaddingInterface;
use Laminas\Crypt\Symmetric\PaddingPluginManager;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

class PaddingPluginManagerTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion test/SymmetricPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace LaminasTest\Crypt;

use Interop\Container\ContainerInterface;
use Laminas\Crypt\Exception as CryptException;
use Laminas\Crypt\Symmetric\Exception;
use Laminas\Crypt\Symmetric\SymmetricInterface;
use Laminas\Crypt\SymmetricPluginManager;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

use function extension_loaded;

Expand Down

0 comments on commit 0972bb9

Please sign in to comment.