johsin18 / DevicePixelRatioMatomoPlugin

3 stars 1 forks source link

Make plugin compatible with Matomo 4 #1

Closed Findus23 closed 3 years ago

Findus23 commented 3 years ago

Hi, hope you are doing well!

Matomo 4 is progressing steadily and it would be great if this plugin was also available for it.

Migrating the plugin should be pretty simple as there were not many breaking changes.

You can find the migration guide here: https://developer.matomo.org/guides/migrate-matomo-3-to-4

It boils down to:

If you later fix a bug and also want to backport it to the 3.x plugin, you can cherry-pick the commit to the old branch, release a new version (lower than the one for 4.x) and publish it and 3.x users should get this update.

If you have questions about anything, just ask me!

johsin18 commented 3 years ago

I have released version 2.0.0, which is compatible with Matomo 4.

@Findus23 I had problems running the tests on Travis, as both the minimum and maximum supported version do not exist yet. Setting PIWIK_TEST_TARGET=4.x-dev in .travis.yml fixed the problem. Maybe you want to mention this in your howtos.

Also, on this documentation page, https://developer.matomo.org/guides/tests-php you propose to use ./console generate:test. However, the verb generate:test seems to have disappeared from the console, in 4.x-dev. Is there an alternative?

Findus23 commented 3 years ago

Many thanks for the update.

Setting PIWIK_TEST_TARGET=4.x-dev in .travis.yml fixed the problem. Maybe you want to mention this in your howtos.

I forwarded this to the team.

However, the verb generate:test seems to have disappeared from the console, in 4.x-dev. Is there an alternative?

Are you sure? For me it seems to work. Make sure you have the development mode enabled as otherwise all development commands are not available. (./console development:enable)

johsin18 commented 3 years ago

Indeed, enabling developement mode helped. I was confused as e.g. generate:travis-yml is available even when development mode is disabled. Is that one useful for non-developers?