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

Issue with dynamic property creation (php8.2) #530

Open
jeremy379 opened this issue Mar 25, 2024 · 1 comment
Open

Issue with dynamic property creation (php8.2) #530

jeremy379 opened this issue Mar 25, 2024 · 1 comment

Comments

@jeremy379
Copy link
Contributor

jeremy379 commented Mar 25, 2024

Hello

I encountered an issue in php8.2 due to dynamic property creation when retrieving a comment and the params "jsdPublic" is sent back by Jira.

The error happens in src/JsonMapperHelper.php:25 when loading a src/Issue/Comment.php

ErrorException: Creation of dynamic property JiraRestApi\Issue\Comment::$jsdPublic is deprecated in /vendor/lesstif/php-jira-rest-client/src/JsonMapperHelper.php:25
Stack trace:
    #0 /vendor/lesstif/php-jira-rest-client/src/JsonMapperHelper.php(25): {closure}()
    #1 /vendor/netresearch/jsonmapper/src/JsonMapper.php(187): JiraRestApi\JsonMapperHelper::setUndefinedProperty()
    #2 /vendor/netresearch/jsonmapper/src/JsonMapper.php(471): JsonMapper->map()
    #3 /vendor/netresearch/jsonmapper/src/JsonMapper.php(305): JsonMapper->mapArray()
    #4 /vendor/netresearch/jsonmapper/src/JsonMapper.php(318): JsonMapper->map()
    #5 /vendor/netresearch/jsonmapper/src/JsonMapper.php(318): JsonMapper->map()
    #6 /vendor/lesstif/php-jira-rest-client/src/Issue/IssueService.php(50): JsonMapper->map()
    #7 MyImplem: JiraRestApi\Issue\IssueService->get()

It seems it try to set any property it find in the json, and there is a lot more than what's existing. (It even try to set some stuff to the \Datetime object).

@jeremy379
Copy link
Contributor Author

MR opened for this issue: #531

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

No branches or pull requests

1 participant