This repository was archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
This repository was archived by the owner on Feb 25, 2024. It is now read-only.
ILIAS7 composer dump-autoload Fehler #11
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Huhu,
aktuell erzeugt das Plugin folgenden Fehler wenn man composer mit dem Plugin ausführt:
Building Static Artifacts for ILIAS
===================================
PHP Fatal error: Trait 'srag\DIC\OnlyOffice\DICTrait' not found in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OnlyOffice/classes/class.ilObjOnlyOffice.php on line 16
PHP Stack trace:
PHP 1. {main}() /srv/www/ilias/setup/cli.php:0
PHP 2. Symfony\Component\Console\Application->run($input = *uninitialized*, $output = *uninitialized*) /srv/www/ilias/setup/cli.php:39
PHP 3. Symfony\Component\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'build-artifacts', 1 => '--yes']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; protected $stream = NULL; protected $options = ['yes' => TRUE]; protected $arguments = ['command' => 'build-artifacts']; protected $interactive = TRUE }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private $stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resource(3) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private $consoleSectionOutputs = []; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = TRUE; private $styles = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /srv/www/ilias/libs/composer/vendor/symfony/console/Application.php:149
PHP 4. Symfony\Component\Console\Application->doRunCommand($command = class ILIAS\Setup\CLI\BuildArtifactsCommand { private ${Symfony\Component\Console\Command\Command}application = class ILIAS\Setup\CLI\App { private ${Symfony\Component\Console\Application}commands = [...]; private ${Symfony\Component\Console\Application}wantHelps = FALSE; private ${Symfony\Component\Console\Application}runningCommand = ...; private ${Symfony\Component\Console\Application}name = 'The ILIAS Setup'; private ${Symfony\Component\Console\Application}version = 'UNKNOWN'; private ${Symfony\Component\Console\Application}commandLoader = NULL; private ${Symfony\Component\Console\Application}catchExceptions = TRUE; private ${Symfony\Component\Console\Application}autoExit = TRUE; private ${Symfony\Component\Console\Application}definition = class Symfony\Component\Console\Input\InputDefinition { ... }; private ${Symfony\Component\Console\Application}helperSet = class Symfony\Component\Console\Helper\HelperSet { ... }; private ${Symfony\Component\Console\Application}dispatcher = NULL; private ${Symfony\Component\Console\Application}terminal = class Symfony\Component\Console\Terminal { ... }; private ${Symfony\Component\Console\Application}defaultCommand = 'list'; private ${Symfony\Component\Console\Application}singleCommand = FALSE; private ${Symfony\Component\Console\Application}initialized = TRUE }; private ${Symfony\Component\Console\Command\Command}name = 'build-artifacts'; private ${Symfony\Component\Console\Command\Command}processTitle = NULL; private ${Symfony\Component\Console\Command\Command}aliases = []; private ${Symfony\Component\Console\Command\Command}definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; private ${Symfony\Component\Console\Command\Command}hidden = FALSE; private ${Symfony\Component\Console\Command\Command}help = ''; private ${Symfony\Component\Console\Command\Command}description = 'Build static artifacts from source'; private ${Symfony\Component\Console\Command\Command}ignoreValidationErrors = FALSE; private ${Symfony\Component\Console\Command\Command}applicationDefinitionMerged = TRUE; private ${Symfony\Component\Console\Command\Command}applicationDefinitionMergedWithArgs = TRUE; private ${Symfony\Component\Console\Command\Command}code = NULL; private ${Symfony\Component\Console\Command\Command}synopsis = ['short' => 'build-artifacts [options]', 'long' => 'build-artifacts [-y|--yes] [--plugin PLUGIN] [--no-plugins] [--skip SKIP]']; private ${Symfony\Component\Console\Command\Command}usages = []; private ${Symfony\Component\Console\Command\Command}helperSet = class Symfony\Component\Console\Helper\HelperSet { private $helpers = [...]; private $command = NULL }; protected $agent_finder = class ILIAS\Setup\ImplementationOfAgentFinder { protected $refinery = class ILIAS\Refinery\Factory { ... }; protected $data_factory = class ILIAS\Data\Factory { ... }; protected $lng = class ilSetupLanguage { ... }; protected $plugin_raw_reader = class ilPluginRawReader { ... }; protected $interface_finder = class ILIAS\Setup\ImplementationOfInterfaceFinder { ... }; protected $predefined_agents = [...] } }, $input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'build-artifacts', 1 => '--yes']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; protected $stream = NULL; protected $options = ['yes' => TRUE]; protected $arguments = ['command' => 'build-artifacts']; protected $interactive = TRUE }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private $stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resource(3) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private $consoleSectionOutputs = []; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = TRUE; private $styles = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /srv/www/ilias/libs/composer/vendor/symfony/console/Application.php:275
PHP 5. Symfony\Component\Console\Command\Command->run($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'build-artifacts', 1 => '--yes']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; protected $stream = NULL; protected $options = ['yes' => TRUE]; protected $arguments = ['command' => 'build-artifacts']; protected $interactive = TRUE }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private $stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resource(3) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private $consoleSectionOutputs = []; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = TRUE; private $styles = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /srv/www/ilias/libs/composer/vendor/symfony/console/Application.php:1021
PHP 6. ILIAS\Setup\CLI\BuildArtifactsCommand->execute($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'build-artifacts', 1 => '--yes']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; protected $stream = NULL; protected $options = ['yes' => TRUE]; protected $arguments = ['command' => 'build-artifacts']; protected $interactive = TRUE }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private $stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resource(3) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private $consoleSectionOutputs = []; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = TRUE; private $styles = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /srv/www/ilias/libs/composer/vendor/symfony/console/Command/Command.php:255
PHP 7. ILIAS\Setup\CLI\BuildArtifactsCommand->getRelevantAgent($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'build-artifacts', 1 => '--yes']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $requiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = [...]; private $shortcuts = [...] }; protected $stream = NULL; protected $options = ['yes' => TRUE]; protected $arguments = ['command' => 'build-artifacts']; protected $interactive = TRUE }) /srv/www/ilias/src/Setup/CLI/BuildArtifactsCommand.php:45
PHP 8. ILIAS\Setup\ImplementationOfAgentFinder->getAgents() /srv/www/ilias/src/Setup/CLI/HasAgent.php:48
PHP 9. ILIAS\Setup\ImplementationOfAgentFinder->getPluginAgent($name = 'OnlyOffice') /srv/www/ilias/src/Setup/ImplementationOfAgentFinder.php:78
PHP 10. iterator_to_array($iterator = class Generator { }) /srv/www/ilias/src/Setup/ImplementationOfAgentFinder.php:137
PHP 11. ILIAS\Setup\ImplementationOfInterfaceFinder->getMatchingClassNames($interface = 'ILIAS\\Setup\\Agent', $additional_ignore = [], $matching_path = '[/]Customizing/global/plugins/.*/.*/OnlyOffice/.*') /srv/www/ilias/src/Setup/ImplementationOfAgentFinder.php:137
PHP 12. ReflectionClass->__construct($argument = 'ilObjOnlyOffice') /srv/www/ilias/src/Setup/ImplementationOfInterfaceFinder.php:60
PHP 13. spl_autoload_call($class_name = 'ilObjOnlyOffice') /srv/www/ilias/src/Setup/ImplementationOfInterfaceFinder.php:60
PHP 14. Composer\Autoload\ClassLoader->loadClass($class = 'ilObjOnlyOffice') /srv/www/ilias/src/Setup/ImplementationOfInterfaceFinder.php:60
PHP 15. Composer\Autoload\includeFile($file = '/srv/www/ilias/libs/composer/vendor/composer/../../../../Customizing/global/plugins/Services/Repository/RepositoryObject/OnlyOffice/classes/class.ilObjOnlyOffice.php') /srv/www/ilias/libs/composer/vendor/composer/ClassLoader.php:428
PHP 16. include() /srv/www/ilias/libs/composer/vendor/composer/ClassLoader.php:571
Script @php setup/cli.php build-artifacts --yes handling the post-autoload-dump event returned with error code 255
Wir haben das jetzt einmal etwas dreckig auf folgende Weise gefixt:
# classes/class.ilObjOnlyOffice.php
require_once __DIR__ . '/../vendor/autoload.php';
use srag\Plugins\OnlyOffice\ObjectSettings\ObjectSettings;
use srag\Plugins\OnlyOffice\Utils\OnlyOfficeTrait;
use srag\DIC\OnlyOffice\DICTrait;
[...]Allerdings bin ich mir sicher dass es hierfür eine sauberere Lösung geben muss...
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working