[GH-ISSUE #591] Return type of OCA\TwoFactorGateway\Provider\State::jsonSerialize() error #123

Open
opened 2026-02-26 05:33:23 +03:00 by kerem · 1 comment
Owner

Originally created by @oleua on GitHub (Sep 24, 2023).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/591

Hi! I am getting error in nextcloud journal

Return type of OCA\TwoFactorGateway\Provider\State::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/html/nextcloud/apps/twofactor_gateway/lib/Provider/State.php#125

referencing to

public function jsonSerialize() {
                return [
                        'gatewayName' => $this->gatewayName,
                        'state' => $this->state,
                        'phoneNumber' => $this->identifier,
                ];
        }
Originally created by @oleua on GitHub (Sep 24, 2023). Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/591 Hi! I am getting error in nextcloud journal `Return type of OCA\TwoFactorGateway\Provider\State::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/html/nextcloud/apps/twofactor_gateway/lib/Provider/State.php#125` referencing to ``` public function jsonSerialize() { return [ 'gatewayName' => $this->gatewayName, 'state' => $this->state, 'phoneNumber' => $this->identifier, ]; } ```
Author
Owner

@vitormattos commented on GitHub (Sep 12, 2025):

This issue has already been resolved in my fork, but my goal is to bring the updates back to the main repository so that the whole community can benefit directly.
Since the app currently has no maintainer, I’ve also offered to take care of its development here:

If you’d like to see this app updated and maintained, it would be really helpful if you could also add your support in that discussion. That way, it will be clearer to the Nextcloud team that this app is still important for the community.

<!-- gh-comment-id:3283368922 --> @vitormattos commented on GitHub (Sep 12, 2025): This issue has already been resolved in my fork, but my goal is to bring the updates back to the main repository so that the whole community can benefit directly. Since the app currently has no maintainer, I’ve also offered to take care of its development here: - https://github.com/nextcloud/twofactor_gateway/issues/454#issuecomment-3276728446 If you’d like to see this app updated and maintained, it would be really helpful if you could also add your support in that discussion. That way, it will be clearer to the Nextcloud team that this app is still important for the community.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/twofactor_gateway-nextcloud#123
No description provided.