tweaked UPDATE file
This commit is contained in:
parent
cadeb5d254
commit
b93dd7a36b
32
UPDATE.md
32
UPDATE.md
@ -10,21 +10,27 @@ RC3 to RC4
|
|||||||
----------
|
----------
|
||||||
* Annotation classes must be annotated with @Annotation
|
* Annotation classes must be annotated with @Annotation
|
||||||
(see the validator constraints for examples)
|
(see the validator constraints for examples)
|
||||||
* Annotations are not using the PHP autoloading but their own mechanism. This allows much more control
|
|
||||||
about possible failure states. To make your code work you have to add the following lines to your
|
|
||||||
autoload.php:
|
|
||||||
|
|
||||||
AnnotationRegistry::registerLoader(function($class) use ($loader) {
|
* Annotations are not using the PHP autoloading but their own mechanism. This
|
||||||
$loader->loadClass($class);
|
allows much more control about possible failure states. To make your code
|
||||||
return class_exists($class, false);
|
work, add the following lines at the end of your `autoload.php` file:
|
||||||
});
|
|
||||||
AnnotationRegistry::registerFile(
|
|
||||||
__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
|
|
||||||
);
|
|
||||||
|
|
||||||
The `$loader` variable is an instance of the UniversalClassLoader. Additionally you might have to adjust
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||||
the ORM path to the DoctrineAnnotations.php. If you are not using the UniversalClassLoader see the
|
|
||||||
[Doctrine Annotations documentation](http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html)
|
AnnotationRegistry::registerLoader(function($class) use ($loader) {
|
||||||
|
$loader->loadClass($class);
|
||||||
|
return class_exists($class, false);
|
||||||
|
});
|
||||||
|
|
||||||
|
AnnotationRegistry::registerFile(
|
||||||
|
__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
|
||||||
|
);
|
||||||
|
|
||||||
|
The `$loader` variable is an instance of `UniversalClassLoader`.
|
||||||
|
Additionally you might have to adjust the ORM path to the
|
||||||
|
`DoctrineAnnotations.php`. If you are not using the `UniversalClassLoader`
|
||||||
|
see the [Doctrine Annotations
|
||||||
|
documentation](http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html)
|
||||||
for more details on how to register annotations.
|
for more details on how to register annotations.
|
||||||
|
|
||||||
beta5 to RC1
|
beta5 to RC1
|
||||||
|
Reference in New Issue
Block a user