-
Notifications
You must be signed in to change notification settings - Fork 80
Allow switching between request methods and post token by default #72
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
Conversation
…usion Have been getting these warnings quite often and a user mentioned it recently as well. I reckon this should fix it > Warning: include_once(): Failed opening './PiwikTracker.php' for inclusion (include_path='/vendor/pear/pear_exception:/vendor/pear/console_getopt:/vendor/pear/pear-core-minimal/src:/vendor/pear/archive_tar:.:/usr/local/Cellar/php/7.4.6_1/share/php/pear') in /vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 2110
Fix include_once warning Failed opening './PiwikTracker.php' for inclusion
added warning about redirects for setRequestMethod()
prevent method from being set to GET while doing Bulk Requests
Snake case converted to camel case. Reverted back to the method selection of 'POST' (intended). Added a warning about Log Analytics.
Method setRequestMethodNonBulk() added to allow (non bulk) POST requests
I used the following script.
The token was set for every request. I got as output: Expected behaviour: |
Thanks @silvershadowcc I've tested it now as well and fixed it. In my case it worked nicely. |
I will test it again this weekend. Also with redirects. |
fixed typo and passed test as such
In my case it works nicely as well. Got the results as stated in the expected behaviour above. Redirecting also works fine (using cURL). I did find a typo for which I have made PR #74 in this branch. This needs to be fixed in order for redirects to work. |
fixed typo
@sgiehl technically, this one could break something so would need to release ideally a Technically, something could break because if a token_auth is used, and the user is using eg We POST tokens by default to have it secure by default. |
@tsteur version 2.0 was only released for the new package name. Even though all versions are now available on both names, as we are using the same repo 🤷 |
They shouldn't be included in 3.x. |
Matomo 4 currently uses the 4.x-dev branch of this repo: https://github.com/matomo-org/matomo/blob/4.x-dev/composer.json#L38 |
Thanks for your help @silvershadowcc very appreciated |
follow up from https://github.com/matomo-org/matomo-php-tracker/pull/71/files
to fix #43
I haven't fully tested it. If someone could continue and test it this would be great.
Bulk requests would keep behaving the same. All other requests should behave like this:
POST
of all requests. When set, all parameters will be posted. This can be useful if there's a problem on the webserver re URL length or the requests are very long.GET
request method. Then token_auth will still be sent usingGET
which can be useful if you are having redirect issues for example.