瀏覽代碼

deprecate File::path property

Olivier Massot 5 月之前
父節點
當前提交
4546aed753
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      src/Entity/Core/File.php

+ 6 - 4
src/Entity/Core/File.php

@@ -312,16 +312,18 @@ class File
         return $this;
     }
 
+    /**
+     * @deprecated
+     * @return string|null
+     */
     public function getPath(): ?string
     {
-        return $this->path;
+        return $this->slug;
     }
 
     public function setPath(?string $path): self
     {
-        $this->path = $path;
-
-        return $this;
+        throw new \Exception('Deprecated : use setSlug instead');
     }
 
     public function getName(): string