Closed HassanAlthaf closed 9 years ago
Could you provide the relevant constructor / method signatures of the objects you're attempting to create, and explain what you're trying to do?
Yes, a simple reproduce script would go a long way to diagnosing any potential issue. It would be very helpful if you could provide one :)
I use it like this: namespace App;
use Http\Request; use Http\Response;
class Foo { private $request; private $response; public function __construct(Request $request, Response $response) { $this->response = $response; $this->request = $request; }
public function do()
{
$username = $this->request->getParameter('username');
}
}
That is how I use it, and it generates that error when the class is instantiated.
This problem is fixed when I use an old version of Auryn, so that is what I'm using right now.
@HassanAlthaf And which version are you using right now?
@HassanAlthaf Try this
use \Http\Request;
use \Http\Response;
I can't diagnose anything from the code samples provided. Please add a code snippet demonstrating actual Auryn usage that gives an error where a different result is expected.
Closing as there's been no activity and no reproduce code ...
Hey, I get that error when I had this code:
$injector->alias('Http\Response', 'Http\HttpResponse'); $injector->share('Http\HttpRequest'); $injector->define('Http\HttpRequest', [ ':get' => $_GET, ':post' => $_POST, ':cookies' => $_COOKIE, ':files' => $_FILES, ':server' => $_SERVER, ]);
$injector->alias('Http\Request', 'Http\HttpRequest'); $injector->share('Http\HttpResponse');
However, when I use an old version of Auryn, it works perfectly fine! I bet this is a bug.