Skip to content
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

Deprecation removal Symfony 4.2 #357

Merged
merged 1 commit into from Apr 5, 2019
Merged

Deprecation removal Symfony 4.2 #357

merged 1 commit into from Apr 5, 2019

Conversation

Wait4Code
Copy link

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

@bytehead bytehead assigned bytehead and Wait4Code and unassigned bytehead Apr 3, 2019
@bytehead bytehead self-requested a review April 3, 2019 06:47
@bytehead bytehead added the bug label Apr 3, 2019
@Sander-Toonen
Copy link

Looks good. Can we please merge this?

@bytehead bytehead merged commit f5b496f into 1up-lab:master Apr 5, 2019
@bytehead
Copy link
Member

bytehead commented Apr 5, 2019

Sure, 2.1.2 is just released! Thanks @Wait4Code 👍

Copy link

@neoantox neoantox left a 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();
Copy link

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();
Copy link

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)
Copy link

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)
Copy link

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.

@neoantox
Copy link

neoantox commented Apr 5, 2019

@bytehead, please take a look

@bytehead
Copy link
Member

bytehead commented Apr 5, 2019

Oops, I'll recheck!

@Wait4Code
Copy link
Author

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.

@bytehead
Copy link
Member

bytehead commented Apr 5, 2019

No worries, I'm just finishing the fix. 🙂

bytehead added a commit that referenced this pull request Apr 5, 2019
@bytehead
Copy link
Member

bytehead commented Apr 5, 2019

2.1.3 should fix it! thanks @neoantox for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants