Explorar el Código

deprecate File::path property

Olivier Massot hace 5 meses
padre
commit
4546aed753
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  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