sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
219 stars 210 forks source link

[4.x] Recipe is broken? #1651

Closed haivala closed 1 year ago

haivala commented 1 year ago
  Updating recipe for sonata-project/page-bundle...

There was an error applying the recipe update patch
Could not find file "src/Entity/SonataPageBlock.php" in the patch.

Is this even a bug? got this error so I thought I inform it here.

VincentLanglet commented 1 year ago

cc @eerison who work on the recipe https://github.com/symfony/recipes-contrib/pull/1440

eerison commented 1 year ago

@haivala Hmmm could you inform how is your folder structure?

Is there sonata classes into src/Entity?

Could you post here how your SonataPageBlock looks like?

haivala commented 1 year ago

@haivala Hmmm could you inform how is your folder structure?

Is there sonata classes into src/Entity?

No, they are in src/Entity/Sonata/*.php so there should not even be any conflicts

Could you post here how your SonataPageBlock looks like?

I don't see how this is even relevant but it is the same as in the docs.

I'm able to update other recipes just fine.

eerison commented 1 year ago

it's the problem your Sonata entities are inside of subclass into entity, For this reason it's not finding the SonataPageBlock class.

haivala commented 1 year ago

If the recipe has been installed in some point of time update command thinks the files from that recipe are still present. Then it tries to find those files and update them and if those are not present anymore recipe update fails. From the error description I thought the linked file in the recipe side is not found because it says in the patch.

eerison commented 1 year ago

I guess it's not related with recipes, if you check the PR that I opened, I didn't change files path, only the code inside the files!

But to be honest I don't know why it's broking, because in the worst case, the sonatapageblock should be generated inside of src/Entity