[!!!][FEATURE] Removed php-di as suggested by #477

NOTE: Custom class-loader should be used to create custom integrations with frameworks like php-di. See documentation for more information.

- Removed all references to php-cli from composer + code.
- Added ClassLoader php-unit tests.
This commit is contained in:
Simon Sessingø
2021-03-23 00:46:17 +01:00
parent 6686de46b9
commit a44a93d705
10 changed files with 58 additions and 150 deletions
@@ -0,0 +1,14 @@
<?php
class CustomClassLoader implements \Pecee\SimpleRouter\ClassLoader\IClassLoader
{
public function loadClass(string $class)
{
return new DummyController();
}
public function loadClosure(callable $closure, array $parameters)
{
return \call_user_func_array($closure, ['result' => true]);
}
}
@@ -16,6 +16,11 @@ class DummyController
public function method2()
{
}
public function method3()
{
return 'method3';
}
public function param($params = null)