Skip to content

Changing description of symfony installation to composer #1993

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 2 commits into from
Dec 16, 2012
Merged

Changing description of symfony installation to composer #1993

merged 2 commits into from
Dec 16, 2012

Conversation

Sgoettschkes
Copy link
Contributor

As described in #1951, the docs should show how to use composer to install symfony.

I added no link to resources on how to install composer, mostly because the symfony docs are not very clear on how to download/install composer and how it works.

So the question is if there should be a link to composer, a link to How to Install and Use the Symfony2 Components or a complete install description.

@stof
Copy link
Member

stof commented Nov 30, 2012

IMO, you should link to the composer doc

@Sgoettschkes
Copy link
Contributor Author

I also tend to add a link to composer. Of course it distracts the user because he needs to read a bit more, but learning composer is essential in my eyes. And the docs don't need to be changed if composer changes his installation method or anything.

On the other hand, adding two more commands (to download and execute composer) would not harm the docs much. But if installation of composer changes, the docs also have to change. So there are pros and cons to this as well.

Next, create an ``app/bootstrap.php`` file. Use it to ``require`` the two
files in the application and to configure the autoloader:
In your root directory, create a ``composer.json`` file with the following
content:
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 like this method, the recommend way to start a symfony project is:

$ php composer.phar create-project symfony/framework-standard-edition 2.1.x path/to/project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was under the impression that in this part of the docs, only the symfony core is used, not the full-stack framework?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, that's right - we're actually only need a few specific components, but of course we're not teaching Composer or those finer details, so I like how you've bright in symfony/symfony via Composer.

@weaverryan
Copy link
Member

Hi Sebastian!

I just left you some comments, but this is really really great - nice work! I'll merge in after the few tweaks.

Thanks!

weaverryan added a commit that referenced this pull request Dec 16, 2012
Changing description of symfony installation to composer
@weaverryan weaverryan merged commit 8b3f102 into symfony:2.1 Dec 16, 2012
@weaverryan
Copy link
Member

Awesome Sebastian! Thanks so much for this, merged - looks really great!

weaverryan added a commit that referenced this pull request Dec 16, 2012
@@ -460,7 +462,7 @@ the HTTP response being returned. Use them to improve the blog:

<?php
// index.php
require_once 'app/bootstrap.php';
require_once 'vendor/bootstrap.php';
Copy link

Choose a reason for hiding this comment

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

Just starting w/symfony. Right now at this part in the book. Got set with composer as shown. No vendor/bootstrap.php was created, only vendor/autoload.php. I made a bootstrap from https://github.com/ruian/RuianSeoBundle/blob/master/vendor/bootstrap.php

Copy link
Member

Choose a reason for hiding this comment

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

@rpmsk you are right, there is no vendor/bootstrap.php, we mean vendor/autoload.php here. I submited a fix for this: #2157

BTW: You shouldn't use the examples here if you are going to use the full Symfony framework. This article just shows you what the advantages of this framework are.

Copy link

Choose a reason for hiding this comment

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

Hey, thanks. Your reply means a lot. On first look symfony looks friendly
and powerful but also intimidating and difficult to know how to approach it.
I think I have a feel for what the page at
http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html is
intended for. It's a really good way to explain things - simple and coming
from plain "flat" basic php with no dependant code involved.

On Sat, Jan 19, 2013 at 1:02 AM, Wouter J notifications@github.com wrote:

In book/from_flat_php_to_symfony2.rst:

@@ -460,7 +462,7 @@ the HTTP response being returned. Use them to improve the blog:

 <?php
 // index.php
  • require_once 'app/bootstrap.php';
  • require_once 'vendor/bootstrap.php';

@rpmsk https://github.com/rpmsk you are right, there is no
vendor/bootstrap.php, we mean vendor/autoload.php here. I submited a fix
for this: #2157 #2157

BTW: You shouldn't use the examples here if you are going to use the full
Symfony framework. This article just shows you what the advantages of this
framework are.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1993/files#r2705072.

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.

5 participants