Skip to content

[CI] Force php -l failure#2363

Merged
Alkarex merged 2 commits intoFreshRSS:devfrom
Frenzie:force-failure
Apr 8, 2019
Merged

[CI] Force php -l failure#2363
Alkarex merged 2 commits intoFreshRSS:devfrom
Frenzie:force-failure

Conversation

@Frenzie
Copy link
Member

@Frenzie Frenzie commented Apr 7, 2019

By redirecting stderr to a file and checking if the filesize is greater than 0 bytes, we can also force failure for warnings.

See discussion in #2362 (comment).

By redirecting stderr to a file and checking if the filesize is greater than 0 bytes, we can also force failure for warnings.

See discussion in <FreshRSS#2362 (comment)>.
@Frenzie
Copy link
Member Author

Frenzie commented Apr 7, 2019

I hadn't noticed this before. On the one hand I could exclude libraries (perhaps better on a case by case basis just so we are aware), on the other hand it's not completely clear to me what the library is for given the native json_* functions?

PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor in lib/JSON.php on line 119
PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in lib/JSON.php on line 910
PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in lib/JSON.php on line 924

@Alkarex
Copy link
Member

Alkarex commented Apr 7, 2019

The JSON library was for the infamous period when php_json was not included in the default PHP distribution on Debian due to a license problem :-/
At some point we should be able to remove it.

@Alkarex Alkarex added this to the 1.14.2 milestone Apr 7, 2019
@Alkarex
Copy link
Member

Alkarex commented Apr 7, 2019

And yes, I think third-party libraries should be excluded (and manually checked during inclusion / updates)

@Frenzie
Copy link
Member Author

Frenzie commented Apr 7, 2019

Since they're all fine (except for that one) and it is good to be aware of it, I'd argue against a priori exclusion of third-party libraries.

@Frenzie
Copy link
Member Author

Frenzie commented Apr 7, 2019

Btw, my local PHP 7.3.3 instance doesn't show this warning. Must be some php.ini setting?

@Alkarex
Copy link
Member

Alkarex commented Apr 7, 2019

Maybe PHP 7.3.4 (e.g from https://hub.docker.com/_/php ) (I am on mobile atm).
It is indeed good to be aware, so maybe a warning if possible

@Frenzie
Copy link
Member Author

Frenzie commented Apr 7, 2019

It's 5.5 or 5.6 7.0 and up on Travis (also mobile here), so definitely not a version thing. :-)

The way I wrote it now only libs/JSON is excluded, to which other files could be added if circumstances require it. The important thing is that it's a conscious decision imo.

@Alkarex Alkarex merged commit 1bf8ef4 into FreshRSS:dev Apr 8, 2019
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Apr 8, 2019
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
* [CI] Force php -l failure

By redirecting stderr to a file and checking if the filesize is greater than 0 bytes, we can also force failure for warnings.

See discussion in <FreshRSS#2362 (comment)>.

* exclude JSON lib
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.

2 participants