Updating composer deps and removing unnecessary nested if condition in IoC class.