Skip to content

[Issue] Catch php syntax errors (or other errors) in bin/magento and output the error instead of staying silent #32786

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #32145: Catch php syntax errors (or other errors) in bin/magento and output the error instead of staying silent


Description (*)

When a PHP error occurs somewhere in code that is executed by bin/magento it should output that error instead of staying silent

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

I'll update these steps with more concrete things, not much time at the moment to put a lot more info here, will try this weekend if I find more time

  1. Have a module installed in app/code which uses PHP 7.4 specific syntax which doesn't work on PHP 7.3
  2. Run bin/magento using PHP 7.3

Expected

  1. Exit code other then 0
  2. Explanation of the error

Actual

  1. Exit code other then 0 => correct!
  2. Just silence, nothing else, this makes it extremely confusing why the command doesn't seem to do anything

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: ExceptionEvent: Adobe Summit HackathonFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions