Closed rebbieboi closed 2 months ago
Can you try updating to the changes in the main
branch? It should have been fixed there but not yet released.
Can you try updating to the changes in the
main
branch? It should have been fixed there but not yet released.
not too sure how to do that. But I'll just wait for the official release. Do we know when that would be? Thank you!
Here is how to checkout a branch with Composer: https://getcomposer.org/doc/articles/versions.md#branches
There is no release date at the moment.
Had the same error, I managed to solve it by activating the PSR extension in PHP. In my case the PSR extension was not activated by default on my install.
Since I cannot create a PR for a git tag here is a patch for tag 3.1.0
(taken from https://github.com/mautic/api-library/compare/3.1.0...theodorosploumis:api-library:3.1.0.patch)
Hi All,
Can you merge these changes to main tag or release new one, please ?
@gulios please review, test and approve the PR you wish to merge. Most of them are stuck open as they aren't approved at least 2 times.
there is someting wrong with tags in that repo.
When i download latest version 3.1.0 in lib/Api/Api.php i see changes like: ` use Mautic\Auth\ApiAuth; use Mautic\Auth\AuthInterface; use Mautic\QueryBuilder\QueryBuilder; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger;
/**
because it was merged to main branch in git log ` commit 622e15f774f4d6ca48621fefe4b52e812d6b8d9c Merge: c1ae7f7 a448f0c Author: John Linhart admin@escope.cz Date: Fri Jul 19 10:06:32 2024 +0200
Merge pull request #327 from matbcvo/psr-logger
Use LoggerAwareTrait from Psr/Log
commit a448f0cadb22d88b1f5255b2818d9afae56d7a80 Author: Martin Vooremäe martin.vooremae@gmail.com Date: Thu Jul 18 21:06:05 2024 +0300
use LoggerAwareTrait from Psr/Log
`
but now when use composer in project composer info says: mautic/api-library 3.1.0
but don't see these changes in lib/Api/Api.php
@escopecz can you create new TAG e.g 3.1.1 with latest changes from main branch, please?
Try to create simply composer.json with "mautic/api-library": "^3.1" and look into lib/Api/Api.php it's not same as main branch so it would be nice to have latest tag synced.
Update: The release contained some potential BC breaks. I've retagged it with https://github.com/mautic/api-library/releases/tag/4.0.0-beta
Declaration of Mautic\Api\Api::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void {"userId":27,"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Declaration of Mautic\Api\Api::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void at /vendor/mautic/api-library/lib/Api/Api.php:127)
I fixed this by forcing "psr/log": "~2.0". Note that I'm using Laravel 10 which I think upgraded it to v3.0
I'm also using: "mautic/api-library": "^3.1.0",