-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Changing description of autoloading to "The composer way" #1996
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
Changes from 5 commits
cc9d618
5986e2b
fc3e6b9
e3a9757
fd7a3f4
2250f60
c2978e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ Use Composer's Class Map Functionality | |
-------------------------------------- | ||
|
||
By default, the Symfony2 standard edition uses Composer's autoloader | ||
in the `autoload.php`_ file. This autoloader is easy to use, as it will | ||
in the `vendor/autoload.php` file. This autoloader is easy to use, as it will | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should keep the existing link here, as it is the link to the place where the SE uses the composer autoloader |
||
automatically find any new classes that you've placed in the registered | ||
directories. | ||
|
||
|
@@ -138,5 +138,4 @@ is no longer a reason to use a bootstrap file. | |
|
||
.. _`byte code caches`: http://en.wikipedia.org/wiki/List_of_PHP_accelerators | ||
.. _`APC`: http://php.net/manual/en/book.apc.php | ||
.. _`autoload.php`: https://github.com/symfony/symfony-standard/blob/master/app/autoload.php | ||
.. _`bootstrap file`: https://github.com/sensio/SensioDistributionBundle/blob/master/Composer/ScriptHandler.php |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,7 @@ Dependencies (optional) | |
|
||
To run the entire test suite, including tests that depend on external | ||
dependencies, Symfony2 needs to be able to autoload them. By default, they are | ||
autoloaded from `vendor/` under the main root directory (see | ||
`autoload.php.dist`). | ||
autoloaded from `vendor/` under the main root directory. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still true (see |
||
The test suite needs the following third-party libraries: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,6 @@ below:: | |
// ... | ||
|
||
// require_once __DIR__.'/../app/bootstrap.php.cache'; | ||
require_once __DIR__.'/../app/autoload.php'; | ||
require_once __DIR__.'/../app/AppKernel.php'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this is wrong. The autoloader won't work if it is not loaded There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure? Neither my projects nor the symfony standard edition loads it from 2.1 on: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because you are loading |
||
|
||
use Symfony\Component\HttpFoundation\Request; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,9 +263,8 @@ great, your user can't actually add any new tags yet. | |
This directive limits recursion to 100 calls which may not be enough for | ||
rendering the form in the template if you render the whole form at | ||
once (e.g ``form_widget(form)``). To fix this you can set this directive | ||
to a higher value (either via a PHP ini file or via :phpfunction:`ini_set`, | ||
for example in ``app/autoload.php``) or render each form field by hand | ||
using ``form_row``. | ||
to a higher value (either via a PHP ini file or via :phpfunction:`ini_set`) | ||
or render each form field by hand using ``form_row``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep this as it is still a place where you can do it. This file still exist in a Symfony project |
||
|
||
.. _cookbook-form-collections-new-prototype: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,7 @@ This class must implement two methods: | |
|
||
Autoloading is handled automatically via `Composer`_, which means that you | ||
can use any PHP classes without doing anything at all! If you need more flexibility, | ||
you can extend the autoloader in the ``app/autoload.php`` file. All dependencies | ||
can use any PHP classes without doing anything at all! All dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep the sentence explaining you can extend the autoloader as it is still true |
||
are stored under the ``vendor/`` directory, but this is just a convention. | ||
You can store them wherever you want, globally on your server or locally | ||
in your projects. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still true (except that
src/autoload.php
doesn't exists, it should beapp/autoload.php
)