Skip to content

Unable to resolve a value for parameter (path) in the function/method (__construct) #12

@andrewdyer

Description

@andrewdyer

I have a similar issue to #11

use Jenssegers\Lean\App;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Settings;

require __DIR__ . '/../vendor/autoload.php';

$app = new App();

$container = $app->getContainer();
$container->get('settings')->set('displayErrorDetails', true);

$app->get('/hello/{name}', function (Request $request, Response $response, string $name) {
    return $response->write('Hello, ' . $name);
});

$app->run();

Error:

Slim Application Error
The application could not run because of the following error:

Details

Type: League\Container\Exception\NotFoundException
Message: Unable to resolve a value for parameter (path) in the function/method (__construct)
File: /Users/andrew/apis/lean/vendor/league/container/src/Argument/ArgumentResolverTrait.php
Line: 78

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions