@@ -33,20 +33,22 @@ Reproducing Complex Bugs
3333------------------------
3434
3535If the bug is related to the Symfony Framework or if it's too complex to create
36- a PHP script, it's better to reproduce the bug by forking the Symfony Standard
37- edition. To do so:
38-
39- #. Go to https://github.com/symfony/symfony-standard and click on the **Fork **
40- button to make a fork of that repository or go to your already forked copy.
41- #. Clone the forked repository into your computer:
42- ``git clone git://github.com/YOUR-GITHUB-USERNAME/symfony-standard.git ``
43- #. Browse the project and create a new branch (e.g. ``issue_23567 ``,
44- ``reproduce_23657 ``, etc.)
45- #. Now you must add the minimum amount of code to reproduce the bug. This is the
36+ a PHP script, it's better to reproduce the bug by creating a new project. To do so:
37+
38+ 1. Create a new project:
39+
40+ .. code-block :: terminal
41+
42+ $ composer require symfony/skeleton bug_app
43+
44+ 2. Now you must add the minimum amount of code to reproduce the bug. This is the
4645 trickiest part and it's explained a bit more later.
47- #. Add, commit and push all your changes.
48- #. Add a comment in your original issue report to share the URL of your forked
49- project (e.g. ``https://github.com/YOUR-GITHUB-USERNAME/symfony-standard/tree/issue_23567 ``)
46+ 3. Add and commit your changes.
47+ 4. Create a `new repository `_ on GitHub (give it any name).
48+ 5. Follow the instructions on GitHub to add the ``origin `` remote to your local project
49+ and push it.
50+ 6. Add a comment in your original issue report to share the URL of your forked
51+ project (e.g. ``https://github.com/YOUR-GITHUB-USERNAME/symfony_issue_23567 ``)
5052 and, if necessary, explain the steps to reproduce (e.g. "browse this URL",
5153 "fill in this data in the form and submit it", etc.)
5254
@@ -55,23 +57,24 @@ Adding the Minimum Amount of Code Possible
5557
5658The key to create a bug reproducer is to solely focus on the feature that you
5759suspect is failing. For example, imagine that you suspect that the bug is related
58- to a route definition. Then, after forking the Symfony Standard Edition :
60+ to a route definition. Then, after creating your project :
5961
6062#. Don't edit any of the default Symfony configuration options.
6163#. Don't copy your original application code and don't use the same structure
62- of bundles, controllers, actions, etc. as in your original application.
63- #. Open the default controller class of the AppBundle and add your routing
64- definition using annotations.
64+ of controllers, actions, etc. as in your original application.
65+ #. Create a simple controller and add your routing definition that shows the bug.
6566#. Don't create or modify any other file.
66- #. Execute the ``server:run `` command and browse the previously defined route
67- to see if the bug appears or not.
67+ #. Execute `` composer require server `` and use the ``server:run `` command to browse
68+ to the new route and see if the bug appears or not.
6869#. If you can see the bug, you're done and you can already share the code with us.
6970#. If you can't see the bug, you must keep making small changes. For example, if
7071 your original route was defined using XML, forget about the previous route
71- annotation and define the route using XML instead. Or maybe your application
72- uses bundle inheritance and that's where the real bug is. Then, forget about
73- AppBundle and quickly generate a new AppParentBundle, make AppBundle inherit
74- from it and test if the route is working.
72+ and define the route using XML instead. Or maybe your application
73+ registers some event listeners and that's where the real bug is. In that case,
74+ add an event listener that's similar to your real app to see if you can find
75+ the bug.
76+
77+ In short, the idea is to keep adding small and incremental changes to a new project
78+ until you can reproduce the bug.
7579
76- In short, the idea is to keep adding small and incremental changes to the default
77- Symfony Standard edition until you can reproduce the bug.
80+ .. _`new repository` : https://github.com/new
0 commit comments