Skip to content

Commit

Permalink
Adjust setup.php and callback handler and also fix require_once and
Browse files Browse the repository at this point in the history
include_once issues.
  • Loading branch information
lukastocker committed Sep 21, 2023
1 parent 4b3db02 commit f67f2d2
Show file tree
Hide file tree
Showing 580 changed files with 1,220 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion cli/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @package ilias-setup
*/
if (false === file_exists(__DIR__ . '/../vendor/composer/vendor/autoload.php')) {
echo 'Could not find composers "autoload.php". Try to run "composer install" in the directory ".libs/composer"';
echo 'Could not find composers "autoload.php". Try to run "composer install" in the directory ".vendor/composer"';
exit;
}

Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/ADT_/test/ilComponentsADTSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static function suite(): ilComponentsADTSuite
{
$suite = new ilComponentsADTSuite();

include_once("./components/ILIAS/ADT_/test/ilADTFactoryTest.php");
include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ADT_/test/ilADTFactoryTest.php");
$suite->addTestSuite(ilADTFactoryTest::class);
return $suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function suite(): TestSuite
{
$suite = new ilComponentsAccessControlSuite();
/** @noRector */
include_once("./components/ILIAS/AccessControl_/test/ilRBACTest.php");
include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/test/ilRBACTest.php");
$suite->addTestSuite(ilRBACTest::class);
return $suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite()
{
$suite = new self();

require_once("./components/ILIAS/Accessibility_/test/AccessibilityCriterionConfigTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Accessibility_/test/AccessibilityCriterionConfigTest.php");
$suite->addTestSuite("AccessibilityCriterionConfigTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/Accordion_/test/AccordionStandardGUIRequestTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Accordion_/test/AccordionStandardGUIRequestTest.php");
$suite->addTestSuite("AccordionStandardGUIRequestTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function readStructure(): void
public function downloadClassFile(): void
{
$header = "<?php
require_once('./components/ILIAS/ActiveRecord_/class.ActiveRecord.php');
require_once(substr(__FILE__, 0, strpos(__FILE__, 'components/ILIAS')). '/components/ILIAS/ActiveRecord_/class.ActiveRecord.php');
/**
* Class {CLASS_NAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
use PHPUnit\Framework\TestSuite;

/** @noRector */
require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

class ilComponentsActiveRecordSuite extends TestSuite
{
public static function suite(): self
{
$self = new self();
/** @noRector */
require_once("./components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordConnectorTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordConnectorTest.php");
$self->addTestSuite("ilServicesActiveRecordConnectorTest");
/** @noRector */
require_once("./components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordFieldTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordFieldTest.php");
$self->addTestSuite("ilServicesActiveRecordFieldTest");

return $self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/Administration_/test/AdminGUIRequestTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Administration_/test/AdminGUIRequestTest.php");
$suite->addTestSuite("AdminGUIRequestTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

class ilComponentsAdministrativeNotificationSuite extends TestSuite
{
public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/AdministrativeNotification_/test/ilServicesAdministrativeNotificationTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AdministrativeNotification_/test/ilServicesAdministrativeNotificationTest.php");
$suite->addTestSuite("ilServicesAdministrativeNotificationTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -28,7 +28,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/AdvancedEditing_/test/AdveStandardGUIRequestTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AdvancedEditing_/test/AdveStandardGUIRequestTest.php");
$suite->addTestSuite("AdveStandardGUIRequestTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static function suite(): self
{
$suite = new self();

include_once './components/ILIAS/AdvancedMetaData_/test/record/ilAdvancedMDRecordObjectOrderingsTest.php';
include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AdvancedMetaData_/test/record/ilAdvancedMDRecordObjectOrderingsTest.php';
$suite->addTestSuite(ilAdvancedMDRecordObjectOrderingsTest::class);

return $suite;
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/AuthApache_/test/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
*
*****************************************************************************/

require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php';
require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

class ilComponentsAuthShibbolethSuite extends TestSuite
{
public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/AuthShibboleth_/test/ilServicesAuthShibbolethTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AuthShibboleth_/test/ilServicesAuthShibbolethTest.php");
$suite->addTestSuite("ilServicesAuthShibbolethTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php");
$suite->addTestSuite("AwarenessSessionRepositoryTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
use Mockery;
use PHPUnit\Framework\TestCase;

require_once("vendor/composer/vendor/autoload.php");
require_once("./components/ILIAS/ActiveRecord_/Connector/class.arConnector.php");
require_once("./components/ILIAS/ActiveRecord_/Connector/class.arConnectorMap.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/Connector/class.arConnector.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/Connector/class.arConnectorMap.php");

/**
* Class BackgroundTaskTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger;
use Mockery\Adapter\Phpunit\MockeryTestCase;

require_once("vendor/composer/vendor/autoload.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php");

class BasicObserverTest extends MockeryTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/BackgroundTasks/tests/TaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use ILIAS\BackgroundTasks\Types\SingleType;
use PHPUnit\Framework\TestCase;

require_once("vendor/composer/vendor/autoload.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php");

/**
* Class BackgroundTaskTest
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/BackgroundTasks/tests/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use ILIAS\BackgroundTasks\Types\SingleType;
use PHPUnit\Framework\TestCase;

require_once("vendor/composer/vendor/autoload.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php");

/**
* Class BackgroundTaskTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*********************************************************************/

/** @noRector */
require_once __DIR__ . "/../../../../vendor/composer/vendor/autoload.php";
require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php";

use ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager;
use ILIAS\BackgroundTasks\Persistence;
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/Badge_/test/ilComponentsBadgeSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/Badge_/test/BadgeManagementSessionRepositoryTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Badge_/test/BadgeManagementSessionRepositoryTest.php");
$suite->addTestSuite("BadgeManagementSessionRepositoryTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public static function suite(): self
{
$suite = new self();
/** @noRector */
require_once("./components/ILIAS/Bibliographic_/test/ilBibtechParserTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Bibliographic_/test/ilBibtechParserTest.php");
$suite->addTestSuite("ilBibtechParserTest");
/** @noRector */
require_once("./components/ILIAS/Bibliographic_/test/ilRisParserTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Bibliographic_/test/ilRisParserTest.php");
$suite->addTestSuite("ilRisParserTest");

return $suite;
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/Block_/test/ilComponentsBlockSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): ilComponentsBlockSuite
{
$suite = new self();

require_once("./components/ILIAS/Block_/test/BlockSessionRepositoryTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Block_/test/BlockSessionRepositoryTest.php");
$suite->addTestSuite("BlockSessionRepositoryTest");

return $suite;
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/Blog_/test/ilComponentsBlogSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): ilComponentsBlogSuite
{
$suite = new self();

require_once("./components/ILIAS/Blog_/test/BlogStandardGUIRequestTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Blog_/test/BlogStandardGUIRequestTest.php");
$suite->addTestSuite("BlogStandardGUIRequestTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use PHPUnit\Framework\TestSuite;

require_once 'vendor/composer/vendor/autoload.php';
require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php';

/**
* @author Alexander Killing <[email protected]>
Expand All @@ -31,7 +31,7 @@ public static function suite(): self
{
$suite = new self();

require_once("./components/ILIAS/BookingManager_/test/BookManStandardGUIRequestTest.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/BookingManager_/test/BookManStandardGUIRequestTest.php");
$suite->addTestSuite("BookManStandardGUIRequestTest");

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function init(): void
foreach ($component_repository->getPluginSlotById("pgcp")->getActivePlugins() as $plugin) {
$plugin_name = $plugin->getName();
if ($plugin->supportsExport()) {
require_once('components/SERVICEPROVIDER/COPage/PageComponent/'
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/SERVICEPROVIDER/COPage/PageComponent/'
. $plugin_name . '/classes/class.il' . $plugin_name . 'Exporter.php');

$this->plugin_dependencies[$plugin_name] = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function init(): void
foreach ($component_repository->getPluginSlotById("pgcp")->getActivePlugins() as $plugin) {
$plugin_name = $plugin->getName();
if ($plugin->supportsExport()) {
require_once('components/SERVICEPROVIDER/COPage/PageComponent/'
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/SERVICEPROVIDER/COPage/PageComponent/'
. $plugin_name . '/classes/class.il' . $plugin_name . 'Importer.php');

$this->importer_plugins[] = $plugin_name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected function getCellContent(int $i, int $j): string
true,
false
);
include_once("./components/ILIAS/COPage_/classes/class.ilPCParagraphGUI.php");
include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/classes/class.ilPCParagraphGUI.php");
$s_text = ilPCParagraphGUI::xml2outputJS(
$s_text,
"TableContent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*********************************************************************/


require_once("./components/ILIAS/TestQuestionPool_/classes/class.assQuestionGUI.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/classes/class.assQuestionGUI.php");

/**
* Scorm 2004 Question Exporter
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/COPage_/test/PCInteractiveImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use PHPUnit\Framework\TestCase;

require_once("./components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php");

/**
* @author Alexander Killing <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/COPage_/test/PCMediaObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use PHPUnit\Framework\TestCase;

require_once("./components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php");
require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php");

/**
* @author Alexander Killing <[email protected]>
Expand Down
Loading

0 comments on commit f67f2d2

Please sign in to comment.