StofDoctrineExtensionsBundle icon indicating copy to clipboard operation
StofDoctrineExtensionsBundle copied to clipboard

[DX] Documentation Tweaks for First-time users

Open weaverryan opened this issue 11 years ago • 1 comments

Hi there!

This is part of the DX initiative. I think the current documentation has a lot of information, but isn't organized as well as it can be, especially for someone who is using the bundle for the first time. It's especially tricky because we don't want to repeat docs that are in the main library, but I think we can make some small changes that will help a lot.

Here is a potential first experience with this bundle

  1. Google for StofDoctrineExtensionsBundle and after a click on the README, find this page: https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst
  2. The composer.json require key is actually pretty good. But (and I'm not sure about this), telling the user to use composer require might be even better. Often, I see people copy and paste the entire require block. I think the php and symfony/symfony lines might also confuse them.
  3. After adding the bundle to AppKernel, the next thing I see is: https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst#add-the-extensions-to-your-mapping. This is not actually needed unless you're using one of these parts of the bundle (e.g. Translatable, Loggable). I think these should live individually under sections for each extension. The same is true for the Enable the softdeleteable filter header.
  4. What the user really needs to see is this section: https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst#activate-the-extensions-you-want

Overall, after installation, I think we should have a little table-of-contents called "Using each Extension", with a bulleted list of each extension that links to a separate file for docs about using just that extension. In each file, we'd tell them exactly how their configuration needs to look (e.g. enabling the listener, adding a filter (for softdeleteable), etc) and how to use that extension. We would of course have links to the real library for all the "heavy lifting".

Comments warmly welcome!

Thanks!

weaverryan avatar Jul 04 '14 22:07 weaverryan

For me it would be quite nice to see how to mention a behavior for the folowing orm (I prefer using orms in place of annotations)

Blogger\BlogBundle\Entity\Cat: type: entity table: cat repositoryClass: Blogger\BlogBundle\Entity\Repository\CatRepository id: id: type: integer generator: strategy: AUTO fields: name: type: string length: 45 manyToMany: blogs: targetEntity: Blog mappedBy: cats

Can you please show me how could I add translatable and loggable for example ?

malutanpetronel avatar Mar 04 '15 17:03 malutanpetronel