Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurs in View Class #1358

Closed
46-96 opened this issue Oct 26, 2018 · 3 comments
Closed

An error occurs in View Class #1358

46-96 opened this issue Oct 26, 2018 · 3 comments

Comments

@46-96
Copy link

46-96 commented Oct 26, 2018

version 4.0 alpha-1
Using a monolog will cause an error.

CRITICAL: Argument 5 passed to CodeIgniter\View\View::__construct() must be an instance of CodeIgniter\Log\Logger or null, instance of App\Libraries\MyLogger given, called in /app/ci4/ci4/system/Config/Services.php on line 497

-use CodeIgniter\Log\Logger;
+use Psr\Log\LoggerInterface;

-public function __construct($config, string $viewPath = null, $loader = null, bool $debug = null, Logger $logger = null)
+public function __construct($config, string $viewPath = null, $loader = null, bool $debug = null, LoggerInterface $logger = null)

It worked correctly by changing like this.
Is it wrong?

@lonnieezell
Copy link
Member

You're correct. That's how it should be. Care to submit a PR?

@46-96
Copy link
Author

46-96 commented Oct 29, 2018

I have never made a PR.
Please fix it.

@bangbangda
Copy link
Contributor

I fix it.

lonnieezell added a commit that referenced this issue Oct 29, 2018
fix monolog will cause an error. Fixes #1358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants