symplify
symplify copied to clipboard
Data Provider only feature
Allows the user to pass an argument that allows to only process controllers via withDataProvider excluding access to controllers indiscriminately.
symfony console dump-static-site --wdp-only
Hi, thanks for PR. What is the use case for this?
Friendly ping :slightly_smiling_face:
Closing for lack of feedback. We're narrowing issues to keep focus on active and engaging contributor to keep project growing. :+1: Thank you for understanding.
Feel free to re-open and make CI pass, if this is still releveant
Hey Tomas, sorry I was out of town just getting back, the use case is the following:
The export fails when you got controllers with authorization, it will not export because you are not passing an user credentials, so what I did is to integrate a flag to avoid the exporter looking into all the controllers but only the ones WithDataProvider which are the ones defining the correct functions to public addresses in the platform.
Now I am going back to the source code because when adding a Site Prefix the exporter will double export the prefix of the platform for example:
Currently doing: Site prefix: mydomain.com/my-site-prefix/ Exports: to path: output/my-site-prefix/my-site-prefix/
So it's duplicating the my-site-prefix for the output of the controllers everything else is exported correctly (since it is a cp from public)
Regards,
Thanks for reaching out :+1:
The export fails when you got controllers with authorization, it will not export because you are not passing an user credentials, so what I did is to integrate a flag to avoid the exporter looking into all the controllers but only the ones WithDataProvider which are the ones defining the correct functions to public addresses in the platform.
I'm not sure this need and extension. It can be handled in custom data provider.
Yes I know, I add the custom data provider and execute the command and it fails because I will scan all controllers regardless. But okay for my use case I am using my own repository for the project I added it to, if not I'll rewrite the whole thing, I'm new to symfony and getting used to it I think I'm learning pretty fast.
Adding more on this, I am not sure if the error I am getting is due my custom data providers living inside a sub directory in my controllers folder, could this be the issue? Because despite having these the dump-static-site command will look all of the controllers throwing the error of not injected dependencies (auth, or others).
Could that be the issue?
Adding more on this, I am not sure if the error I am getting is due my custom data providers living inside a sub directory in my controllers folder, could this be the issue?
Not sure. If you move them to directory above, would it help?