Skip to content

Commit d109395

Browse files
committed
Merge branch '3.x-dev' into 4.x-dev
2 parents ca76f68 + cb2967f commit d109395

3 files changed

Lines changed: 43 additions & 2 deletions

File tree

phpstan-baseline.neon

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
parameters:
2+
excludePaths:
3+
analyse:
4+
- src/phputf8/*
5+
ignoreErrors:
6+
-
7+
message: "#^Call to deprecated method rules\\(\\) of class Doctrine\\\\Common\\\\Inflector\\\\Inflector\\.$#"
8+
count: 1
9+
path: src/Inflector.php
10+
11+
-
12+
message: """
13+
#^Call to deprecated method toPlural\\(\\) of class Joomla\\\\String\\\\Inflector\\:
14+
3\\.0 Use Doctrine\\\\Common\\\\Inflector\\\\Inflector\\:\\:pluralize\\(\\) instead\\.$#
15+
"""
16+
count: 1
17+
path: src/Inflector.php
18+
19+
-
20+
message: """
21+
#^Call to deprecated method toSingular\\(\\) of class Joomla\\\\String\\\\Inflector\\:
22+
3\\.0 Use Doctrine\\\\Common\\\\Inflector\\\\Inflector\\:\\:singularize\\(\\) instead\\.$#
23+
"""
24+
count: 2
25+
path: src/Inflector.php
26+
27+
-
28+
message: "#^Class Joomla\\\\String\\\\Inflector extends deprecated class Doctrine\\\\Common\\\\Inflector\\\\Inflector\\.$#"
29+
count: 1
30+
path: src/Inflector.php
31+
32+
-
33+
message: "#^Method Joomla\\\\String\\\\Inflector\\:\\:getInstance\\(\\) should return static\\(Joomla\\\\String\\\\Inflector\\) but returns Joomla\\\\String\\\\Inflector\\.$#"
34+
count: 1
35+
path: src/Inflector.php
36+
37+
-
38+
message: "#^Unsafe usage of new static\\(\\)\\.$#"
39+
count: 2
40+
path: src/Inflector.php

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
includes:
33
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
- phpstan-baseline.neon
45

56
parameters:
67
level: 5

src/StringHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public static function strcasecmp($str1, $str2, $locale = false)
375375
}
376376

377377
// Get current locale
378-
$locale0 = setlocale(LC_COLLATE, null);
378+
$locale0 = setlocale(LC_COLLATE, '0');
379379

380380
if (!$locale = setlocale(LC_COLLATE, $locale)) {
381381
$locale = $locale0;
@@ -421,7 +421,7 @@ public static function strcmp($str1, $str2, $locale = false)
421421
{
422422
if ($locale) {
423423
// Get current locale
424-
$locale0 = setlocale(LC_COLLATE, null);
424+
$locale0 = setlocale(LC_COLLATE, '0');
425425

426426
if (!$locale = setlocale(LC_COLLATE, $locale)) {
427427
$locale = $locale0;

0 commit comments

Comments
 (0)