Skip to content

Fix constructor for Version class #521

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

Merged
merged 5 commits into from
Sep 26, 2023
Merged

Fix constructor for Version class #521

merged 5 commits into from
Sep 26, 2023

Conversation

reinfi
Copy link
Contributor

@reinfi reinfi commented Sep 12, 2023

I'm sorry, I should have seen this before.

error	12-Sep-2023 10:01:52	PHP Fatal error:  Uncaught TypeError: Cannot assign null to property JiraRestApi\Issue\Version::$name of type string in /home/bamboo/bamboo-home/local-working-dir/44564481/API-ACUR-JOB1/release-script/vendor/lesstif/php-jira-rest-client/src/Issue/Version.php:36
error	12-Sep-2023 10:01:52	Stack trace:
error	12-Sep-2023 10:01:52	#0 [internal function]: JiraRestApi\Issue\Version->__construct()
error	12-Sep-2023 10:01:52	#1 /home/bamboo/bamboo-home/local-working-dir/44564481/API-ACUR-JOB1/release-script/vendor/netresearch/jsonmapper/src/JsonMapper.php(685): ReflectionClass->newInstance()

name can only be a string so there should not be any default null value.

But to get this working we would need the latest version of the json mapper because I added there the functionality to provide a class-string.

There is no version 5.0 that is why I removed it.

If you do not want to drop support for the old json mapper versions we would need to either use Reflection to instantiated the class without constructor oder name must be nullable again.

Sorry again for the mistake.

@reinfi
Copy link
Contributor Author

reinfi commented Sep 25, 2023

@lesstif any news on this? 🙈

@lesstif lesstif merged commit 1306db5 into lesstif:main Sep 26, 2023
@lesstif
Copy link
Owner

lesstif commented Sep 26, 2023

Hi @reinfi sorry for the late reply. I have released it as 5.7.0.
Have a great day!

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

Successfully merging this pull request may close these issues.

2 participants