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

Fatal Errors in Online Tutorial's Code Samples #71

@amirbehzad

Description

@amirbehzad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions