Hallo,
ich möchte gerne den, in der WoltLab Suite 5.4 eingeführten, database-PIP verwenden. In meinem Beispiel heißt mein Paket-Identifier dev.hanashi.wsc.example. Unter files/acp/database/ habe ich nun eine Datei namens install_dev.hanashi.wsc.example_1.0.0.php angelegt, welche folgenden Inhalt hat:
PHP: install_dev.hanashi.wsc.example_1.0.0.php
<?php
use wcf\system\database\table\column\NotNullInt10DatabaseTableColumn;
use wcf\system\database\table\column\NotNullVarchar191DatabaseTableColumn;
use wcf\system\database\table\DatabaseTable;
return [
DatabaseTable::create('wcf1_example')
->columns([
NotNullInt10DatabaseTableColumn::create('exampleID'),
NotNullVarchar191DatabaseTableColumn::create('test')
]),
];
Display More
Meine package.xml sieht wie folgt aus:
XML: package.xml
<?xml version="1.0" encoding="UTF-8"?>
<package name="dev.hanashi.wsc.exaple" xmlns="https://www.woltlab.com" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.woltlab.com https://www.woltlab.com/XSD/2019/package.xsd">
<packageinformation>
<packagename><![CDATA[Example]]></packagename>
<packagedescription><![CDATA[Example]]></packagedescription>
<version>1.0.0</version>
<date>2021-07-04</date>
</packageinformation>
<authorinformation>
<author><![CDATA[Hanashi Development]]></author>
<authorurl><![CDATA[https://hanashi.dev/]]></authorurl>
</authorinformation>
<requiredpackages>
<requiredpackage minversion="5.4.0 RC 1">com.woltlab.wcf</requiredpackage>
</requiredpackages>
<excludedpackages>
<excludedpackage version="6.0.0 Alpha 1">com.woltlab.wcf</excludedpackage>
</excludedpackages>
<instructions type="install">
<instruction type="file" />
<instruction type="database"/>
</instructions>
</package>
Display More
Beim Installieren des Paketes erhalte ich folgende Fehlermeldung:
Code
Error Type:
wcf\system\exception\ErrorException
Error Message:
include(/Users/hanashi/www/wsc54/acp/database/*.php): Failed to open stream: No such file or directory
File:
*/lib/system/WCF.class.php (344)
Stack Trace:
#0 */lib/system/package/plugin/DatabasePackageInstallationPlugin.class.php (69):
wcf\system\WCF::handleError(2, 'include(/Users/peterlohse/www/wsc54/acp/database/*.php): Failed to open stream: No such file or directory', '*/lib/system/package/plugin/DatabasePackageInstallationPlugin.class.php', 69)
#1 */lib/system/package/plugin/DatabasePackageInstallationPlugin.class.php (69):
include()
#2 */lib/system/package/plugin/DatabasePackageInstallationPlugin.class.php (48):
wcf\system\package\plugin\DatabasePackageInstallationPlugin->updateDatabase('*/acp/database/*.php')
#3 */lib/system/package/PackageInstallationDispatcher.class.php (792):
wcf\system\package\plugin\DatabasePackageInstallationPlugin->install()
#4 */lib/system/package/PackageInstallationDispatcher.class.php (153):
wcf\system\package\PackageInstallationDispatcher->executePIP([ attributes => , pip => , value => ])
#5 */lib/acp/action/InstallPackageAction.class.php (82):
wcf\system\package\PackageInstallationDispatcher->install('1bffaa22')
#6 */lib/action/AbstractDialogAction.class.php (73):
wcf\acp\action\InstallPackageAction->stepInstall()
#7 */lib/action/AbstractAction.class.php (53):
wcf\action\AbstractDialogAction->execute()
#8 */lib/system/request/Request.class.php (89):
wcf\action\AbstractAction->__run()
#9 */lib/system/request/RequestHandler.class.php (119):
wcf\system\request\Request->execute()
#10 */acp/index.php (11):
wcf\system\request\RequestHandler->handle('wcf', true)
Display More
Was mache ich hier falsch? Wie wird das PIP richtig verwendet? Ich habe es auch bereits mit run="standalone" probiert.
Übrigens liegt das oben genannt Script nach der Installation immer im richtigen Ordner, wird allerdings nicht ausgeführt.