This Symfony bundle provides a server implementation for handling single and multiple file uploads using either FineUploader, jQuery File Uploader, YUI3 Uploader, Uploadify, FancyUpload, MooUpload, Plupload or Dropzone. Features include chunked uploads, orphanages, Gaufrette and Flysystem support.
MIT License
603
stars
177
forks
source link
ClearChunkCommand and ClearOrphansCommand changes to remove deprecations in Symfony 6.1 #430
Hi,
Would it be possible to change $defaultName property usage (overriding) in commands (ClearChunkCommand and ClearOrphansCommand) to attribute? Is this planned for future release?
I've upgraded my project to Symfony 6 and it shows now:
The "Symfony\Component\Console\Command\Command::$defaultName" property is considered final. You should not override it in "Oneup\UploaderBundle\Command\ClearChunkCommand".
The "Symfony\Component\Console\Command\Command::$defaultName" property is considered final. You should not override it in "Oneup\UploaderBundle\Command\ClearOrphansCommand".
Eg. in src/Command/ClearChunkCOmmand.php
+use Symfony\Component\Console\Attribute\AsCommand;
+#[AsCommand(name: 'oneup:uploader:clear-chunks', description: 'Clear chunks according to the max-age you defined in your configuration.')]
class ClearChunkCommand extends Command
{
- protected static $defaultName = 'oneup:uploader:clear-chunks'; // Make command lazy load
/**
* @var ChunkManager
*/
private $manager;
public function __construct(ChunkManager $manager)
{
$this->manager = $manager;
parent::__construct();
}
- protected function configure(): void
- {
- $this
- ->setDescription('Clear chunks according to the max-age you defined in your configuration.')
- ;
- }
How to reproduce:
Compile project using OneupUploaderBundle in Symfony 6.1.3
|-------- | ------
| Version | 4.0.1
|Symfony|6.1.3
Hi, Would it be possible to change $defaultName property usage (overriding) in commands (ClearChunkCommand and ClearOrphansCommand) to attribute? Is this planned for future release? I've upgraded my project to Symfony 6 and it shows now: The "Symfony\Component\Console\Command\Command::$defaultName" property is considered final. You should not override it in "Oneup\UploaderBundle\Command\ClearChunkCommand". The "Symfony\Component\Console\Command\Command::$defaultName" property is considered final. You should not override it in "Oneup\UploaderBundle\Command\ClearOrphansCommand".
Eg. in src/Command/ClearChunkCOmmand.php
How to reproduce: Compile project using OneupUploaderBundle in Symfony 6.1.3
|-------- | ------ | Version | 4.0.1 |Symfony|6.1.3