Skip to content

Commit

Permalink
deprecate useless classes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-rolland committed Jan 26, 2023
1 parent d02a738 commit ea20f78
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/FileUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/

/**
* @deprecated deprecated since version 8.1, will be dropped in 9.0
*/
class FileUploaderCore
{
protected $allowedExtensions = [];
Expand All @@ -33,6 +37,8 @@ class FileUploaderCore

public function __construct(array $allowedExtensions = [], $sizeLimit = 10485760)
{
@trigger_error('This class is deprecated since 8.1 and will be dropped in 9.0.', E_USER_DEPRECATED);

$allowedExtensions = array_map('strtolower', $allowedExtensions);

$this->allowedExtensions = $allowedExtensions;
Expand Down
9 changes: 9 additions & 0 deletions classes/QqUploadedFileForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/

/**
* @deprecated deprecated since version 8.1, will be dropped in 9.0
*/
class QqUploadedFileFormCore
{
public function __construct()
{
@trigger_error('This class is deprecated since 8.1 and will be dropped in 9.0.', E_USER_DEPRECATED);
}

/**
* Save the file to the specified path.
*
Expand Down
7 changes: 7 additions & 0 deletions classes/QqUploadedFileXhr.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@
*/

/**
* @deprecated deprecated since version 8.1, will be dropped in 9.0
*
* Handle file uploads via XMLHttpRequest.
*/
class QqUploadedFileXhrCore
{
public function __construct()
{
@trigger_error('This class is deprecated since 8.1 and will be dropped in 9.0.', E_USER_DEPRECATED);
}

/**
* Save the file to the specified path.
*
Expand Down

0 comments on commit ea20f78

Please sign in to comment.