# Fehler in Doctrine-Cache

**URL:** https://forum.shopware.com/t/fehler-in-doctrine-cache/62405
**Category:** Sonstiges
**Created:** [16. Oktober 2019 um 08:12 UTC](https://forum.shopware.com/t/fehler-in-doctrine-cache/62405 "2019-10-16T08:12:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wecotec](https://avatars.discourse-cdn.com/v4/letter/w/e47c2d/32.png) [@wecotec](https://forum.shopware.com/u/wecotec)
#### Post date: [16. Oktober 2019 um 08:12 UTC](https://forum.shopware.com/t/fehler-in-doctrine-cache/62405/1 "2019-10-16T08:12:47Z")

</div>

Hallo zusammen,

neuerdings bekomme ich beim Aufruf eines Gutscheines einen 500er-Fehler. Im Logbuch steht

> PHP Parse error: &nbsp;syntax error, unexpected ‚;‘, expecting identifier (T\_STRING) or variable (T\_VARIABLE) or ‚{‘ or ‚$‘ in var/cache/production\_201709190948/doctrine/attributes/Voucher.php on line 107

Wenn ich mir die Datei anschaue dann sind da offenbar PHP-Fehler rein generiert worden (die letzten beiden Funktionen und das doppelte getId() und setId() )

> \<?php 
> 
> namespace Shopware\Models\Attribute; use Shopware\Components\Model\ModelEntity, &nbsp; &nbsp; Doctrine\ORM\Mapping AS ORM, &nbsp; &nbsp; Symfony\Component\Validator\Constraints as Assert, &nbsp; &nbsp; Doctrine\Common\Collections\ArrayCollection; /\*\* &nbsp;\* @ORM\Entity &nbsp;\* @ORM\Table(name="s\_emarketing\_vouchers\_attributes") &nbsp;\*/ class Voucher extends ModelEntity { &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; /\*\* &nbsp; &nbsp; &nbsp;\* @var integer $id &nbsp; &nbsp; &nbsp;\* @ORM\Id &nbsp; &nbsp; &nbsp;\* @ORM\GeneratedValue(strategy="IDENTITY") &nbsp; &nbsp; &nbsp;\* @ORM\Column(name="id", type="integer", nullable=false) &nbsp; &nbsp; &nbsp;\*/ &nbsp; &nbsp; &nbsp;protected $id; &nbsp; &nbsp; /\*\* &nbsp; &nbsp; &nbsp;\* @var integer $Id &nbsp; &nbsp; &nbsp;\* &nbsp; &nbsp; &nbsp;\* @ORM\Column(name="voucherID", type="integer", nullable=true) &nbsp; &nbsp; &nbsp;\*/ &nbsp; &nbsp; &nbsp;protected $Id; &nbsp; &nbsp; public function getId() &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; return $this-\\>id; &nbsp; &nbsp; } &nbsp; &nbsp; public function setId($id) &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; $this-\\>id = $id; &nbsp; &nbsp; &nbsp; &nbsp; return $this; &nbsp; &nbsp; } &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; public function getId() &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; return $this-\\>id; &nbsp; &nbsp; } &nbsp; &nbsp; public function setId($id) &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; $this-\\>id = $id; &nbsp; &nbsp; &nbsp; &nbsp; return $this; &nbsp; &nbsp; } &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; public function get() &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; return $this-\\>; &nbsp; &nbsp; } &nbsp; &nbsp; public function set($) &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; $this-\\> = $; &nbsp; &nbsp; &nbsp; &nbsp; return $this; &nbsp; &nbsp; } &nbsp; &nbsp;&nbsp; }

Hat jemand einen Tip wie man das beheben kann? Es wird Shopware 5.3, PHP 7.0 und mySQL 5.7 verwendet

---

<div class="post-metadata">

### Author: ![wecotec](https://avatars.discourse-cdn.com/v4/letter/w/e47c2d/32.png) [@wecotec](https://forum.shopware.com/u/wecotec)
#### Post date: [16. Oktober 2019 um 09:53 UTC](https://forum.shopware.com/t/fehler-in-doctrine-cache/62405/2 "2019-10-16T09:53:47Z")

</div>

Problem gelöst: Ich habe die Tabelle&nbsp;s\_emarketing\_vouchers\_attributes von einer anderen SW-Installation neu eingespielt und var/cache gelöscht

&nbsp;

Komisch ist, dass der Fehler erst nach einem Serverumzug aufgetaucht ist und obige Tabelle in der alten Installation garnicht vorhanden war und jetzt plötzlich erst aufgetaucht ist.
