Skip to content

Support ApiPlatform 3.0 #16

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
benblub opened this issue Oct 6, 2022 · 4 comments
Closed

Support ApiPlatform 3.0 #16

benblub opened this issue Oct 6, 2022 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@benblub
Copy link

benblub commented Oct 6, 2022

I have not yet tested whether the bundle would support 3.0 in principle. Is that already something planned?

    - metaclass-nl/filter-bundle is locked to version v2.0.1 and an update of this package was not requested.
    - metaclass-nl/filter-bundle v2.0.1 requires api-platform/core ^2.5 -> found api-platform/core[v2.5.0, ..., v2.7.1] but it conflicts with your root composer.json require (^3.0).

@metaclass-nl metaclass-nl added enhancement New feature or request question Further information is requested labels Oct 6, 2022
@metaclass-nl
Copy link
Owner

metaclass-nl commented Oct 6, 2022

Hi benblub,

IMHO [RFC] Filter composition and WhereFilter suggest that the current filters COULD be replaced entirely in 3.0. My remarks and suggestions based on metaclass-nl/filter-bundle being ignoored compeletely did not exactly make me more optimistic.

Last months i have seen a lot of ussues passing by, i guessed it had something to do with 3.0 but the process still seemed very difficult to suervey so no, i did not plan anything.

I just took an other look and now 3.0 seems to be merged into main, i guess the release is sort of stable now, so i should take a look to see if the filters are still there and if so, what changes are made. Of course any insights from you and others are welcome too. Depending on that i will share my intentions here, i hope next week, but i can not make any promises.

@metaclass-nl
Copy link
Owner

metaclass-nl commented Oct 7, 2022

It looks like with respect to the filters themselves little has changed between 2.6 and 3.0, just that the filters have been moved to a new namespace. This would be a breaking change so for the filter-bundle to work with 3.0 a new major version will be necessary. But i can not yet comprehend the possible impact of the new metadata.

2.7 puzzles me, I guess the old version should work with metadata_backward_compatibility_layer=true and the new version with metadata_backward_compatibility_layer=false. But AFAIK this can not be expressed in the declared dependencies in composer.json of filter-bundle...

@metaclass-nl
Copy link
Owner

The new metadata does have an impact on LogicFilter, but mostly on the tests. I got lost in the new namespaces so that i could not estimate the time required. So i just made a start with the adaptation. I now have it working with 2.7 with metadata_backward_compatibility_layer=false, except Metaclass\FilterBundle\Filter\DateFilter which extends a class that is now final.

I hope to finish the work during this week but i can not make any promises because i do not know how much time i can actually spend. For those who don't want to wait i will push a branch 3.0 today with a bleeding edge development version. See its readme for its status.

@metaclass-nl
Copy link
Owner

metaclass-nl commented Oct 11, 2022

It went much quicker then i expected. Released as v3.0.0.rc2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants