ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
build.php File Reference

Go to the source code of this file.

Functions

while(count($oldTaskList) > 0) foreach(array_keys($newTaskList) as $task) init ()
 
 clean ()
 
 composerupdate ()
 
 test ()
 
 buildzip ()
 

Variables

 $tasks
 
 $default = 'buildzip'
 
 $baseDir = __DIR__ . '/../'
 
 $currentTask = $default
 
 $version = null
 
if(!isset($tasks[$currentTask])) $newTaskList = []
 
 $oldTaskList = [$currentTask => true]
 

Function Documentation

◆ buildzip()

buildzip ( )

Definition at line 121 of file build.php.

References $baseDir, $code, $input, and $version.

121  {
122 
123  global $baseDir, $version;
124  echo " Generating composer.json\n";
125 
126  $input = json_decode(file_get_contents(__DIR__ . '/../composer.json'), true);
127  $newComposer = [
128  "require" => $input['require'],
129  "config" => [
130  "bin-dir" => "./bin",
131  ],
132  "prefer-stable" => true,
133  "minimum-stability" => "alpha",
134  ];
135  unset(
136  $newComposer['require']['sabre/vobject'],
137  $newComposer['require']['sabre/http'],
138  $newComposer['require']['sabre/uri'],
139  $newComposer['require']['sabre/event']
140  );
141  $newComposer['require']['sabre/dav'] = $version;
142  mkdir('build/SabreDAV');
143  file_put_contents('build/SabreDAV/composer.json', json_encode($newComposer, JSON_PRETTY_PRINT));
144 
145  echo " Downloading dependencies\n";
146  system("cd build/SabreDAV; composer install -n", $code);
147  if ($code !== 0) {
148  echo "Composer reported error code $code\n";
149  die(1);
150  }
151 
152  echo " Removing pointless files\n";
153  unlink('build/SabreDAV/composer.json');
154  unlink('build/SabreDAV/composer.lock');
155 
156  echo " Moving important files to the root of the project\n";
157 
158  $fileNames = [
159  'CHANGELOG.md',
160  'LICENSE',
161  'README.md',
162  'examples',
163  ];
164  foreach ($fileNames as $fileName) {
165  echo " $fileName\n";
166  rename('build/SabreDAV/vendor/sabre/dav/' . $fileName, 'build/SabreDAV/' . $fileName);
167  }
168 
169  // <zip destfile="build/SabreDAV-${sabredav.version}.zip" basedir="build/SabreDAV" prefix="SabreDAV/" />
170 
171  echo "\n";
172  echo "Zipping the sabredav distribution\n\n";
173  system('cd build; zip -qr sabredav-' . $version . '.zip SabreDAV');
174 
175  echo "Done.";
176 
177 }
$baseDir
Definition: build.php:22
$code
Definition: example_050.php:99
$version
Definition: build.php:27

◆ clean()

clean ( )

Definition at line 89 of file build.php.

References $baseDir, and $outputDir.

Referenced by XML2DOM\startElement().

89  {
90 
91  global $baseDir;
92  echo " Removing build files\n";
93  $outputDir = $baseDir . '/build/SabreDAV';
94  if (is_dir($outputDir)) {
95  system('rm -r ' . $baseDir . '/build/SabreDAV');
96  }
97 
98 }
$baseDir
Definition: build.php:22
$outputDir
Definition: metarefresh.php:28
+ Here is the caller graph for this function:

◆ composerupdate()

composerupdate ( )

Definition at line 100 of file build.php.

References $baseDir.

100  {
101 
102  global $baseDir;
103  echo " Updating composer packages to latest version\n\n";
104  system('cd ' . $baseDir . '; composer update');
105 }
$baseDir
Definition: build.php:22

◆ init()

while (count( $oldTaskList) > 0) foreach (array_keys( $newTaskList) as $task) init ( )

Definition at line 77 of file build.php.

References $version, and Sabre\DAV\Version\VERSION.

Referenced by ilSoapAuthenticationCAS\__buildAuth(), PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph\__construct(), ilTestRandomQuestionSetNonAvailablePoolsTableGUI\addColumns(), ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI\addColumns(), ZipStream\File\addFileFooter(), ZipStream\File\addFileHeader(), ilTooltipGUI\addTooltip(), ilSoapAuthenticationCAS\authenticate(), ilContext\callContext(), ZipStream\File\deflateData(), ilCOPageObjDef\getDefinitionByParentType(), ilCOPageObjDef\getDefinitions(), ilExplorerBaseGUI\getHTML(), ilCOPagePCDef\getPCDefinitionByGUIClassName(), ilCOPagePCDef\getPCDefinitionByName(), ilCOPagePCDef\getPCDefinitionByType(), ilCOPagePCDef\getPCDefinitions(), ilPortfolioTemplatePageConfig\init(), ilCachedPlugin\init(), ilAdvancedMDFieldDefinitionFloat\init(), ilFSWebStorageExercise\init(), ilObjectCopyCourseGroupSelectionTableGUI\init(), ilFSStorageExercise5069\init(), ilFSStorageExercise\init(), ilRestFileStorage\init(), CAS_PGTStorage_File\init(), CAS_PGTStorage_Db\init(), ZipStream\File\processStreamWithComputedHeader(), and Monolog\Processor\MercurialProcessorTest\testProcessor().

77  {
78 
79  global $version;
80  if (!$version) {
81  include __DIR__ . '/../vendor/autoload.php';
82  $version = Sabre\DAV\Version::VERSION;
83  }
84 
85  echo " Building sabre/dav " . $version, "\n";
86 
87 }
const VERSION
Full version number.
Definition: Version.php:17
$version
Definition: build.php:27
+ Here is the caller graph for this function:

◆ test()

test ( )

Definition at line 107 of file build.php.

References $baseDir, and $code.

Referenced by ilTestExportFilename\__construct(), ilTestSignatureGUI\__construct(), ilTestScoring\__construct(), ilTestEvaluationData\__construct(), ilTestSignatureGUI\executeCommand(), Symfony\Component\Yaml\Tests\ParserTest\getCommentLikeStringInScalarBlockData(), ilTestScoring\getNumManualScorings(), ilTestExportFilename\getPathname(), ilTestSignatureGUI\getTestOutputGUI(), ilTestScoring\recalculatePass(), ilTestScoring\recalculateSolutions(), ilTestExportPlugin\setTest(), ilTestSignatureGUI\setTest(), ilTestEvaluationData\setTest(), Sabre\VObject\Component\VAvailabilityTest\template(), Sabre\VObject\Component\VAvailabilityTest\templateAvailable(), ItemTest\test_shy_title_and_property(), Symfony\Component\Yaml\Tests\ParserTest\testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks(), Symfony\Component\Yaml\Tests\ParserTest\testBlankLinesAreParsedAsNewLinesInFoldedBlocks(), Sabre\Xml\ReaderTest\testBrokenXml(), Sabre\CardDAV\Xml\Request\AddressBookQueryReportTest\testDeserializeAllOf(), Sabre\CardDAV\Xml\Request\AddressBookQueryReportTest\testDeserializeBadMatchType(), Sabre\CardDAV\Xml\Request\AddressBookQueryReportTest\testDeserializeBadTest(), Sabre\CardDAV\Xml\Request\AddressBookQueryReportTest\testDeserializeComplex(), Twig_Tests_Extension_SandboxTest\testMacrosInASandbox(), Sabre\VObject\ReaderTest\testReadIncompleteFile(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availabilityprop_required(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availableprop_required(), Sabre\VObject\ITip\BrokerTimezoneInParseEventInfoWithoutMasterTest\testTimezoneInParseEventInfoWithoutMaster(), Sabre\Xml\WriterTest\testWriteElementComplex(), and ilTestScoring\updatePassAndTestResults().

107  {
108 
109  global $baseDir;
110 
111  echo " Running all unittests.\n";
112  echo " This may take a while.\n\n";
113  system(__DIR__ . '/phpunit --configuration ' . $baseDir . '/tests/phpunit.xml.dist --stop-on-failure', $code);
114  if ($code != 0) {
115  echo "PHPUnit reported error code $code\n";
116  die(1);
117  }
118 
119 }
$baseDir
Definition: build.php:22
$code
Definition: example_050.php:99
+ Here is the caller graph for this function:

Variable Documentation

◆ $baseDir

$baseDir = __DIR__ . '/../'

Definition at line 22 of file build.php.

Referenced by buildzip(), clean(), composerupdate(), and test().

◆ $currentTask

$currentTask = $default

Definition at line 25 of file build.php.

◆ $default

$default = 'buildzip'

Definition at line 20 of file build.php.

Referenced by Twig_Node_Expression_Filter_Default\__construct(), ilAuthUtils\_getMultipleAuthModeOptions(), HTMLPurifier_ConfigSchema\add(), ilCalendarUtil\addDateTimePicker(), ilADTLocationFormBridge\addToForm(), ilADTLocationSearchBridgeSingle\addToForm(), ilPreviewSettings\adjustNumeric(), SeqTreeBuilder\buildNodeSeqTree(), ilDBPdoFieldDefinition\compareDefinition(), Twig_Node_Macro\compile(), ilObjSCORM2004LearningModule\convert_1_2_to_2004(), BaseFacebook\endsWith(), PhpOffice\PhpSpreadsheet\Collection\Memory\get(), Slim\Collection\get(), Slim\Http\Cookies\get(), Slim\Http\Headers\get(), Slim\Route\getArgument(), SimpleSAML_Configuration\getArray(), SimpleSAML_Configuration\getArrayize(), SimpleSAML_Configuration\getArrayizeString(), GuzzleHttp\Psr7\ServerRequest\getAttribute(), Slim\Http\Request\getAttribute(), SimpleSAML_Configuration\getBoolean(), ilClientListTableGUI\getClients(), SimpleSAML_Configuration\getConfigItem(), SimpleSAML_Configuration\getConfigList(), Slim\Http\Request\getCookieParam(), ilDBPdoFieldDefinition\getDeclarationOptions(), League\Flysystem\Config\getDefault(), SimpleSAML_Configuration\getDefaultEndpoint(), SimpleSAML_Configuration\getEndpointPrioritizedByBinding(), Sabre\DAV\Server\getHTTPDepth(), SimpleSAML_Configuration\getInteger(), ilDBPdoPostgresFieldDefinition\getIntegerDeclaration(), ilDBPdoMySQLFieldDefinition\getIntegerDeclaration(), SimpleSAML_Configuration\getIntegerRange(), ilSearchController\getLastClass(), SimpleSAML_Configuration\getLocalizedString(), PhpOffice\PhpSpreadsheet\Collection\Memory\getMultiple(), ILIAS\UI\Implementation\Component\Input\Container\Form\PostDataFromServerRequest\getOr(), Slim\Http\Headers\getOriginalKey(), Slim\Http\Request\getParam(), Slim\Http\Request\getParsedBodyParam(), TCPDF_STATIC\getPathPaintOperator(), SimpleSAML_Configuration\getPathValue(), sspmod_authfacebook_Facebook\getPersistentData(), SurveyMultipleChoiceQuestion\getPreconditionSelectValue(), SurveyMetricQuestion\getPreconditionSelectValue(), SurveySingleChoiceQuestion\getPreconditionSelectValue(), SurveyMatrixQuestion\getPreconditionSelectValue(), Jumbojett\OpenIDConnectClient\getProviderConfigValue(), Slim\Http\Request\getQueryParam(), ilTrSummaryTableGUI\getSelectableColumns(), Slim\Http\Request\getServerParam(), ilBuddySystem\getSetting(), IMSGlobal\LTI\ToolProvider\Context\getSetting(), IMSGlobal\LTI\ToolProvider\ToolConsumer\getSetting(), IMSGlobal\LTI\ToolProvider\ResourceLink\getSetting(), SimpleSAML_Configuration\getString(), ilAssQuestionSkillAssignmentRegistry\getStringifiedImports(), ilDBPdoReverse\getTableFieldDefinition(), ilObjTest\getTestStyleLocation(), BaseFacebook\getUserFromAvailableData(), ilDBPdoFieldDefinition\getValidTypes(), ilObjUserGUI\getValues(), SimpleSAML_Configuration\getValueValidate(), Jumbojett\OpenIDConnectClient\getWellKnownConfigValue(), Securimage\initColor(), ilECSMappingSettingsGUI\initFormCSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), ilOrgUnitGlobalSettingsGUI\initSettingsForm(), ilOpenIdConnectSettingsGUI\initSettingsForm(), Gettext\GettextTranslator\loadDomain(), ILIAS\UI\Implementation\Component\Button\Factory\month(), SAML2\Utils\parseBoolean(), Twig_Loader_Filesystem\parseName(), ilObjectAddNewItemGUI\parseRepository(), sspmod_discopower_PowerIdPDisco\processFilter(), ilObjSystemFolderGUI\saveHeaderTitleObject(), Sabre\CalDAV\ICalendar\DateTimeTest\testGetDateTimeBadTimeZone(), Sabre\HTTP\UtilTest\testTimezones(), and ILIAS\Data\Result\Error\valueOr().

◆ $newTaskList

if (!isset( $tasks[ $currentTask])) $newTaskList = []

Definition at line 36 of file build.php.

◆ $oldTaskList

$oldTaskList = [$currentTask => true]

Definition at line 37 of file build.php.

◆ $tasks

◆ $version

$version = null

Definition at line 27 of file build.php.

Referenced by GuzzleHttp\Psr7\Request\__construct(), ilFileVersionTableGUI\__construct(), GuzzleHttp\Psr7\ServerRequest\__construct(), getID3_cached_mysqli\__construct(), getID3_cached_mysql\__construct(), GuzzleHttp\Psr7\Response\__construct(), ilvCard\__construct(), getID3_cached_sqlite3\__construct(), Sabre\CardDAV\Plugin\addressbookMultiGetReport(), ilLTIToolProvider\authenticate(), IMSGlobal\LTI\ToolProvider\ToolProvider\authenticate(), buildzip(), ilSetup\checkPHPVersion(), Monolog\Handler\HipChatHandlerTest\createHandler(), ilCertificateTemplateDeleteAction\delete(), ilCertificate\deleteBackgroundImage(), ilFileVersionsGUI\deleteVersions(), getid3_dts\dialogNormalization(), ilFileVersionsGUI\downloadVersion(), ilUserCertificateRepository\fetchLatestVersion(), ilCertificateTemplateRepository\fetchPreviousCertificate(), ilFileVersionsTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), Sabre\DAV\Browser\Plugin\generateFooter(), Sabre\DAV\Browser\Plugin\generateHeader(), TCPDF_STATIC\get_mqr(), OAuthServer\get_version(), Sabre\DAV\getDb(), ilDataSet\getJsonRepresentation(), getid3_lyrics3\getLyrics3Data(), ilObjRemoteFileListGUI\getProperties(), ilObjFileListGUI\getProperties(), ilMDLifecycle\getVersion(), TCPDF\ImageEps(), init(), ilLDAPSettingsGUI\initForm(), ilUtil\isConvertVersionAtLeast(), HTMLPurifier_DefinitionCache\isOld(), getid3_mp3\MPEGaudioFrameLength(), sspmod_oauth_OAuthStore\new_request_token(), GuzzleHttp\Psr7\parse_request(), ilPluginAdmin\parsePluginPhp(), Sabre\VObject\ITip\BrokerTester\process(), ilUtil\processConvertVersion(), ilDBUpdate\readCustomUpdatesFileVersion(), ilDBUpdate\readFileVersion(), ilDBUpdate\readHotfixFileVersion(), ilLTIToolProvider\result(), IMSGlobal\LTI\ToolProvider\ToolProvider\result(), ilUserCertificateRepository\save(), assFileUpload\savePreviewData(), SAML2\SOAPClient\send(), TCPDF_STATIC\set_mqr(), Sabre\HTTP\setHttpVersion(), Sabre\HTTP\Message\setHttpVersion(), TCPDF\setPDFVersion(), ilTextAreaInputGUI\setRTESupport(), SimpleSAML\Store\SQL\setTableVersion(), ilTextAreaInputGUI\setUseRte(), ilvCard\setVersion(), ilWorkflowEngineDefinitionsGUI\showUploadForm(), phpseclib\File\X509\signCRL(), IMSGlobal\LTI\ToolProvider\ToolConsumer\signParameters(), PhpOffice\PhpSpreadsheet\Writer\Xls\BIFFwriter\storeBof(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testAccepted(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testAcceptedAllDay(), Sabre\VObject\ITip\BrokerDeleteEventTest\testAttendeeDeleteWithDtend(), Sabre\VObject\ITip\BrokerDeleteEventTest\testAttendeeReplyWithDuration(), Sabre\VObject\ITip\BrokerNewEventTest\testChangingOrganizers(), Sabre\VObject\CliTest\testConvertJson(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testCreateReplyByException(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testCreateReplyByExceptionAllDay(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testCreateReplyByExceptionTz(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testDeclined(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testDeclinedCancelledEvent(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteChange(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteChangeExdateOrder(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteChangeFromNonSchedulingToSchedulingObject(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteChangeFromSchedulingToNonSchedulingObject(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteChangeSignificantChange(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteNoChange(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteNoChangeForceSend(), Sabre\VObject\ITip\BrokerUpdateEventTest\testInviteRemoveAttendees(), Sabre\VObject\ITip\BrokerNewEventTest\testMultipleUID(), Sabre\VObject\ITip\EvolutionTest\testNewEvolutionEvent(), Sabre\VObject\ITip\BrokerUpdateEventTest\testNoAttendees(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testNoChangeForceSend(), Sabre\VObject\VCardConverterTest\testNoLabel(), Sabre\VObject\ITip\BrokerDeleteEventTest\testOrganizerDeleteWithDtend(), Sabre\VObject\ITip\BrokerDeleteEventTest\testOrganizerDeleteWithDuration(), Sabre\VObject\EmptyParameterTest\testRead(), Sabre\VObject\ITip\BrokerNewEventTest\testRecurrenceInvite(), Sabre\VObject\ITip\BrokerNewEventTest\testRecurrenceInvite2(), Sabre\VObject\ITip\BrokerNewEventTest\testRecurrenceInvite3(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testRecurringAllDay(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testRecurringReply(), Sabre\VObject\ITip\BrokerUpdateEventTest\testRemoveInstance(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testReplyNoMasterEvent(), Sabre\VObject\Parser\JsonTest\testRoundTripJCal(), Sabre\VObject\Parser\JsonTest\testRoundTripJCard(), Sabre\VObject\ITip\BrokerNewEventTest\testScheduleAgentClient(), Sabre\VObject\ITip\BrokerAttendeeReplyTest\testScheduleAgentOnOrganizer(), Sabre\VObject\ITip\BrokerNewEventTest\testSimpleInvite(), GuzzleHttp\Psr7\withProtocolVersion(), Slim\Http\Message\withProtocolVersion(), and getid3_mp3\XingVBRidOffset().