Page MenuHomeIn-Portal Phabricator

INP-1885 - Consistently use PHP binary during the Build
ClosedPublic

Authored by alex on Nov 17 2024, 12:52 PM.

Details

Test Plan
  1. in IDE:
    1. (or in CLI) apply the patch from the D495
    2. remove contents of the core/units/helpers/xml_helper.php and core/units/helpers/xml_helper5.php files
  2. in CLI:
    1. run the phing -f tools/build/build_all.xml -verbose build command
    2. confirm, that:
      • the build was successful
      • these commands were executed during look at the output of the above-executed command (the {php_binary} part represents PHP binary; the ... represent irrelevant command parts):
        • [composer] executing {php_binary} /usr/local/bin/composer install --working-dir ... --ansi
        • [exec] Executing command: {php_binary} .../tools/run_event.php adm:OnDeploy b674006f3edb1d9cd4d838c150b0567d ... 2>&1
        • [exec] Executing command: {php_binary} '-d memory_limit=-1' .../phpcpd --log-pmd=...
      • run the {other_php_binary} phing -f tools/build/build_all.xml -verbose build command (replace {other_php_binary} with any other available PHP version, e.g. php56, php72, php74, etc.
      • confirm, that the specified binary, or in the case of a symlink, the original PHP binary was used in the above-shown commands

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Nov 17 2024, 12:52 PM
alex requested review of this revision.Nov 17 2024, 12:52 PM
erik requested changes to this revision.Thu, Nov 21, 4:16 AM

2 B part ir the test plan is failed. Build was not successful -

BuildException: /home/sites/dev/web/SVN/5.2.x/tools/build/targets/common.xml:84:48: /home/sites/dev/web/SVN/5.2.x/tools/build/targets/common.xml:84:48: PHPLocTask depends on PHPLoc being installed and on include_path. in /home/sites/dev/.config/composer/vendor/phing/phing/classes/phing/tasks/ext/phploc/PHPLocTask.php:189

This revision now requires changes to proceed.Thu, Nov 21, 4:16 AM
alex added a comment.Thu, Nov 21, 4:27 AM
In D496#10147, @erik wrote:

2 B part ir the test plan is failed. Build was not successful -

BuildException: /home/sites/dev/web/SVN/5.2.x/tools/build/targets/common.xml:84:48: /home/sites/dev/web/SVN/5.2.x/tools/build/targets/common.xml:84:48: PHPLocTask depends on PHPLoc being installed and on include_path. in /home/sites/dev/.config/composer/vendor/phing/phing/classes/phing/tasks/ext/phploc/PHPLocTask.php:189

Please try again.

I've installed all the needed dependencies (including phploc from the error message) only your computer (where the Phing is executed) using below command from the tools/build/targets/common.xml file:

composer global require sebastian/phpcpd:~2.0 phploc/phploc:~2.1 phpmd/phpmd:^2.14 phing/phing:~2.1 squizlabs/php_codesniffer:^3.0
alex requested review of this revision.Thu, Nov 21, 4:27 AM
erik accepted this revision.Thu, Nov 21, 5:20 AM
This revision is now accepted and ready to land.Thu, Nov 21, 5:20 AM
This revision was automatically updated to reflect the committed changes.