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

Fix type hints regressions #4855

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Nov 15, 2022

Fix regressions from #4561 , which added some hard type hints but without ensuring that the code paths would provide strictly identical class types.

Example:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to checkToken() must be an instance of FreshRSS_UserConfiguration, instance of Minz_Configuration given, called in /var/www/FreshRSS/p/api/greader.php on line 1091 and defined in /var/www/FreshRSS/p/api/greader.php:223
Stack trace:
#0 /var/www/FreshRSS/p/api/greader.php(1091): checkToken()
#1 {main}
  thrown in /var/www/FreshRSS/p/api/greader.php on line 223

I refactored the way we access our configuration to have stricter types, improvement of #4110
More work could be done to simplify the way we work with configurations.

Fix regressions from FreshRSS#4561

Example:

```
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to checkToken() must be an instance of FreshRSS_UserConfiguration, instance of Minz_Configuration given, called in /var/www/FreshRSS/p/api/greader.php on line 1091 and defined in /var/www/FreshRSS/p/api/greader.php:223
Stack trace:
#0 /var/www/FreshRSS/p/api/greader.php(1091): checkToken()
#1 {main}
  thrown in /var/www/FreshRSS/p/api/greader.php on line 223
```

Improvement of FreshRSS#4110
@Alkarex Alkarex added Important 🔥 System care Everything related to the system care Bug (confirmed) 🐞 issues that are reproducable labels Nov 15, 2022
@Alkarex Alkarex added this to the 1.21.0 milestone Nov 15, 2022
@Alkarex Alkarex linked an issue Nov 15, 2022 that may be closed by this pull request
@Alkarex
Copy link
Member Author

Alkarex commented Nov 15, 2022

Quick merge to ease testing in #4854

@Alkarex Alkarex merged commit 42eeb40 into FreshRSS:edge Nov 15, 2022
@Alkarex Alkarex deleted the fix-type-regressions branch November 15, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug (confirmed) 🐞 issues that are reproducable Important 🔥 System care Everything related to the system care
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] greader API latest Docker Dev Build
1 participant