1

我正在使用“doctrine/orm”:“2.4. ”和“doctrine/doctrine-orm-module”:“0.8. ”。

请检查下面的json。

      {
       "name": "zendframework/skeleton-application",
       "description": "Skeleton Application for ZF2",
       "license": "BSD-3-Clause",
       "keywords": [
             "framework",
             "zf2"
        ],
        "homepage": "http://framework.zend.com/",
        "require": {
            "php": ">=5.3.0",
            "zendframework/zendframework": "2.3.*",
            "doctrine/doctrine-orm-module": "0.8.*",
            "doctrine/orm": "2.4.*"
        } ,"autoload": {
            "psr-0": {"StripLib\\": "vendor/stripe/lib/"}
        }
  }

我的实体类文件如下。

  <?php

    namespace Application\Entity;

     use Doctrine\ORM\Mapping as ORM;
     use Doctrine\ORM\QueryBuilder;
     use Zend\Crypt\Password\Bcrypt;

     /**
      * User
      *
      * @ORM\Table(name="user")
      * @ORM\Entity
      */
    class User extends Entity {

    public static $table;

    public function __construct() {
         self::$table = $this->getTableName();
    }

整个项目在编码之前运行顺利。

但是当我通过 ZendGuard 工具对整个项目文件进行编码并运行项目时,它给了我如下错误:

    **Class "Application\Entity\User" sub class of "Application\Entity\Entity" is not a valid entity or mapped super class.**
4

0 回答 0