8000 Error: Value '24' is not part of the enum POData\Providers\Metadata\ResourcePropertyKind · Issue #279 · Algo-Web/POData · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error: Value '24' is not part of the enum POData\Providers\Metadata\ResourcePropertyKind #279

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

Open
kirill533 opened this issue Aug 4, 2021 · 1 comment

Comments

@kirill533
Copy link
Contributor
kirill533 commented Aug 4, 2021

Hi Guys, came back to your library after my code started to break with the latest version of myclabs/php-enum package.

I though, it will be fixed in your version, but seems like it is the same issue here.

If you do the composer update to the latest version of myclabs/php-enum package, the tests should start giving errors. Most common error is like this:

68) UnitTests\POData\Providers\Metadata\ResourceTypeTest::testisResourceKindValidForPropertyKind with data set #16 (24, 2, false)
UnexpectedValueException: Value '24' is not part of the enum POData\Providers\Metadata\ResourcePropertyKind

The reason is that myclabs/php-enum package has now extra validation here: \MyCLabs\Enum\Enum::assertValidValueReturningKey

I guess it expects the class ResourcePropertyKind to have a constant with number 24 (KEY | PRIMITIVE). And actually, adding extra constants helps to fix the errors on my side.

My PHP version: PHP 7.3.19-1+ubuntu18.04.1+deb.sury.org+1

One solution would be to adjust composer.json to support only myclabs/php-enum with version below 1.8.0. But, please, make it compatible with myclabs/php-enum 1.8 and higher to make the library easier to combine with other libraries.

@RuslanMelnychenko
Copy link
RuslanMelnychenko commented Jun 20, 2022

I fix it by add to composer.json require: "myclabs/php-enum": "1.7.6"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet < 3862 /span>
Development

No branches or pull requests

2 participants
0