소스 검색

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