You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: