Auryn \ InjectionException (8)
Could not make ProbeIP\Controllers\NotFound: Class ProbeIP\Controllers\NotFound does not exist Auryn\InjectionException thrown with message "Could not make ProbeIP\Controllers\NotFound: Class ProbeIP\Controllers\NotFound does not exist" Stacktrace: #7 Auryn\InjectionException in /var/www/probeip/vendor/rdlowrey/auryn/lib/Injector.php:412 #6 ReflectionException in /var/www/probeip/vendor/rdlowrey/auryn/lib/CachingReflector.php:27 #5 ReflectionClass:__construct in /var/www/probeip/vendor/rdlowrey/auryn/lib/CachingReflector.php:27 #4 Auryn\CachingReflector:getClass in /var/www/probeip/vendor/rdlowrey/auryn/lib/CachingReflector.php:41 #3 Auryn\CachingReflector:getCtor in /var/www/probeip/vendor/rdlowrey/auryn/lib/Injector.php:389 #2 Auryn\Injector:provisionInstance in /var/www/probeip/vendor/rdlowrey/auryn/lib/Injector.php:372 #1 Auryn\Injector:make in /var/www/probeip/src/bootstrap.php:37 #0 require_once in /var/www/probeip/public/index.php:2
Stack frames (8)
7
Auryn
\
InjectionException
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
412
6
ReflectionException
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
27
5
ReflectionClass
__construct
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
27
4
Auryn
\
CachingReflector
getClass
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
41
3
Auryn
\
CachingReflector
getCtor
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
389
2
Auryn
\
Injector
provisionInstance
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
372
1
Auryn
\
Injector
make
/
src
/
bootstrap.php
37
0
require_once
/
public
/
index.php
2
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
            } elseif (!$ctor->isPublic()) {
                throw new InjectionException(
                    $this->inProgressMakes,
                    sprintf(self::M_NON_PUBLIC_CONSTRUCTOR, $className),
                    self::E_NON_PUBLIC_CONSTRUCTOR
                );
            } elseif ($ctorParams = $this->reflector->getCtorParams($className)) {
                $reflClass = $this->reflector->getClass($className);
                $definition = isset($this->classDefinitions[$normalizedClass])
                    ? array_replace($this->classDefinitions[$normalizedClass], $definition)
                    : $definition;
                $args = $this->provisionFuncArgs($ctor, $definition, $ctorParams);
                $obj = $reflClass->newInstanceArgs($args);
            } else {
                $obj = $this->instantiateWithoutCtorParams($className);
            }
 
            return $obj;
        } catch (\ReflectionException $e) {
            throw new InjectionException(
                $this->inProgressMakes,
                sprintf(self::M_MAKE_FAILURE, $className, $e->getMessage()),
                self::E_MAKE_FAILURE,
                $e
            );
        }
    }
 
    private function instantiateWithoutCtorParams($className)
    {
        $reflClass = $this->reflector->getClass($className);
 
        if (!$reflClass->isInstantiable()) {
            $type = $reflClass->isInterface() ? 'interface' : 'abstract class';
            throw new InjectionException(
                $this->inProgressMakes,
                sprintf(self::M_NEEDS_DEFINITION, $type, $className),
                self::E_NEEDS_DEFINITION
            );
        }
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
    const CACHE_KEY_CTORS = 'auryn.refls.ctors.';
    const CACHE_KEY_CTOR_PARAMS = 'auryn.refls.ctor-params.';
    const CACHE_KEY_FUNCS = 'auryn.refls.funcs.';
    const CACHE_KEY_METHODS = 'auryn.refls.methods.';
 
    private $reflector;
    private $cache;
 
    public function __construct(Reflector $reflector = null, ReflectionCache $cache = null)
    {
        $this->reflector = $reflector ?: new StandardReflector;
        $this->cache = $cache ?: new ReflectionCacheArray;
    }
 
    public function getClass($class)
    {
        $cacheKey = self::CACHE_KEY_CLASSES . strtolower($class);
 
        if (!$reflectionClass = $this->cache->fetch($cacheKey)) {
            $reflectionClass = new \ReflectionClass($class);
            $this->cache->store($cacheKey, $reflectionClass);
        }
 
        return $reflectionClass;
    }
 
    public function getCtor($class)
    {
        $cacheKey = self::CACHE_KEY_CTORS . strtolower($class);
 
        $reflectedCtor = $this->cache->fetch($cacheKey);
 
        if ($reflectedCtor === false) {
            $reflectionClass = $this->getClass($class);
            $reflectedCtor = $reflectionClass->getConstructor();
            $this->cache->store($cacheKey, $reflectedCtor);
        }
 
        return $reflectedCtor;
    }
Exception message: Class ProbeIP\Controllers\NotFound does not exist
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
    const CACHE_KEY_CTORS = 'auryn.refls.ctors.';
    const CACHE_KEY_CTOR_PARAMS = 'auryn.refls.ctor-params.';
    const CACHE_KEY_FUNCS = 'auryn.refls.funcs.';
    const CACHE_KEY_METHODS = 'auryn.refls.methods.';
 
    private $reflector;
    private $cache;
 
    public function __construct(Reflector $reflector = null, ReflectionCache $cache = null)
    {
        $this->reflector = $reflector ?: new StandardReflector;
        $this->cache = $cache ?: new ReflectionCacheArray;
    }
 
    public function getClass($class)
    {
        $cacheKey = self::CACHE_KEY_CLASSES . strtolower($class);
 
        if (!$reflectionClass = $this->cache->fetch($cacheKey)) {
            $reflectionClass = new \ReflectionClass($class);
            $this->cache->store($cacheKey, $reflectionClass);
        }
 
        return $reflectionClass;
    }
 
    public function getCtor($class)
    {
        $cacheKey = self::CACHE_KEY_CTORS . strtolower($class);
 
        $reflectedCtor = $this->cache->fetch($cacheKey);
 
        if ($reflectedCtor === false) {
            $reflectionClass = $this->getClass($class);
            $reflectedCtor = $reflectionClass->getConstructor();
            $this->cache->store($cacheKey, $reflectedCtor);
        }
 
        return $reflectedCtor;
    }
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
CachingReflector.php
    public function getClass($class)
    {
        $cacheKey = self::CACHE_KEY_CLASSES . strtolower($class);
 
        if (!$reflectionClass = $this->cache->fetch($cacheKey)) {
            $reflectionClass = new \ReflectionClass($class);
            $this->cache->store($cacheKey, $reflectionClass);
        }
 
        return $reflectionClass;
    }
 
    public function getCtor($class)
    {
        $cacheKey = self::CACHE_KEY_CTORS . strtolower($class);
 
        $reflectedCtor = $this->cache->fetch($cacheKey);
 
        if ($reflectedCtor === false) {
            $reflectionClass = $this->getClass($class);
            $reflectedCtor = $reflectionClass->getConstructor();
            $this->cache->store($cacheKey, $reflectedCtor);
        }
 
        return $reflectedCtor;
    }
 
    public function getCtorParams($class)
    {
        $cacheKey = self::CACHE_KEY_CTOR_PARAMS . strtolower($class);
 
        $reflectedCtorParams = $this->cache->fetch($cacheKey);
 
        if (false !== $reflectedCtorParams) {
            return $reflectedCtorParams;
        } elseif ($reflectedCtor = $this->getCtor($class)) {
            $reflectedCtorParams = $reflectedCtor->getParameters();
        } else {
            $reflectedCtorParams = null;
        }
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
            $obj = call_user_func_array(array($executable, '__invoke'), $args);
        } else {
            $obj = $this->provisionInstance($className, $normalizedClass, $args);
        }
 
        $obj = $this->prepareInstance($obj, $normalizedClass);
 
        if (array_key_exists($normalizedClass, $this->shares)) {
            $this->shares[$normalizedClass] = $obj;
        }
 
        unset($this->inProgressMakes[$normalizedClass]);
 
        return $obj;
    }
 
    private function provisionInstance($className, $normalizedClass, array $definition)
    {
        try {
            $ctor = $this->reflector->getCtor($className);
 
            if (!$ctor) {
                $obj = $this->instantiateWithoutCtorParams($className);
            } elseif (!$ctor->isPublic()) {
                throw new InjectionException(
                    $this->inProgressMakes,
                    sprintf(self::M_NON_PUBLIC_CONSTRUCTOR, $className),
                    self::E_NON_PUBLIC_CONSTRUCTOR
                );
            } elseif ($ctorParams = $this->reflector->getCtorParams($className)) {
                $reflClass = $this->reflector->getClass($className);
                $definition = isset($this->classDefinitions[$normalizedClass])
                    ? array_replace($this->classDefinitions[$normalizedClass], $definition)
                    : $definition;
                $args = $this->provisionFuncArgs($ctor, $definition, $ctorParams);
                $obj = $reflClass->newInstanceArgs($args);
            } else {
                $obj = $this->instantiateWithoutCtorParams($className);
            }
 
/
var
/
www
/
probeip
/
vendor
/
rdlowrey
/
auryn
/
lib
/
Injector.php
        }
 
        $this->inProgressMakes[$normalizedClass] = count($this->inProgressMakes);
 
        // isset() is used specifically here because classes may be marked as "shared" before an
        // instance is stored. In these cases the class is "shared," but it has a null value and
        // instantiation is needed.
        if (isset($this->shares[$normalizedClass])) {
            unset($this->inProgressMakes[$normalizedClass]);
 
            return $this->shares[$normalizedClass];
        }
 
        if (isset($this->delegates[$normalizedClass])) {
            $executable = $this->buildExecutable($this->delegates[$normalizedClass]);
            $reflectionFunction = $executable->getCallableReflection();
            $args = $this->provisionFuncArgs($reflectionFunction, $args);
            $obj = call_user_func_array(array($executable, '__invoke'), $args);
        } else {
            $obj = $this->provisionInstance($className, $normalizedClass, $args);
        }
 
        $obj = $this->prepareInstance($obj, $normalizedClass);
 
        if (array_key_exists($normalizedClass, $this->shares)) {
            $this->shares[$normalizedClass] = $obj;
        }
 
        unset($this->inProgressMakes[$normalizedClass]);
 
        return $obj;
    }
 
    private function provisionInstance($className, $normalizedClass, array $definition)
    {
        try {
            $ctor = $this->reflector->getCtor($className);
 
            if (!$ctor) {
                $obj = $this->instantiateWithoutCtorParams($className);
/
var
/
www
/
probeip
/
src
/
bootstrap.php
}
$woops->register();
$injector = include('dependencies.php');
$request = $injector->make('Http\HttpRequest');
$response = $injector->make('Http\HttpResponse');

$routeDefinitionCallback = function (\FastRoute\RouteCollector $r) {
    $routes = include('routes.php');
    foreach ($routes as $route) {
        $r->addRoute($route[0], $route[1], $route[2]);
    }
};
$dispatcher = \FastRoute\simpleDispatcher($routeDefinitionCallback);
$routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getPath());

switch ($routeInfo[0]) {
    case \FastRoute\Dispatcher::NOT_FOUND:
        $response->setContent('404 - Page not found');
        $response->setStatusCode(404);
        $class = $injector->make('ProbeIP\Controllers\NotFound');
        $class->show();
        break;
    case \FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
        $response->setContent('405 - Method not allowed');
        $response->setStatusCode(405);
        break;
    case \FastRoute\Dispatcher::FOUND:
        $className = $routeInfo[1][0];
        $method = $routeInfo[1][1];
        $vars = $routeInfo[2];

//        echo "<pre>"; print_r($routeInfo);;
//        die;

        $class = $injector->make($className);
        $class->$method($vars);
        break;
}
foreach ($response->getHeaders() as $header) {
    header($header, false);
/
var
/
www
/
probeip
/
public
/
index.php
<?php
require_once __DIR__ . '/../src/bootstrap.php';

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER apache
HOME /usr/share/httpd
HTTP_HOST probeip.com
HTTP_REFERER http://www.probeip.com/our-services/
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
SERVER_NAME probeip.com
SERVER_PORT 443
SERVER_ADDR 206.189.17.111
REMOTE_PORT 50266
REMOTE_ADDR 44.204.94.166
SERVER_SOFTWARE nginx
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /var/www/probeip/public
DOCUMENT_URI /index.php
REQUEST_URI /our-services/
SCRIPT_FILENAME /var/www/probeip/public/index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623277.0976
REQUEST_TIME 1711623277
empty
0. Whoops\Handler\PrettyPageHandler