Skip to content

[Cookbook] How to use components #1899

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

[Cookbook] How to use components #1899

wants to merge 1 commit into from

Conversation

gajdaw
Copy link
Contributor

@gajdaw gajdaw commented Nov 6, 2012

Maybe trival note, but It helps to start exploring components.

Should it go to master branch? I don't know and await some feedback.


.. tip::

If you want to use all the Symfony2 Component, then instead of adding them one by one:
Copy link
Member

Choose a reason for hiding this comment

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

I don't recommend this because it requries not only the components, but the complete Symfony2 core Framework including Twig, the Doctrine-, Monolog-, Propel-, Swiftmailer- and Twig Bridges and the Framework-, Security-, Twig- and WebProfiler Bundles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but all the components are in the same folder. Otherwise they are in separate folders.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, but who cares when using composer ? you don't need to bother about the way stuff are stored in the vendor/ folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stof Ok. You're right.

Nevertheless, I still think, that the best method to write a script that can access any component is to use:

{
    "require": {
        "symfony/symfony": "2.1.*"
    }
}

@wouterj
Copy link
Member

wouterj commented Nov 6, 2012

I don't think this is needed because it is already included in all component pages.

And this should be merged into the 2.0 branch, you maybe need to create a new PR after this is merged to update the 2.1.x versions to 2.0.x for the 2.0 branch.
You don't need to change this, @weaverryan will do this right. You should always base your PR on the 2.0 branch unless you document something that's new in the 2.1 or 2.2 versions of the framework.

Using Finder Component
----------------------

1. Create a new empty folder.
Copy link
Member

Choose a reason for hiding this comment

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

The dot should be a semi colon.

weaverryan added a commit that referenced this pull request Nov 22, 2012
weaverryan added a commit that referenced this pull request Nov 22, 2012
weaverryan added a commit that referenced this pull request Nov 22, 2012
@weaverryan
Copy link
Member

Hey Włodzimierz!

I've patched this into the 2.0 branch at sha: de1e7db. It does contain some information that is generally repeated elsewhere (on the internet), BUT I think it's important to give the reader everything he/she needs to at least get started with a component right in this one spot. So, I think I like it :).

I did move it into the components documentation, as a special standalone document and linked to it from each component.

If anyone sees any issues, please let me know!

Thanks!

@weaverryan weaverryan closed this Nov 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants