File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change
1
+ dist : xenial
1
2
language : php
2
3
services :
3
4
- mysql
@@ -6,8 +7,14 @@ services:
6
7
- memcached
7
8
php :
8
9
- 7.4.6
10
+ - 8.0.2
9
11
before_install :
10
- - yes | pecl install memcache
12
+ - |
13
+ if (php --version | grep -i 7.4 > /dev/null); then
14
+ yes | pecl install memcache-4.0.5.2
15
+ else
16
+ yes | pecl install memcache
17
+ fi
11
18
- no | pecl install memcached
12
19
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
13
20
- mysql -e 'CREATE DATABASE onphp;'
Original file line number Diff line number Diff line change @@ -259,13 +259,13 @@ public static function checkStaticMethod($methodSignature): array
259
259
} elseif (is_string ($ methodSignature )) {
260
260
$ nameParts = explode (':: ' , $ methodSignature );
261
261
} else {
262
- Assert::isUnreachable ('Incorrect method signature ' . Assert:: dumpArgument ($ methodSignature ));
262
+ Assert::isUnreachable ('Incorrect method signature ' . gettype ($ methodSignature ));
263
263
}
264
264
265
265
Assert::isEqual (
266
266
count ($ nameParts ),
267
267
2 ,
268
- 'Incorrect method signature ' . Assert:: dumpArgument ($ methodSignature )
268
+ 'Incorrect method signature ' . gettype ($ methodSignature )
269
269
);
270
270
271
271
list ($ className , $ methodName ) = $ nameParts ;
Original file line number Diff line number Diff line change 11
11
12
12
namespace OnPHP \Main \Util \Router ;
13
13
14
+ use Throwable ;
14
15
use OnPHP \Core \Base \Assert ;
15
16
use OnPHP \Main \Flow \HttpRequest ;
16
- use OnPHP \Core \Exception \BaseException ;
17
17
18
18
final class RouterRegexpRule extends RouterBaseRule
19
19
{
@@ -132,7 +132,7 @@ public function assembly(
132
132
133
133
try {
134
134
$ return = vsprintf ($ this ->reverse , $ mergedData );
135
- } catch (BaseException $ e ) {
135
+ } catch (Throwable $ e ) {
136
136
throw new RouterException (
137
137
'Can not assembly. Too few arguments? Error was: '
138
138
.$ e ->getMessage ()
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ public function testCreationProhibition()
67
67
68
68
public function testMissingCleanup ()
69
69
{
70
+ if (isset (Singleton::getAllInstances ()[self ::SINGLE_CLASS_NAME ])) {
71
+ Singleton::dropInstance (self ::SINGLE_CLASS_NAME );
72
+ }
73
+
70
74
// cleaning up
71
75
$ this ->expectException (MissingElementException::class);
72
76
Singleton::dropInstance (self ::SINGLE_CLASS_NAME );
You can’t perform that action at this time.
0 commit comments