Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Fatal Errors in Online Tutorial's Code Samples #71

Open
amirbehzad opened this issue Jan 5, 2012 · 1 comment
Open

Fatal Errors in Online Tutorial's Code Samples #71

amirbehzad opened this issue Jan 5, 2012 · 1 comment

Comments

@amirbehzad
Copy link
Contributor

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) . '/../')
);

@amirbehzad
Copy link
Contributor Author

User.php's listing also lacks the following code:

use Doctrine\Common\Collections\ArrayCollection;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant