Skip to content

Commit 21c084a

Browse files
committed
Remove BC breaking Webmozart asserts
1 parent 6915874 commit 21c084a

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"require": {
3434
"php": ">=5.5",
3535
"simplesamlphp/composer-module-installer": "~1.0",
36-
"simplesamlphp/simplesamlphp-module-oauth": "~1.0",
37-
"webmozart/assert": "^1.4"
36+
"simplesamlphp/simplesamlphp-module-oauth": "~1.0"
3837
},
3938
"require-dev": {
4039
"simplesamlphp/simplesamlphp": "^1.17",

lib/Auth/Source/Twitter.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace SimpleSAML\Module\authtwitter\Auth\Source;
44

5-
use Webmozart\Assert\Assert;
6-
75
$default = dirname(dirname(dirname(dirname(dirname(__FILE__))))).'/oauth/libextinc/OAuth.php';
86
$travis = dirname(dirname(dirname(dirname(__FILE__)))).'/vendor/simplesamlphp/simplesamlphp/modules/oauth/libextinc/OAuth.php';
97

@@ -62,8 +60,8 @@ class Twitter extends \SimpleSAML\Auth\Source
6260
*/
6361
public function __construct($info, $config)
6462
{
65-
Assert::isArray($info);
66-
Assert::isArray($config);
63+
assert(is_array($info));
64+
assert(is_array($config));
6765

6866
// Call the parent constructor first, as required by the interface
6967
parent::__construct($info, $config);
@@ -87,7 +85,7 @@ public function __construct($info, $config)
8785
*/
8886
public function authenticate(&$state)
8987
{
90-
Assert::isArray($state);
88+
assert(is_array($state));
9189

9290
// We are going to need the authId in order to retrieve this authentication source later
9391
$state[self::AUTHID] = $this->authId;

0 commit comments

Comments
 (0)