Skip to content

Update some examples using 3.3 features #7877

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

Merged
merged 1 commit into from
May 21, 2017
Merged

Conversation

GuilhemN
Copy link
Contributor

@GuilhemN GuilhemN commented May 5, 2017

I updated some examples using 3.3 di features, but there is still a lot to do.


# add Service/ to the list of directories to load services from
AppBundle\:
resource: '../../src/AppBundle/{Service,Updates,Command,Form,EventSubscriber,Twig,Security}'
Copy link
Member

Choose a reason for hiding this comment

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

the Updates namespace looks wrong to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, good catch!

services:
app.form.type.gender:
class: AppBundle\Form\Type\GenderType
AppBundle\Form\Type\GenderType:
arguments:
- '%genders%'
tags: [form.type]
Copy link
Member

Choose a reason for hiding this comment

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

What about using autoconfigure instead?

Copy link
Member

Choose a reason for hiding this comment

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

same in other places

Copy link
Contributor Author

@GuilhemN GuilhemN May 12, 2017

Choose a reason for hiding this comment

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

In fact, imo we should assert that the user has the default SE config and remove config blocks when they're useless. We could just add a note to explain how to declare services manually once for each feature.
Wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

@GuilhemN
Copy link
Contributor Author

I think I'll split this PR in smaller PRs like #7902 because it's much longer to respect #7877 (comment).

@weaverryan
Copy link
Member

I updated some examples using 3.3 di features, but there is still a lot to do.

@GuilhemN In fact, I apologize, because I'm completely running over your work :/. There are just so many entries to update, that I've been keeping a list locally and running through them (and making GIANT PRs). That's not idea, but I don't think we'll be able to update everything in time without doing that. However, that does mean that those PR's need review (and also, possible some of the most important docs could/should be proofread afterwards ).

However, you do have a few entires I don't. Could you rebase? So far, I'm skipping the following directories and saving for later:

  • best_practices
  • bundles
  • components
  • console
  • create_framework
  • reference

Thanks!

weaverryan added a commit that referenced this pull request May 16, 2017
This PR was merged into the master branch.

Discussion
----------

Update best_practices/templates.rst

First example of a doc asserting we're using the 3.3 SE (#7877 (comment)).

Commits
-------

8769a30 Update best_practices/templates.rst
@GuilhemN
Copy link
Contributor Author

@GuilhemN In fact, I apologize, because I'm completely running over your work :/. There are just so many entries to update, that I've been keeping a list locally and running through them (and making GIANT PRs).

No problem, this PR didn't take me long to do :)

Could you rebase?

done ;)

Do you still need help for the remaining parts?

<services>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd">
Copy link
Member

Choose a reason for hiding this comment

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

this change should probably also be made on older branches

Copy link
Contributor Author

@GuilhemN GuilhemN May 17, 2017

Choose a reason for hiding this comment

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

done in #7915, I also found many others...

@@ -886,8 +862,7 @@ of your configuration and tag it with ``routing.loader``:
.. code-block:: yaml

services:
app.custom_routing_loader:
class: AppBundle\Routing\CustomLoader
AppBundle\Routing\CustomLoader:
tags: [routing.loader]
Copy link
Member

Choose a reason for hiding this comment

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

could be merged with the previous line

@@ -763,8 +745,7 @@ You can add a processor globally:
.. code-block:: yaml

services:
my_service:
class: Monolog\Processor\IntrospectionProcessor
Monolog\Processor\IntrospectionProcessor:
tags: [monolog.processor]
Copy link
Member

Choose a reason for hiding this comment

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

could be merged with the previous line

@@ -636,8 +627,7 @@ configuration and tag it with ``kernel.event_subscriber``:
.. code-block:: yaml

services:
app.custom_subscriber:
class: AppBundle\EventListener\CustomSubscriber
AppBundle\EventListener\CustomSubscriber:
tags: [kernel.event_subscriber]
Copy link
Member

Choose a reason for hiding this comment

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

could be merged with the previous line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, done

@xabbuh
Copy link
Member

xabbuh commented May 19, 2017

@GuilhemN Can you resolve the conflicts? :)

@GuilhemN GuilhemN changed the base branch from master to 3.3 May 19, 2017 15:55
@GuilhemN
Copy link
Contributor Author

@xabbuh done

@weaverryan
Copy link
Member

Thanks @GuilhemN!

@weaverryan weaverryan merged commit 04903f7 into symfony:3.3 May 21, 2017
weaverryan added a commit that referenced this pull request May 21, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

Update some examples using 3.3 features

I updated some examples using 3.3 di features, but there is still a lot to do.

Commits
-------

04903f7 Update some examples using 3.3 features
@GuilhemN GuilhemN deleted the DI branch May 21, 2017 15:50
GuilhemN added a commit to GuilhemN/symfony-docs that referenced this pull request Jun 8, 2017
xabbuh added a commit that referenced this pull request Jun 9, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

Revert a wrong change from #7877

As spotted by #7978, the short service syntax is about arguments and not tags, so this change was wrong.

Commits
-------

f3b1112 Revert a wrong change from #7877
weaverryan added a commit that referenced this pull request Jun 12, 2017
* 3.4:
  Encore docs
  Fixed typo
  Revert a wrong change from #7877
  Remove note about --force option on server:start
  Small grammatical improvement
  [DependencyInjection] fix some minor typos
  remove remaining LdapClient usages
  add missing XML and PHP config examples
  explain how to properly override choices
  Fix custom router loader service declaration
michaelperrin pushed a commit to michaelperrin/symfony-docs that referenced this pull request Nov 18, 2017
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.

4 participants