Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated hook #40

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Updated hook #40

merged 1 commit into from
Oct 26, 2023

Conversation

felipeforte
Copy link
Contributor

Renamed deprecated hook isLoggedIn() to new isRegistered()

Renamed deprecated hook isLoggedIn() to new isRegistered()
@felipeforte
Copy link
Contributor Author

Related to #39

@squirrelslair
Copy link
Contributor

Sorry, I didn't see this, so had already pushed a pull request. I used !isAnon() instead. I wonder if one is better than the other somehow.

@valerio-bozzolan
Copy link

Thank you for this pull request. I suggest to the maintainer to merge.

This change has backward compatibility, but without this change the Matomo extension is just NOT compatible anymore with recent MediaWiki versions.

https://phabricator.wikimedia.org/T270450

Thanks for merging

@Seb35 Seb35 merged commit 0f665e5 into DaSchTour:master Oct 26, 2023
@Seb35
Copy link
Collaborator

Seb35 commented Oct 26, 2023

Thanks @felipeforte and sorry for the delay.

Without this patch, it triggers an exception "no function User::isLoggedIn()" from 1.38, and User::isRegistered() exists since 1.34 and was backported to 1.31.12.

I have to update extension.json to document this (currently the constraint is MediaWiki >= 1.25.0).

Seb35 added a commit that referenced this pull request Oct 27, 2023
This requires MediaWiki 1.34 and works up to (at least) MediaWiki 1.40.

New features since v4.0.0:
* Ignore wiki editors, to restrict analytics to anonymous users

Maintenance since v4.0.0:
* Replace global $wgUser deprecated in MediaWiki 1.35.2
* Replace User::isLoggedIn() deprecated in MediaWiki 1.34
* PSR-4 autoloading
* Added CI and quality checks
* Improved documentation

Thanks to the following people since v4.0.0 🥳

Eduardo Elias (2):
      Ignore wiki editors
      Make README to be parsed

Goldshop (1):
      Update extension.json

Sam Wilson (2):
      Add CI and linting, and fix errors
      Move Matomo.hooks.php to src/Hooks.php and adjust loading

Youri vd Bogert (1):
      Update README.md

felipeforte (1):
      Updated hook

mnival (2):
      Replace deprecated $wgUser by RequestContext::getMain()->getUser()
      Delete empty line

previously contributed as ttenbergen (1):
      allow plugins

Daniel Schuba (5):
      Merge pull request #32 from Goldshop/patch-1
      Merge pull request #26 from YOUR1/patch-1
      Merge pull request #35 from samwilson/phpcs
      Merge pull request #36 from samwilson/classname
      Merge pull request #37 from mnival/master

Seb35 (10):
      Rebase IgnoreEditors feature on 4.0.0
      Fix $wgMatomo* and $wgPiwik* parameters
      Merge pull request #40 from felipeforte/patch-1
      Restrict plugins to composer/installers
      Merge branch 'fix-ci'
      Make explicit the parameter $wgMatomoIgnoreEditors
      Avoid to silently ignore non-existing parameters
      Fix documentation issues
      Update CI
      Version 5.0
@bitsofmymind
Copy link

@Seb35 Merci ! I wanted to get Matomo to work on MW 1.40 but you got to it first.

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.

5 participants