doctrine/orm-documentation — Issue #71: Fatal Errors in Online Tutorial's Code Samples
Author: AmirBehzad
Created: 2012-01-05 20:50:13+00:00
State: open

Hi,

I was reading Getting Started guide, and following its examples.
There are some issues.

First off, listings of Bug.php in the "A first prototype" section. When I
saw the 2nd listing of Bug.php, i though that it is entirely different
from the 1st listing of the same file. You should include "..." characters
to tell the reader that some lines are "ADDED" into the 2nd listing,
instead of a new version.

Just below the title " "A first prototype", there is a black box which
contains code for Bug.php and Product.php. These two files need
two separate boxes.

Bug.php's listing, lacks the following methods:
setCreated() , setStatus(), setDescription(), and getId()

The following sentence used in Getting Started guide, is not very clear:
Since we haven’t namespaced our three entities, we have to implement three mapping files called Bug.dcm.xml, Product.dcm.xml and User.dcm.xml (or .yml) and put them into a distinct folder for mapping configurations.

It should be changed it:
To namespace our three entities, we may choose one of the following methods:
1) XML-based mapping file (Bug.dcm.xml, Product.dcm.xml and User.dcm.xml)
2) YAML-based files
3) Inline annotations within PHP source code
You can choose any of these methods.

The docmentation may also include a solution for people that are not using PEAR.
Just place the Doctrine directory into your include_path.
Open bin/doctrine.php and add somethnig like:

set_include_path(
realpath(dirname(__FILE__) . '/../')
);