symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

[Documentation][ValueResolvers] add example Value Resolvers

Open dylan-b-efficience-it opened this issue 2 years ago • 4 comments

I observed that the documentation lacked references and examples to elucidate the various types of value resolvers.

dylan-b-efficience-it avatar Jan 16 '24 14:01 dylan-b-efficience-it

Thanks for this proposal.

The problem with adding these examples is that we need to reformat the original docs. Why? Becuase they are displayed as a short list of items. If we add examples, the list is going to be very long and it will look bad when rendered.

So, asking to Symfony Doc maintainers (@OskarStark, @wouterj and @xabbuh): do you think we should refactor this list into a series of small h3 or h4 section per resolver to add an example ... or maybe we could just not include these examples? Thanks!

javiereguiluz avatar Jan 17 '24 07:01 javiereguiluz

I understand. Would you like me to reduce the examples, just indicating the route and the function name? Example :

#[Route('/exemple/{$donneesProduit}')]
public function afficherProduit(string $donneesProduit): Response
{
    // ...
}

Or would you rather wait for Symfony Doc maintainers opinion?

dylan-b-efficience-it avatar Jan 24 '24 14:01 dylan-b-efficience-it

I like having examples 👍

OskarStark avatar Jan 24 '24 15:01 OskarStark

Hi ! @OskarStark .

I'd like to know whether I should keep the original proposal or make some changes to the examples, as indicated in my previous message.

dylan-b-efficience-it avatar Jan 25 '24 10:01 dylan-b-efficience-it