Comments (9)
hi, are there any docs on syntax changes, behavior or something? I would not like to create another branch :)
from doctrineextensions.
The issue is that the way to configure the reader changed. As you configure it inside the library instead of injecting it, the place where you register it needs to be changed. For instance, there is no changes in the ORM itself as the configuration of the driver is not done in the ORM but before injecting the driver (so the change is in the ORM config for each user).
And then, the change is needed in the classes where annotations are used but this is for each user when updating.
from doctrineextensions.
I haven't used this library, but it would be good if you would allow people to inject the annotation reader that they want to use to benefit from caching and not having annotations read multiple times by different readers.
from doctrineextensions.
I see that new reader breaks BC for ORM since Doctrine\ORM\Configuration::newDefaultAnnotationDriver()
will fail to initialize by calling unidentified method: setDefaultAnnotationNamespace is everyone OK with that? I understand that symfony2 does not use this method to create driver chain and so on, but it leaves a hole since ORM provides this method.
Is it possible to add namespace alias, like before, if yes, how can I do it?
from doctrineextensions.
You don't add namespace aliases. The annotations depends of the use statement. This is the way to do to keep the annotations separated from others:
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
from doctrineextensions.
And with the new implementation, you don't need to add a new annotation reader. You can simply reuse the same. And this is another reason why allowing to inject the reader would be a good idea: Sf2 now uses a single annotation reader for all parts of the framework, so annotations are parsed only once and then cached and used by all services needing them.
from doctrineextensions.
@schmittjoh have you tested it? I'm trying a simple reading of annotations and $reader->getClassAnnotations($class);
returns numerically indexed array of annotations found. The problem is ORM depends on class name as a key of each array element. Am I missing something? using ORM from master branch and common3.0.x branch..
from doctrineextensions.
If you rely on indexes you need to use the "IndexedReader" which is in the
DoctrineBundle.
On Sun, May 22, 2011 at 6:14 PM, l3pp4rd <
[email protected]>wrote:
@schmittjoh have you tested it? I'm trying a simple reading of annotations
and$reader->getClassAnnotations($class);
returns numerically indexed
array of annotations found. The problem is ORM depends on class name as a
key of each array element. Am I missing something? using ORM from master
branch and common3.0.x branch..Reply to this email directly or view it on GitHub:
https://github.com/l3pp4rd/DoctrineExtensions/issues/54#comment_1217682
from doctrineextensions.
@stof I have currently made annotation reader injectable to the listener, can you test if it is compatible? since the namespace alias will not be available anymore, the documentation should be also available for symfony2 usage
from doctrineextensions.
Related Issues (20)
- SoftDeleteable is ignored and delete records hardly HOT 3
- [Loggable] Incomplete documentation on how to use custom LogEntry entity HOT 1
- Timestampable (and maybe more extensions) don't work with DBAL 4.0.0-RC2 HOT 6
- Semantical Error WITH Doctrine ORM 3.0 HOT 2
- [Tree & Doctrine 3] Fatal Compile Error: Declaration of Gedmo\Tree\Entity\Repository\NestedTreeRepository::__call($method, $args) ... HOT 2
- string $targetTableAlias HOT 2
- in Symfony 7 annotation_reader no exists
- [Loggable] Add option to store prev data
- The bundle not set automatcly the value to updated_at and created_at columns when persisting data HOT 5
- Missing Reference Listener in the documentation
- [Tree] [materializedPath] Deleting parent removes children when onDelete="restrict" HOT 2
- Cannot get DoctrineExtensions to work with Symfony 7 HOT 2
- The service "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader". HOT 2
- Table ext_log_entries very very slow on queries HOT 7
- Timestampable issue mapping expects array HOT 2
- LogEntryInterface::getObjectClass() @phpstan-return is missing null HOT 2
- [Tree] Missing path value on insert a new document HOT 1
- Error for symfony v7 HOT 5
- A [SoftDeleteable] cycle has been detected, so a topological sort is not possible. The getCycle() method provides the list of nodes that form the cycle.
- Timestamble error getRawDateValue HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrineextensions.