Page MenuHomeIn-Portal Phabricator

INP-1869 - Add vendor autoloader support for Class Locator
ClosedPublic

Authored by alex on Jul 25 2024, 4:59 AM.

Details

Test Plan

Preparations

  1. install Composer dependencies using php "which composer" install command (replace double quotes with backticks)

Testing part 1 (locator)

  1. create /locator_test.php file with this content:
<?php

use ConsoleHelpers\PHPUnitCompat\AbstractTestCase as AbstractTestCaseAlias;
use Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory;

$locate_class = require __DIR__ . '/tools/class_locator.php';

echo $locate_class(AssertFileDirectory::class) . '<br/>';
echo $locate_class(AbstractTestCaseAlias::class) . '<br/>';
echo $locate_class(NParserCompiler::class) . '<br/>';
  1. open the created file in the browser
  2. confirm, that output looks similar to this (you'll see full path to the In-Portal instead of ...):
.../vendor/yoast/phpunit-polyfills/src/Polyfills/AssertFileDirectory_Empty.php
.../vendor/console-helpers/phpunit-compat/src/PHPUnitCompat/AbstractTestCase5.php
.../core/kernel/nparser/compiler.php

Test part 2 (PHP version)

  1. confirm, that on PHP < 5.6
    • you can't install In-Portal from the Web Browser (the /core/install.php URL)
    • you can't install In-Portal dependencies using Composer (the php "which composer" install command, but replace double quotes with backticks)
  2. confirm, that on PHP >= 5.6
    • you can install In-Portal from the Web Browser (the /core/install.php URL)
    • you can install In-Portal dependencies using Composer (the php "which composer" install command, but replace double quotes with backticks)
  3. confirm, that the In-Portal installation wizard shows a minimal supported PHP version in 2 places (requirement list on the left + requirement explanation on the right)

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.Jul 25 2024, 4:59 AM
alex requested review of this revision.Jul 25 2024, 4:59 AM
alex edited the test plan for this revision. (Show Details)Jul 25 2024, 5:05 AM
erik accepted this revision.Jul 25 2024, 6:44 AM
This revision is now accepted and ready to land.Jul 25 2024, 6:44 AM
This revision was landed with ongoing or failed builds.Jul 26 2024, 3:02 AM
This revision was automatically updated to reflect the committed changes.