Skip to content

Commit 6512dd5

Browse files
committed
removed compatibility for old class names
- inteface Nette\Application\IRouter replaced by Nette\Routing\Router
1 parent 38e0368 commit 6512dd5

File tree

7 files changed

+4
-58
lines changed

7 files changed

+4
-58
lines changed

src/Application/Routers/Route.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Nette\Application\Routers;
1111

1212
use Nette;
13-
use function interface_exists, is_string, lcfirst, preg_replace, rawurlencode, str_replace, strlen, strncmp, strrpos, strtolower, strtr, substr, ucwords;
13+
use function is_string, lcfirst, preg_replace, rawurlencode, str_replace, strlen, strncmp, strrpos, strtolower, strtr, substr, ucwords;
1414

1515

1616
/**
@@ -188,6 +188,3 @@ public static function path2presenter(string $s): string
188188
return $s;
189189
}
190190
}
191-
192-
193-
interface_exists(Nette\Application\IRouter::class);

src/Application/Routers/RouteList.php

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

1212
use JetBrains\PhpStorm\Language;
1313
use Nette;
14-
use function count, interface_exists, is_int, is_string, strlen, strncmp, substr;
14+
use function count, is_int, is_string, strlen, strncmp, substr;
1515

1616

1717
/**
@@ -140,6 +140,3 @@ public function offsetUnset($index): void
140140
$this->modify($index, null);
141141
}
142142
}
143-
144-
145-
interface_exists(Nette\Application\IRouter::class);

src/Application/Routers/SimpleRouter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,3 @@ public function __construct(array|string $defaults = [])
3939
parent::__construct($defaults);
4040
}
4141
}
42-
43-
44-
interface_exists(Nette\Application\IRouter::class);

src/Application/UI/Component.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Nette\Application\UI;
1111

1212
use Nette;
13-
use function array_key_exists, array_slice, class_exists, func_get_arg, func_get_args, func_num_args, get_debug_type, is_array, link, method_exists, sprintf, trigger_error;
13+
use function array_key_exists, array_slice, func_get_arg, func_get_args, func_num_args, get_debug_type, is_array, link, method_exists, sprintf, trigger_error;
1414

1515

1616
/**
@@ -379,6 +379,3 @@ public function error(string $message = '', int $httpCode = Nette\Http\IResponse
379379
throw new Nette\Application\BadRequestException($message, $httpCode);
380380
}
381381
}
382-
383-
384-
class_exists(PresenterComponent::class);

src/Application/UI/ComponentReflection.php

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

1212
use Nette\Application\Attributes;
1313
use Nette\Utils\Reflection;
14-
use function array_fill_keys, array_filter, array_key_exists, array_merge, class_exists, end, preg_match_all, preg_quote, preg_split, strtolower;
14+
use function array_fill_keys, array_filter, array_key_exists, array_merge, end, preg_match_all, preg_quote, preg_split, strtolower;
1515
use const PREG_SPLIT_NO_EMPTY;
1616

1717

@@ -216,6 +216,3 @@ public static function combineArgs(\ReflectionFunctionAbstract $method, array $a
216216
return ParameterConverter::toArguments($method, $args);
217217
}
218218
}
219-
220-
221-
class_exists(PresenterComponentReflection::class);

src/compatibility-intf.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@
99

1010
namespace Nette\Application;
1111

12-
use Nette;
13-
14-
if (false) {
15-
/** @deprecated use Nette\Routing\Router */
16-
interface IRouter extends Nette\Routing\Router
17-
{
18-
}
19-
} elseif (!interface_exists(IRouter::class)) {
20-
class_alias(Nette\Routing\Router::class, IRouter::class);
21-
}
22-
2312
if (false) {
2413
/** @deprecated use Nette\Application\Response */
2514
interface IResponse extends Response

src/compatibility.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)