oroinc / platform

Main OroPlatform package with core functionality.
Other
627 stars 351 forks source link

Attempted to call an undefined method named "getMessageParameters" of class "Doctrine\DBAL\Exception\DriverException". #1031

Open mrfroasty opened 4 years ago

mrfroasty commented 4 years ago

Summary
When running importexport and some exception get thrown e.g Doctrine\DBAL\Exception\UniqueConstraintViolationException, class Oro\Bundle\BatchBundle\Step\StepExecutor::handleStepExecutionWarning() will attempt to call getMessageParameters().

Steps to reproduce
Mimic any doctrine exceptions that do not implement method getMessageParameters.

Actual Result Calling methods (getMessageParameters) that do not exist.

Expected Result
Should call method getMessageParameters only if exist

Details about your environment

Additional information
I am not so sure but I think Oro\Bundle\BatchBundle\Step\StepExecutor::handleStepExecutionWarning should check existence of getMessageParameters or only call this on expected class. e.g fixes https://github.com/oroinc/platform/pull/982