Page MenuHomeIn-Portal Phabricator

INP-1891 - Display PHP errors in the Phing build log
AcceptedPublic

Authored by alex on Dec 20 2024, 2:56 PM.

Details

Reviewers
erik
Test Plan

Part 1

  • in IDE:
    1. open core/units/users/users_event_handler.php file for editing
    2. in the \UsersEventHandler::OnAfterConfigRead after parent::OnAfterConfigRead($event); line add throw new RuntimeException('Sample exception'); code
    3. save changes
  • in CLI:
    1. run the phing -f tools/build/build_all.xml db-dump command (replace phing with php74 ~which phing~ (replace ~ with backticks), when using non-default PHP version
    2. run the phing -f tools/build/build_all.xml build command (replace phing with php74 ~which phing~ (replace ~ with backticks), when using non-default PHP version
    3. confirm, that In-Portal (full) > inportal-deploy build target will fail and display thrown exception details

Part 2

  • in IDE:
    1. open core/units/users/users_event_handler.php file for editing
    2. in the \UsersEventHandler::OnAfterConfigRead after parent::OnAfterConfigRead($event); line replace the throw new RuntimeException('Sample exception'); code with trigger_error('Sample fatal error', E_USER_ERROR); code
    3. save changes
  • in CLI:
    1. run the phing -f tools/build/build_all.xml db-dump command (replace phing with php74 ~which phing~ (replace ~ with backticks), when using non-default PHP version
    2. run the phing -f tools/build/build_all.xml build command (replace phing with php74 ~which phing~ (replace ~ with backticks), when using non-default PHP version
    3. confirm, that In-Portal (full) > inportal-deploy build target will fail and display triggered error details

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1353
Build 1353: arc lint + arc unit

Event Timeline

alex created this revision.Dec 20 2024, 2:56 PM
alex requested review of this revision.Dec 20 2024, 2:56 PM
alex updated this revision to Diff 1301.Dec 20 2024, 2:59 PM

Removed debug code from test plan execution attempt.

alex updated this revision to Diff 1302.Dec 21 2024, 8:56 AM

Corrected phrasing.

alex edited the test plan for this revision. (Show Details)Dec 21 2024, 8:59 AM
alex edited the test plan for this revision. (Show Details)Dec 21 2024, 9:02 AM
alex edited the test plan for this revision. (Show Details)Mon, Dec 23, 6:01 AM
erik accepted this revision.Mon, Dec 23, 6:04 AM
This revision is now accepted and ready to land.Mon, Dec 23, 6:04 AM