@Findus23 opened this Issue on September 12th 2018 Member

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

Stack Trace
from https://github.com/tedious/JShrink

ErrorException: compact(): Undefined variable: idGoal
<a href='/15'>#15</a> plugins/API/API.php(401): handleError

Stack Trace

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

Stack Trace

  • [x] moved to #13638

    To be continued...

If you want to, I can create test-admin accounts on the php 7.3 instance.

@fdellwing commented on September 12th 2018 Contributor

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..

@Findus23 commented on October 21st 2018 Member

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.

@Findus23 commented on October 21st 2018 Member

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?

@sgiehl commented on October 21st 2018 Member

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.:

    "type": "package",
    "package": {
        "name": "tedious/jshrink",
        "description": "Javascript Minifier built in PHP",
        "keywords": ["minifier","javascript"],
        "homepage": "http://github.com/tedious/JShrink",
        "type": "library",
        "license": "BSD-3-Clause",
        "version": "v1.3.1",
        "authors": [
                "name": "Robert Hafner",
                "email": "tedivm<a class='mention' href='https://github.com/tedivm'>@tedivm</a>.com"
        "require": {
            "php": ">=5.5.0"
        "autoload": {
            "psr-0": {"JShrink": "src/"}
        "source": {
            "type": "git",
            "url": "https://github.com/tedious/JShrink",
            "reference": "v1.3.1"
@Findus23 commented on October 22nd 2018 Member

@sgiehl Thanks for the tip.
I had to rename the package so that composer would use it instead of the real one.

@sgiehl commented on November 8th 2018 Member

Got another one:

"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Need to check if that will be fixed with https://github.com/matomo-org/matomo/pull/13566

Powered by GitHub Issue Mirror