Doctrine 2 entities : are they supposed to contain logic?
The doctrine website is down, so I'm looking for information here :
What are supposed to contain Doctrine 2 entities :

only properties and getters and setters
properties, getters/setters and domain logic

Thanks

Some domain logic is fine, if it applies to an entity itself.  For instance, the following stuff is fine:
class myEntity {
  // ...

  /**
   * @OneToMany(targetEntity="LineItem")
   */ 
  protected $items;

  public function equals($otherEntity){
     //compare $this->lineItems and $otherEntity->lineItems, and return true if
     //they are identical      
  }

  /**
   * More business logic internal to an entity.
   */
  public function subtotal(){
    $total = 0;
    foreach($this->items as $i) $total += $i;
    return $i;
  }
}

What you don't want in entites are things with side-effects outside of that entity (or entities it owns), data-persistence (entities should never know about the EntityManager, or Repositories, etc).
My rule of thumb is to almost always avoid having my Entities have any dependencies (other than related Entity classes).  If all of a sudden I need something complicated, I know it's time to migrate the logic out of the entity into a service class.  

Great answer thank you, but can you explain what do you mean by "side-effects outside of that entity" ? Thanks

What I mean is basically anything not provided by the entity itself, or by other entities to which the entity is related.  Contrast the examples of "inside" stuff with things like sending an email.  Entities are really just glorified variables.  They might do some logic, but that logic should only be related to either manipulating the entity's values (in a basic way, for example: any validation that requires database queries should be externalized. Simple regex validation would be okay), or reporting on the entity's values (the equals() subtotal() examples).

Great explanation, @timdev! I like the rule you described in the second part. Thx

Entity are supposed to contain business logic. That is, the logic should only related to the entity itself, and relating entities. As @timdev already said, entities should be 100% persistence agnostic. The should never use the EntityManager, Repositories or Services; only other entities.
You might like to look at a similar question I've already asked.
