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

Typing function checkToken #4561

Merged
merged 3 commits into from
Nov 14, 2022
Merged

Typing function checkToken #4561

merged 3 commits into from
Nov 14, 2022

Conversation

ColonelMoutarde
Copy link
Contributor

Type hinting in function

@Alkarex Alkarex added this to the 1.21.0 milestone Aug 30, 2022
@Alkarex
Copy link
Member

Alkarex commented Aug 30, 2022

Looks good so far 👍🏻 Contributes to #4112

Please remember to ensure compatibility with the oldest and newest supported PHP versions (which will be 7.2 - 8.2 for FreshRSS 1.21).

How to perform a minimal test:

docker build --pull --tag freshrss/freshrss:oldest -f Docker/Dockerfile-Oldest .

docker run --rm -v $PWD:/var/www/FreshRSS freshrss/freshrss:oldest sh -c "find . -type d -name 'vendor' -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l 1>/dev/null"

make test-all

@Alkarex Alkarex merged commit d9e1c1c into FreshRSS:edge Nov 14, 2022
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Nov 15, 2022
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
Copy link
Member

Alkarex commented Nov 15, 2022

This caused a regression leading to a fatal error:

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

Addressed in #4855

Alkarex added a commit that referenced this pull request Nov 15, 2022
Fix regressions from #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 #4110
@Alkarex Alkarex mentioned this pull request Jan 21, 2023
2 tasks
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

Successfully merging this pull request may close these issues.

None yet

2 participants