Open mamazu opened 2 years ago
@mamazu That's a good news :) @Florian-Merle Have you tested the tool? I don't have tested myself yet. So I cannot answer for now.
But @mamazu If you can add it on a pull-request with PHPUnit tests, I think we'll be able to be sure everything will be ok for end-users.
The tool works great :). However, during my work on the conversion of the sylius grids from YAML to PHP, I have not written down what can be improved, so I might not be exhaustive in the following list.
getResourceClass
but I think it's a mistakeResourceAwareGridInterface
That being said, with the right tools (I'm thinking of php-cs-fixer), it is quite easy to generate grids. Also a generated grid is almost already ready to be used :)
Coincidentally the last two points have already been addressed in the newest version of the tool.
The only issue we have is, that by default it generates grids assuming the underlying entity is a resource so that might be something that we don't want.
As for the first two points, I completely agree and the first point is also still on the todo list for the tool.
I am not sure if I should put in time to fix the second point. Because I think if you are using Sylius you more than likely already have ecs
set up. So it would just be another command you would run before committing anyways, but good catch.
First point is mostly addressed in the Merge Requested version of the tool, I will sadly not be backporting this to my repository.
This is due to the fact that the MR version of the tool has a different structure.
Originally posted by @loic425 in https://github.com/Sylius/Sylius/issues/14449#issuecomment-1280041599
I would like to offer to take that topic on. The question is what except for the namespace would need to be changed for the converter to be merge into the official Sylius bundle?