Unexpected output: Affected paths: relative - resubmit patch.
⚙ D495 INP-1884 - Actualize "/system/config.php" created during the build
Page MenuHomeIn-Portal Phabricator

INP-1884 - Actualize "/system/config.php" created during the build
ClosedPublic

Authored by alex on Nov 17 2024, 10:52 AM.

Details

Test Plan
  1. apply patch from the D496
  2. in a Web Browser:
    • empty the database, where In-Portal will be installed
    • (in CLI) restart Memcache Server
    • (in CLI) delete the /system/config.php file
    • do a clean install of In-Portal and choose to use Memcache for caching
  3. in IDE:
    1. remove contents of the core/units/helpers/xml_helper.php and core/units/helpers/xml_helper5.php files
    2. copy/paste the /tools/build/build.properties file from the /tools/build/build.properties.dist file
    3. edit /tools/build/build.properties file and make these changes:
      • set client.ip.address property to the 127.0.0.1
      • set website.domain property to the value of the $_CONFIG['Misc']['Domain'] key in /system/config.php file
      • set website.path property to the value of the $_CONFIG['Misc']['WebsitePath'] key in /system/config.php file
      • set security.security_hmac_key property to the value of the $_CONFIG['Misc']['SecurityHmacKey'] key in /system/config.php file
      • set security.security_encryption_key property to the value of the $_CONFIG['Misc']['SecurityEncryptionKey'] key in /system/config.php file
      • set db.host property to the value of the $_CONFIG['Database']['DBHost'] key in /system/config.php file
      • set db.name property to the value of the $_CONFIG['Database']['DBName'] key in /system/config.php file
      • set db.user property to the value of the $_CONFIG['Database']['DBUser'] key in /system/config.php file
      • set db.password property to the value of the $_CONFIG['Database']['DBUserPassword'] key in /system/config.php file
      • set db.collation property to the value of the $_CONFIG['Database']['DBCollation'] key in /system/config.php file
      • set db.tableprefix property to the value of the $_CONFIG['Database']['TablePrefix'] key in /system/config.php file
      • set db.charset property to the value of the $_CONFIG['Database']['DBCharset'] key in /system/config.php file
    4. copy/paste contents of the /system/config.php file somewhere to use later in a comparison procedure
  4. in CLI:
    1. delete the /system/build-schema.sql, /system/build-data.sql, /system/build-patch.sql files (if present)
    2. run the phing -f tools/build/build_all.xml db-dump command
    3. confirm, that
      1. command finished without errors
      2. the /system/build-schema.sql, /system/build-data.sql, /system/build-patch.sql files were created
    4. run the phing -f tools/build/build_all.xml build command
    5. confirm, that
      1. command finished without errors
      2. the /system/config.php file is identical to the previously remembered /system/config.php file with these exceptions:
        • the // Generated by Phing. comment is added on the next line after the <?php line
        • the $_CONFIG['Misc']['CacheHandler'] key has 'Fake' value

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 1340
Build 1340: arc lint + arc unit

Event Timeline

alex created this revision.Nov 17 2024, 10:52 AM
alex requested review of this revision.Nov 17 2024, 10:52 AM
alex edited the test plan for this revision. (Show Details)Nov 17 2024, 12:53 PM
alex edited the test plan for this revision. (Show Details)Tue, Nov 19, 12:59 PM
erik added a comment.Wed, Nov 20, 4:51 AM

Error on Clean install without applying patch

On "Step 8 - Basic Configuration" first page load after previous step.

Notice (#1): Constant EDITING_MODE already defined in \home\sites\dev\web\SVN\5.2.x\core\install\step_templates\post_config.tpl on line 85

erik requested changes to this revision.Wed, Nov 20, 5:36 AM

Not passed 3 E a part of the plan. Made run of php74 which phing` -f tools/build/build_all.xml build` command.
Command finished with fatal error.

"PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 5.6.0". You are running 5.4.45. in /home/sites/dev/web/SVN/5.2.x/vendor/composer/platform_check.php on line 25"

This revision now requires changes to proceed.Wed, Nov 20, 5:36 AM
alex edited the test plan for this revision. (Show Details)Wed, Nov 20, 5:44 AM
alex requested review of this revision.EditedWed, Nov 20, 5:57 AM
In D495#10109, @erik wrote:

Error on Clean install without applying patch

On "Step 8 - Basic Configuration" first page load after previous step.

Notice (#1): Constant EDITING_MODE already defined in \home\sites\dev\web\SVN\5.2.x\core\install\step_templates\post_config.tpl on line 85

I've created a D498 to solve this problem.

In D495#10110, @erik wrote:

Not passed 3 E a part of the plan. Made run of php74 which phing` -f tools/build/build_all.xml build` command.
Command finished with fatal error.

"PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 5.6.0". You are running 5.4.45. in /home/sites/dev/web/SVN/5.2.x/vendor/composer/platform_check.php on line 25"

This happens because the default PHP version in CLI (5.4.45) doesn't meet In-Portal PHP version requirements (5.6.0+). To solve this problem please first apply the D496 and then this patch. I've updated test plan to reflect this.

erik requested changes to this revision.Fri, Nov 22, 4:40 AM

All passed, excepting last part - config.php comparision.

Excessive difference detected
EnableSystemLog = 1 (generated by Phing)
EnableSystemLog = 0 was before

This revision now requires changes to proceed.Fri, Nov 22, 4:40 AM
alex updated this revision to Diff 1290.Fri, Nov 22, 4:48 AM

Disabled the EnableSystemLog setting in the Phing-generated /system/config.php.

erik accepted this revision.Fri, Nov 22, 4:51 AM

accepted, detected difference fixed in new patch version

This revision is now accepted and ready to land.Fri, Nov 22, 4:51 AM
This revision was automatically updated to reflect the committed changes.