Skip to content

Commit 61ef125

Browse files
committed
B2B-1701: Deprecate database media storage function
- Test to verify trigger errors on class deprecation
1 parent 132ef2d commit 61ef125

File tree

1 file changed

+2
-0
lines changed
  • app/code/Magento/MediaStorage/Helper/File/Storage

1 file changed

+2
-0
lines changed

app/code/Magento/MediaStorage/Helper/File/Storage/Database.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public function getResourceStorageModel()
143143
public function saveFile($filename)
144144
{
145145
if ($this->checkDbUsage()) {
146+
trigger_error('Database media storage function is deprecated', E_USER_DEPRECATED);
146147
$this->getStorageDatabaseModel()->saveFile($this->_removeAbsPathFromFileName($filename));
147148
}
148149
}
@@ -174,6 +175,7 @@ public function renameFile($oldName, $newName)
174175
public function copyFile($oldName, $newName)
175176
{
176177
if ($this->checkDbUsage()) {
178+
trigger_error('Database media storage function is deprecated', E_USER_DEPRECATED);
177179
$this->getStorageDatabaseModel()->copyFile(
178180
$this->_removeAbsPathFromFileName($oldName),
179181
$this->_removeAbsPathFromFileName($newName)

0 commit comments

Comments
 (0)