Skip to content

Commit f1280e0

Browse files
committed
Changed "::class" declarations to hard strings to allow PHP 5.4 compatibility.
1 parent 9ffa719 commit f1280e0

8 files changed

+21
-21
lines changed

source/CAS.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,17 @@ class CAS
228228
/**
229229
* static::getProxiedService() type for HTTP GET.
230230
*/
231-
const PHPCAS_PROXIED_SERVICE_HTTP_GET = Get::class;
231+
const PHPCAS_PROXIED_SERVICE_HTTP_GET = '\phpCAS\CAS\ProxiedService\Http\Get';
232232

233233
/**
234234
* static::getProxiedService() type for HTTP POST.
235235
*/
236-
const PHPCAS_PROXIED_SERVICE_HTTP_POST = Post::class;
236+
const PHPCAS_PROXIED_SERVICE_HTTP_POST = '\phpCAS\CAS\ProxiedService\Http\Post';
237237

238238
/**
239239
* static::getProxiedService() type for IMAP.
240240
*/
241-
const PHPCAS_PROXIED_SERVICE_IMAP = Imap::class;
241+
const PHPCAS_PROXIED_SERVICE_IMAP = '\phpCAS\CAS\ProxiedService\Imap';
242242

243243
/** @} */
244244

@@ -251,13 +251,13 @@ class CAS
251251
* @{
252252
*/
253253

254-
const PHPCAS_LANG_ENGLISH = English::class;
255-
const PHPCAS_LANG_FRENCH = French::class;
256-
const PHPCAS_LANG_GREEK = Greek::class;
257-
const PHPCAS_LANG_GERMAN = German::class;
258-
const PHPCAS_LANG_JAPANESE = Japanese::class;
259-
const PHPCAS_LANG_SPANISH = Spanish::class;
260-
const PHPCAS_LANG_CATALAN = Catalan::class;
254+
const PHPCAS_LANG_ENGLISH = '\phpCAS\CAS\Languages\English';
255+
const PHPCAS_LANG_FRENCH = '\phpCAS\CAS\Languages\French';
256+
const PHPCAS_LANG_GREEK = '\phpCAS\CAS\Languages\Greek';
257+
const PHPCAS_LANG_GERMAN = '\phpCAS\CAS\Languages\German';
258+
const PHPCAS_LANG_JAPANESE = '\phpCAS\CAS\Languages\Japanese';
259+
const PHPCAS_LANG_SPANISH = '\phpCAS\CAS\Languages\Spanish';
260+
const PHPCAS_LANG_CATALAN = '\phpCAS\CAS\Languages\Catalan';
261261

262262
/** @} */
263263

source/CAS/Client.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function setLang($lang)
231231
$obj = new $lang();
232232
if (! ($obj instanceof LanguageInterface)) {
233233
throw new InvalidArgumentException(
234-
'$className must implement the '.LanguageInterface::class
234+
'$className must implement the \phpCAS\CAS\Languages\LanguageInterface'
235235
);
236236
}
237237
$this->_lang = $lang;
@@ -631,7 +631,7 @@ public function setExtraCurlOption($key, $value)
631631
* By default CurlRequest is used, but this may be overridden to
632632
* supply alternate request mechanisms for testing.
633633
*/
634-
private $_requestImplementation = CurlRequest::class;
634+
private $_requestImplementation = '\phpCAS\CAS\Request\CurlRequest';
635635

636636
/**
637637
* Override the default implementation used to make web requests in readUrl().
@@ -1975,7 +1975,7 @@ public function setCasServerCACert($cert, $validate_cn)
19751975
if (gettype($validate_cn) != 'boolean') {
19761976
throw new TypeMismatchException($validate_cn, '$validate_cn', 'boolean');
19771977
}
1978-
if (! file_exists($cert) && $this->_requestImplementation !== DummyRequest::class) {
1978+
if (! file_exists($cert) && $this->_requestImplementation !== '\phpCAS\CAS\TestHarness\DummyRequest') {
19791979
throw new InvalidArgumentException('Certificate file does not exist '.$this->_requestImplementation);
19801980
}
19811981
$this->_cas_server_ca_cert = $cert;
@@ -2581,7 +2581,7 @@ public function setPGTStorage(AbstractStorage $storage)
25812581

25822582
// check to make sure a valid storage object was specified
25832583
if (! ($storage instanceof AbstractStorage)) {
2584-
throw new TypeMismatchException($storage, '$storage', AbstractStorage::class.' object');
2584+
throw new TypeMismatchException($storage, '$storage', '\phpCAS\CAS\PGTStorage\AbstractStorage object');
25852585
}
25862586

25872587
// store the PGTStorage object
@@ -4005,7 +4005,7 @@ private function _rebroadcast($type)
40054005
if (! empty($ip)) {
40064006
$dns = gethostbyaddr($ip);
40074007
}
4008-
$multiClassName = CurlMultiRequest::class;
4008+
$multiClassName = '\phpCAS\CAS\Request\CurlMultiRequest';
40094009
$multiRequest = new $multiClassName();
40104010

40114011
for ($i = 0; $i < sizeof($this->_rebroadcast_nodes); $i++) {

test/CAS/Tests/AuthenticationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function setUp()
8383
false // Start Session
8484
);
8585

86-
$this->object->setRequestImplementation(DummyRequest::class);
86+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8787
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8888

8989
/*********************************************************

test/CAS/Tests/Cas20AttributesTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function setUp()
7676
false // Start Session
7777
);
7878

79-
$this->object->setRequestImplementation(DummyRequest::class);
79+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8080
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8181
$this->object->setNoClearTicketsFromUrl();
8282
// CAS::setDebug(dirname(__FILE__).'/../test.log');

test/CAS/Tests/ProxyTicketValidationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function setUp()
8282
false // Start Session
8383
);
8484

85-
$this->object->setRequestImplementation(DummyRequest::class);
85+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8686
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8787

8888
/*********************************************************

test/CAS/Tests/ServiceMailTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function setUp()
7979
false // Start Session
8080
);
8181

82-
$this->object->setRequestImplementation(DummyRequest::class);
82+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8383
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8484

8585
// Bypass PGT storage since Client->callback() will exit. Just build

test/CAS/Tests/ServiceTicketValidationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function setUp()
7878
false // Start Session
7979
);
8080

81-
$this->object->setRequestImplementation(DummyRequest::class);
81+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8282
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8383

8484
/*********************************************************

test/CAS/Tests/ServiceWebTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function setUp()
7979
false // Start Session
8080
);
8181

82-
$this->object->setRequestImplementation(DummyRequest::class);
82+
$this->object->setRequestImplementation('\phpCAS\CAS\TestHarness\DummyRequest');
8383
$this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
8484

8585
// Bypass PGT storage since Client->callback() will exit. Just build

0 commit comments

Comments
 (0)