PatrickLouys / no-framework-tutorial

A small tutorial to show how to create a PHP application without a framework.
MIT License
1.53k stars 186 forks source link

Namespace problem in part 7 #54

Closed thinsoldier closed 8 years ago

thinsoldier commented 8 years ago

Argument 1 passed to Example\Controllers\Homepage::__construct() must be an instance of Example\Controllers\Response, instance of Http\HttpResponse given

I don't how to fix this.

Fixed by changing Homepage controller constructor to

public function __construct(\Http\HttpResponse $response)

Should I not have needed to do this?

Nevermind. I missed the USE statement in the example code.