Skip to content

Updating Doctrine syntax for getRepository method #7907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Updating Doctrine syntax for getRepository method #7907

wants to merge 1 commit into from

Conversation

meel-io
Copy link
Contributor

@meel-io meel-io commented May 14, 2017

Changed Doctrine methods to use the class constant syntax which is the prefer syntax now.


.. note::

The ``AppBundle:Product`` string is a shortcut you can use anywhere
You can also use ``AppBundle:Product`` syntax. This string is a shortcut you can use anywhere
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this part

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK to leave this little note as a reference of how this was used in the past.

@javiereguiluz
Copy link
Member

Thanks for this contribution ... but I'm afraid this change must be done in 2.7 branch. I agree with @xabbuh's comment here: #7892 (comment)

@meel-io
Copy link
Contributor Author

meel-io commented May 15, 2017

Hi! This is my first contribution so let me know of any mistakes. I'll re-create this PR with 2.7 as base branch. I did that originally so I'll just rollback to the original PR if @weaverryan agrees

@xabbuh xabbuh added this to the 2.7 milestone May 15, 2017
@xabbuh
Copy link
Member

xabbuh commented May 15, 2017

Don't worry. We can easily switch the branch while merging (I just tested if there would be any conflicts).


.. note::

The ``AppBundle:Product`` string is a shortcut you can use anywhere
You can also use ``AppBundle:Product`` syntax. This string is a shortcut you can use anywhere
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK to leave this little note as a reference of how this was used in the past.

@weaverryan
Copy link
Member

I think we need to add a few more use statements. We don't need them everywhere (sometimes you might have 2 or 3 similar code blocks back-to-back, and so having the use on the first one may be enough), but we probably need more. Especially in the doctrine chapter.

Other than that, easy win!

@xabbuh
Copy link
Member

xabbuh commented Jul 7, 2017

Thank you @meel-io.

xabbuh added a commit that referenced this pull request Jul 7, 2017
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #7907).

Discussion
----------

Updating Doctrine syntax for getRepository method

Changed Doctrine methods to use the `class` constant syntax which is the prefer syntax now.

Commits
-------

03224d5 Updating Doctrine syntax for getRepository method
xabbuh added a commit that referenced this pull request Jul 7, 2017
@xabbuh xabbuh closed this Jul 7, 2017
xabbuh added a commit that referenced this pull request Jul 7, 2017
* 2.7:
  [#7907] add some use statements
  Updating Doctrine syntax for getRepository method
  Updating doctrine class use
  [#7909] fix some typos
  Explained the locateResource() method of HttpKernel
  Reworded the note about dump() not being available in prod
  Symfony Installer Instructions for Windows
  Typo
  Fixing a typo in the Final Thoughts section
  Stop recommending the use of "doctrine:generate:entities"
  Added a help note about translating routes
  Use a safer code sample for Twig best practices
  Use the Twig namespaced syntax for all templates
xabbuh added a commit that referenced this pull request Jul 9, 2017
* 2.8:
  [#7907] add some use statements
  Updating Doctrine syntax for getRepository method
  Reworded the tip about property_info and Symfony framework
  remove useless space
  Add information for enable property_info service
  Updating doctrine class use
  [#7909] fix some typos
  Explained the locateResource() method of HttpKernel
  Reworded the note about dump() not being available in prod
  Symfony Installer Instructions for Windows
  Typo
  Fixing a typo in the Final Thoughts section
  Stop recommending the use of "doctrine:generate:entities"
  Added a help note about translating routes
  Use a safer code sample for Twig best practices
  Use the Twig namespaced syntax for all templates
  Updated the screenshot of deprecation messages
xabbuh added a commit that referenced this pull request Jul 9, 2017
* 3.2:
  [#7907] add some use statements
  Updating Doctrine syntax for getRepository method
  Reworded the tip about property_info and Symfony framework
  remove useless space
  Add information for enable property_info service
  Updating doctrine class use
  Fixed the parse() method in the ExpressionLanguage AST examples
  [#7909] fix some typos
  Explained the locateResource() method of HttpKernel
  Reworded the note about dump() not being available in prod
  Symfony Installer Instructions for Windows
  Typo
  Fixing a typo in the Final Thoughts section
  Stop recommending the use of "doctrine:generate:entities"
  Use "null" so the lock is named automatically
  Added a help note about translating routes
  Use a safer code sample for Twig best practices
  Use the Twig namespaced syntax for all templates
  Updated the screenshot of deprecation messages
  Update lockable_trait.rst
xabbuh added a commit that referenced this pull request Jul 9, 2017
* 3.3: (36 commits)
  [#7907] add some use statements
  Updating Doctrine syntax for getRepository method
  Reworded the tip about property_info and Symfony framework
  remove useless space
  Add information for enable property_info service
  Updating doctrine class use
  Fixed the parse() method in the ExpressionLanguage AST examples
  [#7909] fix some typos
  Explained the locateResource() method of HttpKernel
  Reworded the note about dump() not being available in prod
  Symfony Installer Instructions for Windows
  Updated the screenshot of exceptions in dev environment
  Typo
  Fixing a typo in the Final Thoughts section
  Stop recommending the use of "doctrine:generate:entities"
  Use "null" so the lock is named automatically
  incorrect session short description
  Use of Setters and Getters
  Small mistype edits
  Changed text how to get button label
  ...
xabbuh added a commit that referenced this pull request Jul 9, 2017
* 3.4: (23 commits)
  [#7907] add some use statements
  Updating Doctrine syntax for getRepository method
  Reworded the tip about property_info and Symfony framework
  remove useless space
  Add information for enable property_info service
  Updating doctrine class use
  Fixed the parse() method in the ExpressionLanguage AST examples
  [#7909] fix some typos
  Explained the locateResource() method of HttpKernel
  Reworded the note about dump() not being available in prod
  Symfony Installer Instructions for Windows
  Updated the screenshot of exceptions in dev environment
  Typo
  Fixing a typo in the Final Thoughts section
  Stop recommending the use of "doctrine:generate:entities"
  Use "null" so the lock is named automatically
  Added a help note about translating routes
  Use a safer code sample for Twig best practices
  Use the Twig namespaced syntax for all templates
  Updated the screenshot of deprecation messages
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants