Skip to content

Cannot assign null to property Nette\Caching\Storages\SQLiteJournal::$pdo of type PDO when running tests #37

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

Closed
Snooker147 opened this issue Jan 31, 2023 · 2 comments · Fixed by #43

Comments

@Snooker147
Copy link

Hello,

after upgrading to the newest version of Nette caching library and running codeception tests I now get the following error:
Cannot assign null to property Nette\Caching\Storages\SQLiteJournal::$pdo of type PDO right after the tests are finished.

This looks to be an issue with the latest Nette\Caching commit here which does no longer allow the $pdo property to be nullable.

Detailed error stacktrace:
image

I switched to a prior version without that commit (Nette\Caching v3.1.4) and the error no longer appears. Can we get this fixed please, so that we can use the newest Nette\Caching version?

Thanks!

@her-ur
Copy link

her-ur commented Mar 13, 2023

It seems that should be enough to call $journal->clean([Cache::All => true]); instead of setting null via reflection. What do you think?

@rattuscz
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants