Fatal error: Cannot redeclare class App\Entity\Order\Order (previously declared as local import) in /var/www/app/src/Entity/Order/Order.php on line 18
Stack trace: #0 [internal function]: Symfony\Component\ErrorHandler\DebugClassLoader->loadClass('App\\Entity\\Orde...') #1 /var/www/app/vendor/symfony/config/Resource/ReflectionClassResource.php(104): ReflectionClass->__construct('App\\Entity\\Orde...') #2 /var/www/app/vendor/symfony/config/Resource/ReflectionClassResource.php(50): Symfony\Component\Config\Resource\ReflectionClassResource->computeHash() #3 /var/www/app/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php(44): Symfony\Component\Config\Resource\ReflectionClassResource->isFresh(1781109667) #4 /var/www/app/vendor/symfony/config/ResourceCheckerConfigCache.php(88): Symfony\Component\Config\Resource\SelfCheckingResourceChecker->isFresh(Object(Symfony\Component\Config\Resource\ReflectionClassResource), 1781109667) #5 /var/www/app/vendor/symfony/config/ConfigCache.php(65): Symfony\Component\Config\ResourceCheckerConfigCache->isFresh() #6 /var/www/app/vendor/symfony/http-kernel/Kernel.php(413): Symfony\Component\Config\ConfigCache->isFresh() #7 /var/www/app/vendor/symfony/http-kernel/Kernel.php(751): Symfony\Component\HttpKernel\Kernel->initializeContainer() #8 /var/www/app/vendor/symfony/http-kernel/Kernel.php(170): Symfony\Component\HttpKernel\Kernel->preBoot() #9 /var/www/app/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #10 /var/www/app/vendor/autoload_runtime.php(32): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() #11 /var/www/app/public/index.php(5): require_once('/var/www/app/ve...') #12 {main} Compile Error: Cannot redeclare class App\Entity\Order\Order (previously declared as local import) (500 Internal Server Error)

Symfony Exception

FatalError

HTTP 500 Internal Server Error

Compile Error: Cannot redeclare class App\Entity\Order\Order (previously declared as local import)

Exception

Symfony\Component\ErrorHandler\Error\ FatalError

Show exception properties
Symfony\Component\ErrorHandler\Error\FatalError {#40
  -error: array:5 [
    "type" => 64
    "message" => "Cannot redeclare class App\Entity\Order\Order (previously declared as local import)"
    "file" => "/var/www/app/src/Entity/Order/Order.php"
    "line" => 18
    "trace" => array:12 [
      0 => array:4 [
        "function" => "loadClass"
        "class" => "Symfony\Component\ErrorHandler\DebugClassLoader"
        "type" => "->"
        "args" => array:1 [
          0 => "App\Entity\Order\Order"
        ]
      ]
      1 => array:6 [
        "file" => "/var/www/app/vendor/symfony/config/Resource/ReflectionClassResource.php"
        "line" => 104
        "function" => "__construct"
        "class" => "ReflectionClass"
        "type" => "->"
        "args" => array:1 [
          0 => "App\Entity\Order\Order"
        ]
      ]
      2 => array:6 [
        "file" => "/var/www/app/vendor/symfony/config/Resource/ReflectionClassResource.php"
        "line" => 50
        "function" => "computeHash"
        "class" => "Symfony\Component\Config\Resource\ReflectionClassResource"
        "type" => "->"
        "args" => []
      ]
      3 => array:6 [
        "file" => "/var/www/app/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php"
        "line" => 44
        "function" => "isFresh"
        "class" => "Symfony\Component\Config\Resource\ReflectionClassResource"
        "type" => "->"
        "args" => array:1 [
          0 => 1781109667
        ]
      ]
      4 => array:6 [
        "file" => "/var/www/app/vendor/symfony/config/ResourceCheckerConfigCache.php"
        "line" => 88
        "function" => "isFresh"
        "class" => "Symfony\Component\Config\Resource\SelfCheckingResourceChecker"
        "type" => "->"
        "args" => array:2 [
          0 => Symfony\Component\Config\Resource\ReflectionClassResource {#96
            -files: array:1 [
              "/var/www/app/src/Entity/Order/Order.php" => null
            ]
            -className: "App\Entity\Order\Order"
            -excludedVendors: array:1 [
              0 => "/var/www/app/vendor"
            ]
            -hash: "799072675df5e6d3935a93dc81c864b1"
            -classReflector: ? ReflectionClass
          }
          1 => 1781109667
        ]
      ]
      5 => array:6 [
        "file" => "/var/www/app/vendor/symfony/config/ConfigCache.php"
        "line" => 65
        "function" => "isFresh"
        "class" => "Symfony\Component\Config\ResourceCheckerConfigCache"
        "type" => "->"
        "args" => []
      ]
      6 => array:6 [
        "file" => "/var/www/app/vendor/symfony/http-kernel/Kernel.php"
        "line" => 413
        "function" => "isFresh"
        "class" => "Symfony\Component\Config\ConfigCache"
        "type" => "->"
        "args" => []
      ]
      7 => array:6 [
        "file" => "/var/www/app/vendor/symfony/http-kernel/Kernel.php"
        "line" => 751
        "function" => "initializeContainer"
        "class" => "Symfony\Component\HttpKernel\Kernel"
        "type" => "->"
        "args" => []
      ]
      8 => array:6 [
        "file" => "/var/www/app/vendor/symfony/http-kernel/Kernel.php"
        "line" => 170
        "function" => "preBoot"
        "class" => "Symfony\Component\HttpKernel\Kernel"
        "type" => "->"
        "args" => []
      ]
      9 => array:6 [
        "file" => "/var/www/app/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php"
        "line" => 35
        "function" => "handle"
        "class" => "Symfony\Component\HttpKernel\Kernel"
        "type" => "->"
        "args" => array:1 [
          0 => Symfony\Component\HttpFoundation\Request {#2
            +attributes: Symfony\Component\HttpFoundation\ParameterBag {#16
              #parameters: []
            }
            +request: Symfony\Component\HttpFoundation\InputBag {#5
              #parameters: []
            }
            +query: Symfony\Component\HttpFoundation\InputBag {#11
              #parameters: []
            }
            +server: Symfony\Component\HttpFoundation\ServerBag {#19
              #parameters: array:169 [
                "REDIRECT_UNIQUE_ID" => "aimgXcX1qgtSg7hhpHRZkAAAAAQ"
                "REDIRECT_STATUS" => "200"
                "UNIQUE_ID" => "aimgXcX1qgtSg7hhpHRZkAAAAAQ"
                "HTTP_HOST" => "www.whm.whm.whm.whm.zc2b49i48qtgcnoj.ai.webaps.pl"
                "HTTP_USER_AGENT" => "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
                "HTTP_ACCEPT" => "*/*"
                "HTTP_ACCEPT_ENCODING" => "gzip, br, zstd, deflate"
                "HTTP_X_FORWARDED_FOR" => "188.166.39.155"
                "HTTP_X_FORWARDED_PROTO" => "https"
                "HTTP_X_REAL_IP" => "188.166.39.155"
                "PATH" => "/usr/local/nvm/versions/node/v22.14.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                "SERVER_SIGNATURE" => "<address>Webaps Api Server Server at www.whm.whm.whm.whm.zc2b49i48qtgcnoj.ai.webaps.pl Port 80</address>\n"
                "SERVER_SOFTWARE" => "Webaps Api Server"
                "SERVER_NAME" => "www.whm.whm.whm.whm.zc2b49i48qtgcnoj.ai.webaps.pl"
                "SERVER_ADDR" => "10.5.0.2"
                "SERVER_PORT" => "80"
                "REMOTE_ADDR" => "10.5.0.1"
                "DOCUMENT_ROOT" => "/var/www/app/public"
                "REQUEST_SCHEME" => "http"
                "CONTEXT_PREFIX" => ""
                "CONTEXT_DOCUMENT_ROOT" => "/var/www/app/public"
                "SERVER_ADMIN" => "[no address given]"
                "SCRIPT_FILENAME" => "/var/www/app/public/index.php"
                "REMOTE_PORT" => "45940"
                "REDIRECT_URL" => "/"
                "GATEWAY_INTERFACE" => "CGI/1.1"
                "SERVER_PROTOCOL" => "HTTP/1.1"
                "REQUEST_METHOD" => "GET"
                "QUERY_STRING" => ""
                "REQUEST_URI" => "/"
                "SCRIPT_NAME" => "/index.php"
                "PHP_SELF" => "/index.php"
                "REQUEST_TIME_FLOAT" => 1781112925.6408
                "REQUEST_TIME" => 1781112925
                "APP_RUNTIME_OPTIONS" => array:1 [
                  "project_dir" => "/var/www/app"
                ]
                "APP_RUNTIME" => "Symfony\Component\Runtime\SymfonyRuntime"
                "APP_PROJECT_DIR" => "/var/www/app"
                "SYMFONY_DOTENV_PATH" => "/var/www/app/.env"
                "SOCKET_DEBUG_MODE" => "true"
                "ASSET_WEB_URL" => "https://assets.ai.webaps.pl/website"
                "REDIS_URL" => "redis://haweb_redis:6379"
                "LOCALES" => "en,pl"
                "SOCKET_IO_URL" => "https://socket.ai.webaps.pl"
                "SMSAPI_TEST_MODE" => "0"
                "SOCKET_IO_TOKEN" => "x-sys-user-token"
                "POSTGRES_HOST" => "haweb_postgres"
                "APP_PREFIX_SESSION" => "session"
                "PHONE_REGION_SUPPORT" => "PL"
                "DATABASE_URL" => "postgres://webaps:wx8xjw126@haweb_postgres:5432/app_haweb"
                "ADMIN_SESSION_PWD" => "he5anxfEgdhsnbCXQPOcvpTRDFGHBNhjb678fghJY56GGGfde"
                "APP_USER_SYSTEM" => "user_system"
                "NEXT_DISABLE_HMR" => "1"
                "HOSTNAME" => "81f7b38126ce"
                "PHP_VERSION" => "8.5.7"
                "EMAIL_SYS" => "info@webaps.pl"
                "POSTGRES_PASSWORD" => "wx8xjw126"
                "SMSAPI_CONFIRMATION_SERVERS" => "89.174.81.98,91.185.187.219,213.189.53.211,31.186.83.18,212.91.26.253"
                "APACHE_CONFDIR" => "/etc/apache2"
                "ASSET_WEB_DOC_URL" => "https://assets.ai.webaps.pl/doc"
                "REDIS_HOST" => "haweb_redis"
                "SOLR_TERYT_URL" => "http://10.5.0.9:8983/solr/teryt"
                "APP_API_SYS_URL" => "api.ai.webaps.pl"
                "PHP_INI_DIR" => "/usr/local/etc/php"
                "GPG_KEYS" => "1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4 D95C03BC702BE9515344AE3374E44BC9067701A5"
                "API_BASE_NAME" => "Webaps B2B API"
                "RABBITMQ_CONNECT_BACKOFF_MS_WEBSOCKET_ADMIN" => "500"
                "ADMIN_COOKIE_SETTINGS" => "admin_settings"
                "ADMIN_COOKIE_NAME" => "admin_dash"
                "APP_PREFIX_REQUEST_CHANGE_PASSWORD" => "request-change-password"
                "PHP_LDFLAGS" => "-Wl,-O1 -pie"
                "TWA_CODE_EXPIRED" => "300"
                "ADMIN_PANEL_PORT" => "3001"
                "SMSAPI_CONFIRMATION_URL" => "https://api.ai.webaps.pl/smsapi/confirmation"
                "API_SYS_ACCESS_KEY" => "x-sys-access-token"
                "API_BASE_VERSION" => "1.0.0"
                "PWD" => "/var/www"
                "APP_USER_CLIENT" => "user_client"
                "API_CLIENT_USER_ACCESS_KEY" => "x-client-user-access-token"
                "API_BASE_SERVER" => "API over HTTPS"
                "RABBITMQ_DEFAULT_USER" => "rabbitmq"
                "USER_TOKEN_2WA_EXPIRED" => "300"
                "RABBITMQ_DEFAULT_PASS" => "wx8xjw126"
                "TZ" => "Europe/Warsaw"
                "RABBITMQ_URL" => "amqp://rabbitmq:wx8xjw126@haweb_rabbitmq:5672"
                "RABBITMQ_SERVER" => "haweb_rabbitmq"
                "RABBITMQ_PORT" => "5672"
                "APACHE_LOG_DIR" => "/var/log/apache2"
                "BASIC_USER_NAME" => "webaps"
                "LANG" => "C"
                "ADMIN_PANEL_TITLE" => "Webaps Hybrid Apps"
                "P24_URL_CONFIRMATION" => "https://api.ai.webaps.pl/p24/confirmation"
                "APP_ENV" => "dev"
                "P24_IS_ALIVE" => "0"
                "SMSAPI_TOKEN" => "uCt9rHjaknISN055P8L8diuASRojb4wmc497ifU4"
                "P24_URL_BACK" => "https://api.ai.webaps.pl/p24/back"
                "REDIS_CACHE_I18N" => "cache:i18n"
                "APP_PREFIX_REQUEST_USER_BY_TOKEN" => "request-user-by-token"
                "ASSET_URL" => "https://assets.ai.webaps.pl"
                "APP_DEBUG" => "1"
                "P24_MERCHANT_ID" => "141005"
                "SOCKET_SINGLE_SESSION" => "false"
                "APP_URL" => "https://api.ai.webaps.pl"
                "PHP_SHA256" => "01ba2ed1c2658dacf91bebc8be6a4885f69b811c7993831fc48e26107ab29985"
                "API_SYS_LANG_KEY" => "lang"
                "P24_URL_REFOUND" => "https://api.ai.webaps.pl/p24/refund"
                "APACHE_PID_FILE" => "/var/run/apache2/apache2.pid"
                "USER_SYSTEM_REFRESH_TOKEN_EXPIRED" => "7776000"
                "P24_TIME_LIMIT" => "5"
                "P24_ORDER_KEY" => "1630fdbc"
                "PHPIZE_DEPS" => "autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c"
                "FOOTER_SYS_COPYRIGHT" => "Webaps.pl All rights reserved."
                "REGON_SERVICE_ENV" => "dev"
                "NVM_DIR" => "/usr/local/nvm"
                "MESSENGER_TRANSPORT_DSN" => "amqp://rabbitmq:wx8xjw126@haweb_rabbitmq:5672"
                "P24_CRC" => "fed66de269c1a041"
                "API_REQUEST_CHANGE_PASSWORD_EXPIRED" => "3600"
                "SMSAPI_URL" => "https://api.smsapi.pl"
                "USER_TOKEN_SESSION_EXPIRED" => "900"
                "PHP_URL" => "https://www.php.net/distributions/php-8.5.7.tar.xz"
                "ASSET_PATH" => "/var/www/assets/website"
                "APACHE_RUN_GROUP" => "www-data"
                "RABBITMQ_EXCHANGE_WEBSOCKET_ADMIN" => "app.websocket_admin"
                "ASSET_PATH_DOC" => "/var/www/assets/doc"
                "POSTGRES_PORT" => "5432"
                "APACHE_LOCK_DIR" => "/var/lock/apache2"
                "RABBITMQ_CONNECT_RETRIES_WEBSOCKET_ADMIN" => "6"
                "APP_NAME" => "app-webaps"
                "SHLVL" => "0"
                "API_TOKEN_KEY" => "0958e82c-3a83-49b4-8e1c-c96b8fcd6886"
                "POSTGRES_USER" => "webaps"
                "USER_SYSTEM_ACCESS_TOKEN_EXPIRED" => "3600"
                "PHP_CFLAGS" => "-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
                "REDIS_CACHE_LANG" => "cache:languages"
                "API_BASE_DESCRIPTION" => "Webaps Enterprise API"
                "BASIC_USER_PASSWORD" => "$2y$13$mZH1ohqhLOUlxFMA39JEROkUl3Gnt9ABTO2BHi0W.lk2CfwfR.AAa"
                "TASK_INTERVAL" => "5"
                "ROLES" => "ROLE_SUPER_ADMIN,ROLE_ADMIN,ROLE_CMS"
                "REDIS_PORT" => "6379"
                "RABBITMQ_EXCHANGE_TYPE_WEBSOCKET_ADMIN" => "x-consistent-hash"
                "APP_FRONT_URL" => "https://admin.ai.webaps.pl"
                "USER_SYSTEM_PASSWORD_RESET_TOKEN_EXPIRED" => "3600"
                "SOCKET_IO_PORT" => "3002"
                "APACHE_RUN_DIR" => "/var/run/apache2"
                "APACHE_ENVVARS" => "/etc/apache2/envvars"
                "NODE_PATH" => "/usr/local/nvm/versions/node/v22.14.0/bin"
                "SOLR_USER" => "solr"
                "RABBITMQ_QUEUE_WEBSOCKET_ADMIN" => "app.websocket_admin_1"
                "SOLR_PASSWORD" => "wx8xjw126"
                "LOCAL_MACHINE" => "1"
                "DEFAULT_URI" => "https://api.ai.webaps.pl"
                "APACHE_RUN_USER" => "www-data"
                "RABBITMQ_EXCHANGE_DURABLE_WEBSOCKET_ADMIN" => "true"
                "FF_USER_MUST_CHANGE_PASSWORD" => "0"
                "MAILER_DSN" => "smtp://1.webaps.smtp:wx8xjw126WX@smtp.emaillabs.net.pl:587"
                "REGON_API_KEY" => "abcde12345abcde12345"
                "SUPERVISOR_MEMORY_LIMIT" => "512"
                "SMSAPI_SENDER_NAME" => "Webaps"
                "P24_REPORTS_KEY" => "88a01ab25653caecf8eb864318db700e"
                "RABBITMQ_QUEUE_DURABLE_WEBSOCKET_ADMIN" => "true"
                "APP_PREFIX_2WA_CODE" => "2wa-code"
                "RABBITMQ_POLL_INTERVAL_MS_WEBSOCKET_ADMIN" => "1000"
                "NODE_VERSION" => "v22.14.0"
                "POSTGRES_DB" => "app_haweb"
                "API_TOKEN_KEY_IV" => "274652374587643209753212"
                "PHP_ASC_URL" => "https://www.php.net/distributions/php-8.5.7.tar.xz.asc"
                "SOCKET_IO_CONFIG_DOMAIN" => "*"
                "API_SYS_USER_ACCESS_KEY" => "x-sys-user-access-token"
                "PHP_CPPFLAGS" => "-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
                "APP_SECRET" => "ad82415251b16f3263233312942dd501"
              ]
            }
            +files: Symfony\Component\HttpFoundation\FileBag {#18
              #parameters: []
            }
            +cookies: Symfony\Component\HttpFoundation\InputBag {#17
              #parameters: []
            }
            +headers: Symfony\Component\HttpFoundation\HeaderBag {#20
              #headers: array:7 [
                "host" => array:1 [
                  0 => "www.whm.whm.whm.whm.zc2b49i48qtgcnoj.ai.webaps.pl"
                ]
                "user-agent" => array:1 [
                  0 => "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
                ]
                "accept" => array:1 [
                  0 => "*/*"
                ]
                "accept-encoding" => array:1 [
                  0 => "gzip, br, zstd, deflate"
                ]
                "x-forwarded-for" => array:1 [
                  0 => "188.166.39.155"
                ]
                "x-forwarded-proto" => array:1 [
                  0 => "https"
                ]
                "x-real-ip" => array:1 [
                  0 => "188.166.39.155"
                ]
              ]
              #cacheControl: []
            }
            #content: null
            #languages: null
            #charsets: null
            #encodings: null
            #acceptableContentTypes: null
            #pathInfo: null
            #requestUri: null
            #baseUrl: null
            #basePath: null
            #method: null
            #format: null
            #session: null
            #locale: null
            #defaultLocale: "en"
            -preferredFormat: null
            -isHostValid: true
            -isForwardedValid: true
            -isSafeContentPreferred: ? bool
            -trustedValuesCache: []
            -isIisRewrite: false
            pathInfo: "/"
            requestUri: "/"
            baseUrl: ""
            basePath: ""
            method: "GET"
            format: "html"
          }
        ]
      ]
      10 => array:6 [
        "file" => "/var/www/app/vendor/autoload_runtime.php"
        "line" => 32
        "function" => "run"
        "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner"
        "type" => "->"
        "args" => []
      ]
      11 => array:4 [
        "file" => "/var/www/app/public/index.php"
        "line" => 5
        "args" => array:1 [
          0 => "/var/www/app/vendor/autoload_runtime.php"
        ]
        "function" => "require_once"
      ]
    ]
  ]
}
  1. use Gedmo\Timestampable\Traits\TimestampableEntity;
  2. #[ORM\Entity(repositoryClass: OrderRepository::class)]
  3. #[ORM\Table(name: 'orders', schema: 'orders')]
  4. #[Gedmo\Loggable(logEntryClass: LogEntryData::class)]
  5. class Order implements Loggable
  6. {
  7. use TimestampableEntity;
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column]

Stack Trace

FatalError
Symfony\Component\ErrorHandler\Error\FatalError:
Compile Error: Cannot redeclare class App\Entity\Order\Order (previously declared as local import)

  at /var/www/app/src/Entity/Order/Order.php:18