Skip to content

Commit 76aa7fa

Browse files
committed
[Composer paths] Updated paths that are now created/managed by composer
1 parent 8a40b5a commit 76aa7fa

File tree

8 files changed

+41
-41
lines changed

8 files changed

+41
-41
lines changed

book/from_flat_php_to_symfony2.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ better software than with flat PHP, you'll see for yourself.
1111
In this chapter, you'll write a simple application in flat PHP, and then
1212
refactor it to be more organized. You'll travel through time, seeing the
1313
decisions behind why web development has evolved over the past several years
14-
to where it is now.
14+
to where it is now.
1515

1616
By the end, you'll see how Symfony2 can rescue you from mundane tasks and
1717
let you take back control of your code.
@@ -132,7 +132,7 @@ to the area of *your* code that processes user input and prepares the response.
132132
In this case, our controller prepares data from the database and then includes
133133
a template to present that data. With the controller isolated, you could
134134
easily change *just* the template file if you needed to render the blog
135-
entries in some other format (e.g. ``list.json.php`` for JSON format).
135+
entries in some other format (e.g. ``list.json.php`` for JSON format).
136136

137137
Isolating the Application (Domain) Logic
138138
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -424,7 +424,7 @@ an autoloader that Symfony provides. An autoloader is a tool that makes it
424424
possible to start using PHP classes without explicitly including the file
425425
containing the class.
426426

427-
First, `download symfony`_ and place it into a ``vendor/symfony/`` directory.
427+
First, `download symfony`_ and place it into a ``vendor/symfony/symfony/`` directory.
428428
Next, create an ``app/bootstrap.php`` file. Use it to ``require`` the two
429429
files in the application and to configure the autoloader:
430430

@@ -434,11 +434,11 @@ files in the application and to configure the autoloader:
434434
// bootstrap.php
435435
require_once 'model.php';
436436
require_once 'controllers.php';
437-
require_once 'vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
437+
require_once 'vendor/symfony/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
438438

439439
$loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
440440
$loader->registerNamespaces(array(
441-
'Symfony' => __DIR__.'/../vendor/symfony/src',
441+
'Symfony' => __DIR__.'/../vendor/symfony/symfony/src',
442442
));
443443

444444
$loader->register();
@@ -564,7 +564,7 @@ them for you. Here's the same sample application, now built in Symfony2:
564564
->getEntityManager()
565565
->getRepository('AcmeBlogBundle:Post')
566566
->find($id);
567-
567+
568568
if (!$post) {
569569
// cause the 404 page not found to be displayed
570570
throw $this->createNotFoundException();
@@ -581,7 +581,7 @@ now quite a bit simpler:
581581

582582
.. code-block:: html+php
583583

584-
<!-- src/Acme/BlogBundle/Resources/views/Blog/list.html.php -->
584+
<!-- src/Acme/BlogBundle/Resources/views/Blog/list.html.php -->
585585
<?php $view->extend('::layout.html.php') ?>
586586

587587
<?php $view['slots']->set('title', 'List of Posts') ?>

book/performance.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To use this class loader, simply adapt your ``autoloader.php`` as follows:
6464
.. code-block:: php
6565
6666
// app/autoload.php
67-
require __DIR__.'/../vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php';
67+
require __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php';
6868
6969
use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
7070

components/class_loader.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ or
7474
:method:`Symfony\\Component\\ClassLoader\\UniversalClassLoader::registerNamespaces`
7575
methods::
7676

77-
$loader->registerNamespace('Symfony', __DIR__.'/vendor/symfony/src');
77+
$loader->registerNamespace('Symfony', __DIR__.'/vendor/symfony/symfony/src');
7878

7979
$loader->registerNamespaces(array(
80-
'Symfony' => __DIR__.'/../vendor/symfony/src',
81-
'Monolog' => __DIR__.'/../vendor/monolog/src',
80+
'Symfony' => __DIR__.'/../vendor/symfony/symfony/src',
81+
'Monolog' => __DIR__.'/../vendor/monolog/monolog/src',
8282
));
8383

8484
$loader->register();
@@ -89,11 +89,11 @@ or
8989
:method:`Symfony\\Component\\ClassLoader\\UniversalClassLoader::registerPrefixes`
9090
methods::
9191

92-
$loader->registerPrefix('Twig_', __DIR__.'/vendor/twig/lib');
92+
$loader->registerPrefix('Twig_', __DIR__.'/vendor/twig/twig/lib');
9393

9494
$loader->registerPrefixes(array(
95-
'Swift_' => __DIR__.'/vendor/swiftmailer/lib/classes',
96-
'Twig_' => __DIR__.'/vendor/twig/lib',
95+
'Swift_' => __DIR__.'/vendor/swiftmailer/swiftmailer/lib/classes',
96+
'Twig_' => __DIR__.'/vendor/twig/twig/lib',
9797
));
9898

9999
$loader->register();
@@ -108,10 +108,10 @@ for in a location list to ease the vendoring of a sub-set of classes for large
108108
projects::
109109

110110
$loader->registerNamespaces(array(
111-
'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib',
112-
'Doctrine\\DBAL\\Migrations' => __DIR__.'/vendor/doctrine-migrations/lib',
113-
'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine-dbal/lib',
114-
'Doctrine' => __DIR__.'/vendor/doctrine/lib',
111+
'Doctrine\\Common' => __DIR__.'/vendor/doctrine/common/lib',
112+
'Doctrine\\DBAL\\Migrations' => __DIR__.'/vendor/doctrine/migrations/lib',
113+
'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine/dbal/lib',
114+
'Doctrine' => __DIR__.'/vendor/doctrine/orm/lib',
115115
));
116116

117117
$loader->register();

cookbook/controller/error_pages.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Symfony uses the following algorithm to determine which template to use:
8686
To see the full list of default error templates, see the
8787
``Resources/views/Exception`` directory of the ``TwigBundle``. In a
8888
standard Symfony2 installation, the ``TwigBundle`` can be found at
89-
``vendor/symfony/src/Symfony/Bundle/TwigBundle``. Often, the easiest way
89+
``vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle``. Often, the easiest way
9090
to customize an error page is to copy it from the ``TwigBundle`` into
9191
``app/Resources/TwigBundle/views/Exception`` and then modify it.
9292

cookbook/debugging.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ below::
4646
// ...
4747

4848
// require_once __DIR__.'/../app/bootstrap.php.cache';
49-
require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
49+
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
5050
require_once __DIR__.'/../app/autoload.php';
5151
require_once __DIR__.'/../app/AppKernel.php';
5252

cookbook/symfony1.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ example::
127127
// ...
128128

129129
The file itself lives at
130-
``vendor/bundle/Sensio/Bundle/FrameworkExtraBundle/SensioFrameworkExtraBundle.php``.
130+
``vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/SensioFrameworkExtraBundle.php``.
131131
As you can see, the location of the file follows the namespace of the class.
132132
Specifically, the namespace, ``Sensio\Bundle\FrameworkExtraBundle``, spells out
133-
the directory that the file should live in
134-
(``vendor/bundle/Sensio/Bundle/FrameworkExtraBundle``). This is because, in the
135-
``app/autoload.php`` file, you'll configure Symfony to look for the ``Sensio``
136-
namespace in the ``vendor/bundle`` directory:
133+
the directory that the file should live in
134+
(``vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/``).
135+
This is because, in the ``app/autoload.php`` file, you'll configure Symfony to
136+
look for the ``Sensio`` namespace in the ``vendor/sension`` directory:
137137

138138
.. code-block:: php
139139
@@ -155,7 +155,7 @@ contains a different class). In order for a class to be autoloaded, you
155155

156156
As mentioned before, for the autoloader to work, it needs to know that the
157157
``Sensio`` namespace lives in the ``vendor/bundles`` directory and that, for
158-
example, the ``Doctrine`` namespace lives in the ``vendor/doctrine/lib/``
158+
example, the ``Doctrine`` namespace lives in the ``vendor/doctrine/orm/lib/``
159159
directory. This mapping is entirely controlled by you via the
160160
``app/autoload.php`` file.
161161

@@ -247,7 +247,7 @@ In Symfony2, the bundles are activated inside the application kernel::
247247
// ...
248248
new Acme\DemoBundle\AcmeDemoBundle(),
249249
);
250-
250+
251251
return $bundles;
252252
}
253253

cookbook/testing/doctrine.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to test Doctrine Repositories
55
=================================
66

77
Unit testing Doctrine repositories in a Symfony project is not a straightforward
8-
task. Indeed, to load a repository you need to load your entities, an entity
8+
task. Indeed, to load a repository you need to load your entities, an entity
99
manager, and some other stuff like a connection.
1010

1111
To test your repository, you have two different options:
@@ -22,7 +22,7 @@ To test your repository, you have two different options:
2222
Unit Testing
2323
------------
2424

25-
As Symfony and Doctrine share the same testing framework, it's quite easy to
25+
As Symfony and Doctrine share the same testing framework, it's quite easy to
2626
implement unit tests in your Symfony project. The ORM comes with its own set
2727
of tools to ease the unit testing and mocking of everything you need, such as
2828
a connection, an entity manager, etc. By using the testing components provided
@@ -41,7 +41,7 @@ First, you need to add the ``Doctrine\Tests`` namespace to your autoloader::
4141
// app/autoload.php
4242
$loader->registerNamespaces(array(
4343
//...
44-
'Doctrine\\Tests' => __DIR__.'/../vendor/doctrine/tests',
44+
'Doctrine\\Tests' => __DIR__.'/../vendor/doctrine/orm/tests',
4545
));
4646

4747
Next, you will need to setup an entity manager in each test so that Doctrine
@@ -70,7 +70,7 @@ and load the entities::
7070
$reader->setEnableParsePhpImports(true);
7171

7272
$metadataDriver = new AnnotationDriver(
73-
$reader,
73+
$reader,
7474
// provide the namespace of the entities you want to tests
7575
'Acme\\ProductBundle\\Entity'
7676
);

quick_tour/the_architecture.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ PHP autoloading can be configured via ``app/autoload.php``::
6565

6666
$loader = new UniversalClassLoader();
6767
$loader->registerNamespaces(array(
68-
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
68+
'Symfony' => array(__DIR__.'/../vendor/symfony/symfony/src', __DIR__.'/../vendor/bundles'),
6969
'Sensio' => __DIR__.'/../vendor/bundles',
70-
'JMS' => __DIR__.'/../vendor/bundles',
71-
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
72-
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
73-
'Doctrine' => __DIR__.'/../vendor/doctrine/lib',
74-
'Monolog' => __DIR__.'/../vendor/monolog/src',
75-
'Assetic' => __DIR__.'/../vendor/assetic/src',
76-
'Metadata' => __DIR__.'/../vendor/metadata/src',
70+
'JMS' => __DIR__.'/../vendor/jms/',
71+
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine/common/lib',
72+
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine/dbal/lib',
73+
'Doctrine' => __DIR__.'/../vendor/doctrine/orm/lib',
74+
'Monolog' => __DIR__.'/../vendor/monolog/monolog/src',
75+
'Assetic' => __DIR__.'/../vendor/kriswallsmith/assetic/src',
76+
'Metadata' => __DIR__.'/../vendor/jms/metadata/src',
7777
));
7878
$loader->registerPrefixes(array(
79-
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
80-
'Twig_' => __DIR__.'/../vendor/twig/lib',
79+
'Twig_Extensions_' => __DIR__.'/../vendor/twig/extensions/lib',
80+
'Twig_' => __DIR__.'/../vendor/twig/twig/lib',
8181
));
8282

8383
// ...

0 commit comments

Comments
 (0)