willdurand / BazingaHateoasBundle

Integration of the Hateoas library into Symfony.
MIT License
294 stars 59 forks source link

willdurand/Hateoas#325 support for php attributes #104

Closed ixarlie closed 2 weeks ago

ixarlie commented 1 year ago

Adds a new service hateoas.configuration.metadata.attribute_driver for the AttributeDriver class (https://github.com/willdurand/Hateoas/pull/326)

Moreover, hateoas.configuration.metadata.attribute_driver and hateoas.configuration.metadata.annotation_driver are combined in a new service hateoas.configuration.metadata.annotation_or_attribute_driver to give the extension feature to both services.

The hateoas.configuration.metadata.attribute_driver will be removed if the PHP version is prior 8.1.0, so the hateoas.configuration.metadata.annotation_or_attribute_driver will have only the annotation driver.

This PR will require a new release version of willdurand/Hateoas

fabianoroberto commented 10 months ago

Is anyone handling this PR?

loic425 commented 6 months ago

any new about this PR?

jeandonaldroselin commented 4 months ago

Hello everyone, Any news about this PR ?

I have developed a catalog of micro services that are using this great bundle and I recently migrated all annotations to php8 attributes except hateoas because it is still not available. If it is necessary I can apply any requested changes to this PR, I have 1-2 month availability to contribute.

What do you think @ixarlie @W0rma ?

ixarlie commented 4 months ago

Hi @jeandonaldroselin ,

I am still waiting for the final review by the maintainers.

Nonetheless, I appreciate any suggestions that may improve the code. Same for https://github.com/willdurand/Hateoas/pull/326

Thank you kindly

goetas commented 2 weeks ago

I'm really sorry if this took so long. I have merged https://github.com/willdurand/Hateoas/pull/326 and tagged https://github.com/willdurand/Hateoas/releases/tag/3.11.0-beta1

Can someone please rebase this pull request?

ixarlie commented 2 weeks ago

Hi @goetas Rebase was done. thanks

goetas commented 2 weeks ago

So, I see a lot of test failing. if it helps, i'm fine with requiring php ^8.1 and willdurand/Hateoas 3.1@beta. That would simplify the pipelines and allow you to not worry about some edgecases

ixarlie commented 2 weeks ago

I will try to fix the tests this evening. I will reach out to you again in case I am unable to fix them.

To be honest, my intention was not to be disruptive with the php version.

ixarlie commented 2 weeks ago

Hi @goetas

I believe this would be ready for a new try.

Thanks

goetas commented 2 weeks ago

To me looks good. I'm going to merge it and to tag a beta release.

Please ping me here again after some time so I tag a stable release if there will be no problems.

The ci failures are unrelated to your changes

loic425 commented 2 weeks ago

Great, I'll try the beta release on sylius resource package. Thx a lot

W0rma commented 1 week ago

The ci failures are unrelated to your changes

@goetas I don't think that the failures are unrelated.

The tests with PHP 8.0 fail because this PHP version knows about attributes but does not support nested attributes which are used by the test fixtures. That's why tests with PHP < 8.0 and PHP > 8..0 are green but tests with PHP 8.0 are red.

I encountered a similar issue when working on https://github.com/willdurand/Hateoas/pull/334

The simplest solution to fix that would be to drop support for PHP < 8.1. WDYT?

goetas commented 1 day ago

@loic425 did you try the beta ?