Skip to content

Fix several PHP8.1 warnings#4123

Merged
Alkarex merged 5 commits intoFreshRSS:edgefrom
Alkarex:php8.1-warnings
Jan 6, 2022
Merged

Fix several PHP8.1 warnings#4123
Alkarex merged 5 commits intoFreshRSS:edgefrom
Alkarex:php8.1-warnings

Conversation

@Alkarex
Copy link
Copy Markdown
Member

@Alkarex Alkarex commented Jan 4, 2022

Follow-up of #4012

Taking advantage of #4121

Contributes to #4112

Allow our default CI to pass without warnings

# Run all tests with newest PHP 8.1:
docker run --rm -v $PWD:/var/www/FreshRSS freshrss/freshrss:newest bin/composer test

# Run all tests with default PHP 7.4
docker run --rm -v $PWD:/var/www/FreshRSS freshrss/freshrss bin/composer test
# Two inconsequential warnings in PHPStan due to method signatures updated from PHP7 to PHP8:
# ob_implicit_flush and simplexml_load_string

# Run minimal syntax tests with oldest PHP 7.0:
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"

@Alkarex Alkarex added the System care Everything related to system care label Jan 4, 2022
@Alkarex Alkarex added this to the 1.19.2 milestone Jan 4, 2022
public $id;
/**
* @todo Rewrite as method and quess if null.
* @var unknown_type
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only did a minimum in that library but there are many other problems, and it should soon be fully replaced

@Alkarex Alkarex merged commit 8e398d2 into FreshRSS:edge Jan 6, 2022
@Alkarex Alkarex deleted the php8.1-warnings branch January 6, 2022 21:39
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Jun 18, 2022
Due to small changes of signature in `ob_implicit_flush` and `simplexml_load_string`, cf. FreshRSS#4123
Alkarex added a commit that referenced this pull request Jun 19, 2022
* Update all test dependencies

* Remove old false-positive

* Minor update lock files

* Increase PHPStan memory for Fedora
#4400 (comment)

* Require PHP8+ for tests
Due to small changes of signature in `ob_implicit_flush` and `simplexml_load_string`, cf. #4123

* Missing lint in CSS files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

System care Everything related to system care

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant