Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit c04479e

Browse files
committed
the annotations are now autoloaded
1 parent 627ec9a commit c04479e

File tree

4 files changed

+5
-28
lines changed

4 files changed

+5
-28
lines changed

bundles/phpcr_odm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ correct.
525525
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
526526
http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
527527
528-
<class name="Symfony\Cmf\Bundle\RoutingBundle\Document\Route">
528+
<class name="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route">
529529
<constraint name="Doctrine\Bundle\PHPCRBundle\Validator\Constraints\ValidPhpcrOdm" />
530530
</class>
531531

cookbook/create_new_project_phpcr_odm.rst

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,7 @@ content repository.
6262
}
6363
}
6464

65-
**Step 5**: (*optional*) Register the PHPCR-ODM annotations in ``app/autoload.php``::
66-
67-
// app/autoload.php
68-
69-
// ...
70-
AnnotationRegistry::registerFile(
71-
__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php'
72-
);
73-
74-
**Step 6**: Modify ``parameters.yml.dist``, adding the required PHPCR-ODM settings:
65+
**Step 5**: Modify ``parameters.yml.dist``, adding the required PHPCR-ODM settings:
7566

7667
.. code-block:: yaml
7768
@@ -83,15 +74,15 @@ content repository.
8374
connection: default
8475
phpcr_workspace: default
8576
phpcr_user: admin
86-
phpcr_pass: admin
77+
phpcr_pass: admin
8778
8879
.. note::
8980

9081
You are modififying ``parameters.yml.dist`` and not ``paramaters.yml``.
9182
This is because the Standard Edition will use this file as a template when
9283
updating the configuration.
9384

94-
**Step 7**: Add the Doctrine PHPCR configuration to the main application configuration:
85+
**Step 6**: Add the Doctrine PHPCR configuration to the main application configuration:
9586

9687
.. configuration-block::
9788

@@ -142,7 +133,7 @@ content repository.
142133
),
143134
));
144135
145-
**Step 8**: Run ``composer update``:
136+
**Step 7**: Run ``composer update``:
146137

147138
.. code-block:: bash
148139

cookbook/editions/cmf_core.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ If you haven't done so already, make sure you have followed these steps from
9999

100100
* Initialize ``DoctrinePHPCRBundle`` in ``app/AppKernel.php``
101101
* Ensure there is a ``doctrine_phpcr:`` section in ``app/config/config.yml``
102-
* Add the ``AnnotationRegistry::registerFile`` line to ``app/autoload.php``
103102

104103
Configure the BlockBundle in your ``config.yml``:
105104

cookbook/installing_configuring_doctrine_phpcr_odm.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,6 @@ To install the above dependencies, run:
132132
133133
$ php composer.phar update
134134
135-
Register Annotations
136-
~~~~~~~~~~~~~~~~~~~~
137-
138-
PHPCR-ODM uses annotations and these need to be registered in your
139-
``app/autoload.php`` file. Add the following line, immediately after the last
140-
``AnnotationRegistry::registerFile`` line::
141-
142-
// app/autoload.php
143-
144-
// ...
145-
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');
146-
// ...
147-
148135
Initialize Bundles
149136
~~~~~~~~~~~~~~~~~~
150137

0 commit comments

Comments
 (0)