In 3 months PHP 7.3 will be released, so let's start making Matomo compatible!
I tried setting up a new Matomo instance using PHP 7.3 RC2 (so all bugs found now will probably also be in the final release) and most things are working fine. These errors occurred:
ErrorException: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior <a href='/17'>#17</a> vendor/tedivm/jshrink/src/JShrink/Minifier.php(196): handleError
2018/09/12 20:46:17 [error] 8919<a href='/8919'>#8919</a>: *137700 FastCGI sent in stderr: "PHP message: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/matomo-beta/vendor/tedivm/jshrink/src/JShrink/Minifier.php on line 243"
also from https://github.com/tedious/JShrink
WARNING [2018-09-12 19:04:26] 20837 /var/www/matomo-beta/plugins/LanguagesManager/Commands/CreatePull.php(217): Warning - "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Matomo 3.6.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
ErrorException: compact(): Undefined variable: idGoal <a href='/15'>#15</a> plugins/API/API.php(401): handleError
ErrorException: Undefined index: never <a href='/15'>#15</a> core/View/HtmlReportEmailHeaderView.php(41): handleError <a href='/14'>#14</a> core/View/HtmlReportEmailHeaderView.php(41): __construct <a href='/13'>#13</a> core/ReportRenderer/Html.php(84): renderFrontPage
To be continued...
If you want to, I can create test-admin accounts on the php 7.3 instance.
During visitorgenerator:generate-visits. I am not sure what exactly is the error and if it has anything to do with PHP 7.3.
Not a PHP error, it tries to write -5 into an db field that is unsigned mostlikely. Why it tries to write -5 is a interesting question nethertheless.
Also note that your request contains 2 token_auths, that is quite unusual I would say..
Okay, I have now updated the server to the latest release candidate and tried around and couldn't really find more issues.
For the first two I'll create a pull request soon once https://github.com/tedious/JShrink/issues/80 is fixed.
@fdellwing I agree that this is probably a really obscure visitor generator bug, so I have removed it here.
Interestingly everything around PHP generation still works fine (where I expected most bugs).
As PHP7.3 just migrated to Debian testing, I'll expect it to be the default version in the next Debian stable (will be released in about a year) and ubuntu versions. Therefore probably a lot of people will be using it in a year.
Okay, I mixed a bit up regarding JShirk. We are using a more than 4 year old beta version of it.
The latest version from last month fixes the warnings in PHP 7.3, so it should be easy to update, but unfortunately the recent versions dropped support for 5.5 which causes composer to refuse installing it.
Does anyone have an idea what's the easiest way to fix this?
If the current version is actually still compatible with 5.5, but the dependencies were just changed in the composer.json we could overwrite it with a custom package in composer.json to overwrite the php requirement. e.g.:
@sgiehl Thanks for the tip.
I had to rename the package so that composer would use it instead of the real one.
Got another one:
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? /home/travis/build/piwik/vendor/tecnickcom/tcpdf/tcpdf.php:17778
Need to check if that will be fixed with https://github.com/matomo-org/matomo/pull/13566
Please also clarify this in the docs. Currently it just says "PHP version 5.5.9 or greater".
Replace continue with break resolved the issue.
@diosmosis If no one else reports any more issues, I'd say this is done.
Next week I'll move my live instance to 7.3 and can probably then report back more issues.