The Doctrine Project is a collection of open source libraries and tools for dealing with database abstraction and Object-Relational Mapping written in PHP.

learn more… | top users | synonyms

4
votes
1answer
39 views

Ugly code unit testing with PHPUnit and Doctrine2 (an ORM)

I am trying to unit test a small class that I consider part of the "business-logic" layer of my project. It mostly just interact's with Doctrine's entity manager and a couple of entities with a ...
5
votes
0answers
67 views

Filtering queries based on the current user state

I have a Symfony2 project. I have an Entity Asset which can have relations with Category. I store a ...
0
votes
0answers
84 views

Zend Framework and Doctrine 2 - are my unit tests sufficient?

I'm quite new to Zend and unit testing in general. I have come up with a small application that uses Zend Framework 2 and Doctrine. It has only one model and controller and I want to run some unit ...
1
vote
1answer
2k views

Advice on Zend Framework 2 and Doctrine

I've just started looking at Zend Framework 2 and Doctrine ORM, with a view to possibly using it in one of my future products. So far I have a very simple application which allows the user to select ...
0
votes
1answer
123 views

Database “design” using Symfony2 and Doctrine2

I'm working on an application, which tracks expenses. I have users, and each user can create his categories for the expenses (like Food, Bills, Transport, Drinks, Clothes) and then create expenses - ...
2
votes
1answer
87 views

Passing a large amount of diverse information in JSON using Symfony 2.1 and Doctrine 2

For a project I need to give a load of diverseinformation in JSON format. All the information will be used on the same page so a single call would result in the least overhead. The information all ...
1
vote
1answer
77 views

Thoughts on the testability of my use case interactor?

So here is a class that executes the CreateAPerson use case. It takes a request object (which is a simple data structure), validates the request, creates a new ...
7
votes
1answer
2k views

Php/Doctrine array hydration

According to the Doctrine docs, you should use Array hydration rather than record hydration when retrieving data for read-only purposes. Unfortunately, this means I have to use array syntax (as ...
5
votes
2answers
665 views

PHP/Doctrine bootstrap for review

Here's my bootstrap.php for my PHP/MySQL/Doctrine app. It's my first PHP app so I'm interested in learning from the experience of others how this could be improved ...