Page MenuHomePhabricator

Upgrade monolog to 1.22
Closed, ResolvedPublic

Description

We're starting to lag behind a bit. We're on 1.18.2, 1.22 (November 2016) is out, and there's over 200 commits to master after that, which suggest 1.23 probably isn't far away

https://github.com/Seldaek/monolog/releases/tag/1.19.0
https://github.com/Seldaek/monolog/releases/tag/1.20.0
https://github.com/Seldaek/monolog/releases/tag/1.21.0
https://github.com/Seldaek/monolog/releases/tag/1.22.0

https://github.com/Seldaek/monolog/compare/1.18.2...1.22.0 is *only* 102 commits, so it looks like a lot more dev has happened after 1.22

Not many breaking changes (at least, according to the release notes), don't know which directly affect us. Some PHP 7.0 and 7.1 fixes come in along with it in 1.22 too which are always helpful as we're making other PHP 7 support changes across the board

Will commit the basic vendor and core bump patches and see what jenkins thinks of it all

Event Timeline

Reedy created this task.Feb 21 2017, 9:36 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 21 2017, 9:36 PM

Change 339044 had a related patch set uploaded (by Reedy):
Update monolog from 1.18.2 to 1.22.0

https://gerrit.wikimedia.org/r/339044

Change 339046 had a related patch set uploaded (by Reedy):
Update monolog from 1.18.2 to 1.22.0

https://gerrit.wikimedia.org/r/339046

Reedy added a comment.Feb 21 2017, 9:58 PM

PhpStorms static analysis doesn't see anything wrong in that sense...

https://github.com/Seldaek/monolog/releases/tag/1.21.0

Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues

We were never on 1.20, so that isn't a problem

For https://github.com/Seldaek/monolog/releases/tag/1.19.0

Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed
Targets
    Occurrences of 'StreamHandler' in Directory /Users/reedy/PhpstormProjects/MediaWiki/core/includes/debug/logger
Found Occurrences  (2 usages found)
    Usage in comments  (2 usages found)
        MediaWiki  (2 usages found)
            core/includes/debug/logger  (1 usage found)
                MonologSpi.php  (1 usage found)
                    74 *               'class'     => '\\Monolog\\Handler\\StreamHandler',
            core/includes/debug/logger/monolog  (1 usage found)
                LegacyHandler.php  (1 usage found)
                    44 * replacement for \Monolog\Handler\StreamHandler.

Neither of which are affected by that break

Seb35 added a subscriber: Seb35.Feb 25 2017, 12:35 PM

The master branch is the 2.0 release (see https://github.com/Seldaek/monolog/issues/197) and requires PHP 7 (so a bump to 2.0 would require to bump MW requirements before). It seems that the master branch and the 1.x branch are quite kept in sync, there are a lot of merges from 1.x to master, meaning that most issues are fixed both in 1.x and in master.

Note also that a commit (5bc1e18, 18 December 2015) says that HHVM support was dropped “for now” in master branch.

Cheers for the heads up.

All the more reason to get to 1.22 then i guess, I'm guessing there won't be a 1.23, but maybe some 1.22 point releases for some bug fixes if anything is found

The chances of us bumping to a min supported PHP 7 version in MW isn't likely to happen for a while, and certainly, dropping "hhvm support" would be a blocker, if that was the case (looking at https://github.com/Seldaek/monolog/commit/5bc1e18 it looked mostly like a workaround for travis, rather than actual "hhvm support" in the code)

Reedy renamed this task from Upgrade monolog to newer version to Upgrade monolog to 1.22.Feb 25 2017, 11:44 PM

Change 339044 merged by jenkins-bot:
[mediawiki/vendor@master] Update monolog from 1.18.2 to 1.22.1

https://gerrit.wikimedia.org/r/339044

Change 339046 merged by jenkins-bot:
[mediawiki/core@master] Update monolog from 1.18.2 to 1.22.1

https://gerrit.wikimedia.org/r/339046

Reedy closed this task as Resolved.Apr 4 2017, 7:15 PM
Reedy claimed this task.