-
Notifications
You must be signed in to change notification settings - Fork 173
Deprecation removal Symfony 4.2 #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good. Can we please merge this? |
Sure, 2.1.2 is just released! Thanks @Wait4Code 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested yet, but I think this pull request has broke oneup:uploader:clear-chunks
and oneup:uploader:clear-orphans
commands
@@ -20,7 +30,6 @@ protected function configure() | |||
|
|||
protected function execute(InputInterface $input, OutputInterface $output) | |||
{ | |||
$manager = $this->getContainer()->get('oneup_uploader.orphanage_manager'); | |||
$manager->clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->manager->clear();
@@ -20,7 +30,6 @@ protected function configure() | |||
|
|||
protected function execute(InputInterface $input, OutputInterface $output) | |||
{ | |||
$manager = $this->getContainer()->get('oneup_uploader.chunk_manager'); | |||
$manager->clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->manager->clear();
/** @var ChunkManager */ | ||
protected $manager; | ||
|
||
public function __construct(ChunkManager $manager, ?string $name = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New argument was introduced. It should be passed to command in Resources/config/uploader.xml
.
/** @var OrphanageManager */ | ||
protected $manager; | ||
|
||
public function __construct(OrphanageManager $manager, ?string $name = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New argument was introduced. It should be passed to command in Resources/config/uploader.xml
.
@bytehead, please take a look |
Oops, I'll recheck! |
Indeed, my pull-request breaks theses 2 commands. My bad. I've done needed changes locally. I can provide a new pull request if needed. |
No worries, I'm just finishing the fix. 🙂 |
2.1.3 should fix it! thanks @neoantox for reporting! |
ContainerAwareCommand is deprecated since Symfony 4.2. I just replaced it by Command service and then use dependency injection in command controller to make use of ChunkManager or OrphanageManager instead of getting it by container get method.
Fix #354