From d5ff50bc8aa9565e76c9ed21055ee1029a488b8d Mon Sep 17 00:00:00 2001 From: Richard Klees Date: Thu, 25 Jan 2024 16:13:57 +0100 Subject: [PATCH] Setup: get agents via component mechanism --- .../ILIAS/AccessControl/AccessControl.php | 9 +++- .../ILIAS/Administration/Administration.php | 5 ++- .../AdministrativeNotification.php | 5 ++- .../AdvancedMetaData/AdvancedMetaData.php | 5 ++- .../ILIAS/Authentication/Authentication.php | 5 ++- .../ILIAS/BackgroundTasks/BackgroundTasks.php | 5 ++- .../ILIAS/Bibliographic/Bibliographic.php | 5 ++- components/ILIAS/Blog/Blog.php | 5 ++- .../ILIAS/BookingManager/BookingManager.php | 5 ++- components/ILIAS/COPage/COPage.php | 5 ++- components/ILIAS/Calendar/Calendar.php | 5 ++- components/ILIAS/Certificate/Certificate.php | 5 ++- components/ILIAS/Chatroom/Chatroom.php | 5 ++- components/ILIAS/Cloud/Cloud.php | 5 ++- components/ILIAS/CmiXapi/CmiXapi.php | 5 ++- components/ILIAS/Component/Component.php | 5 +++ components/ILIAS/ContentPage/ContentPage.php | 5 ++- components/ILIAS/Course/Course.php | 5 ++- components/ILIAS/Dashboard/Dashboard.php | 5 ++- .../ILIAS/DataCollection/DataCollection.php | 5 ++- .../ILIAS/DataProtection/DataProtection.php | 5 ++- components/ILIAS/Database/Database.php | 5 ++- .../ILIAS/EmployeeTalk/EmployeeTalk.php | 6 ++- .../ILIAS/EventHandling/EventHandling.php | 5 ++- components/ILIAS/Exercise/Exercise.php | 5 ++- components/ILIAS/File/File.php | 5 ++- .../ILIAS/FileDelivery/FileDelivery.php | 5 ++- .../ILIAS/FileServices/FileServices.php | 5 ++- components/ILIAS/Filesystem/Filesystem.php | 5 ++- components/ILIAS/Forum/Forum.php | 5 ++- components/ILIAS/GlobalCache/GlobalCache.php | 5 ++- .../ILIAS/GlobalScreen/GlobalScreen.php | 5 ++- components/ILIAS/Glossary/Glossary.php | 5 ++- components/ILIAS/Help/Help.php | 5 ++- components/ILIAS/Http_/Http_.php | 5 ++- components/ILIAS/ILIASObject/ILIASObject.php | 5 ++- components/ILIAS/Imprint/Imprint.php | 5 ++- .../IndividualAssessment.php | 5 ++- components/ILIAS/ItemGroup/ItemGroup.php | 5 ++- components/ILIAS/LTI/LTI.php | 5 ++- components/ILIAS/LTIConsumer/LTIConsumer.php | 5 ++- components/ILIAS/Language/Language.php | 9 ++++ .../Setup/class.ilLanguageSetupAgent.php | 1 - .../ILIAS/LearningModule/LearningModule.php | 10 ++++- .../LearningSequence/LearningSequence.php | 5 ++- components/ILIAS/Link/Link.php | 5 ++- components/ILIAS/Logging/Logging.php | 5 ++- components/ILIAS/Mail/Mail.php | 5 ++- components/ILIAS/MathJax/MathJax.php | 5 ++- components/ILIAS/MediaCast/MediaCast.php | 5 ++- .../ILIAS/MediaObjects/MediaObjects.php | 9 +++- components/ILIAS/MetaData/MetaData.php | 5 ++- components/ILIAS/Notes/Notes.php | 5 ++- .../ILIAS/Notifications/Notifications.php | 5 ++- components/ILIAS/OrgUnit/OrgUnit.php | 5 ++- .../ILIAS/PDFGeneration/PDFGeneration.php | 5 ++- components/ILIAS/Portfolio/Portfolio.php | 5 ++- .../ILIAS/PrivacySecurity/PrivacySecurity.php | 5 ++- components/ILIAS/Radius/Radius.php | 5 ++- .../ILIAS/Registration/Registration.php | 5 ++- components/ILIAS/Repository/Repository.php | 9 +++- .../ILIAS/ResourceStorage/ResourceStorage.php | 5 ++- components/ILIAS/Session/Session.php | 5 ++- components/ILIAS/Setup/Setup.php | 16 ++++--- components/ILIAS/Setup/src/AgentFinder.php | 2 +- components/ILIAS/Setup/src/CLI/HasAgent.php | 2 +- .../Setup/src/ImplementationOfAgentFinder.php | 42 ++++++++----------- .../ILIAS/Setup/tests/CLI/HasAgentTest.php | 2 +- components/ILIAS/Skill/Skill.php | 5 ++- components/ILIAS/StaticURL/StaticURL.php | 5 ++- .../ILIAS/StudyProgramme/StudyProgramme.php | 1 - components/ILIAS/Style/Style.php | 10 ++++- .../ILIAS/SystemFolder/SystemFolder.php | 5 ++- components/ILIAS/Test/Test.php | 5 ++- .../TestQuestionPool/TestQuestionPool.php | 5 ++- components/ILIAS/Tree/Tree.php | 5 ++- components/ILIAS/UICore/UICore.php | 5 ++- components/ILIAS/User/User.php | 5 ++- components/ILIAS/Utilities/Utilities.php | 5 ++- .../ILIAS/VirusScanner/VirusScanner.php | 5 ++- components/ILIAS/WOPI/WOPI.php | 5 ++- components/ILIAS/WebResource/WebResource.php | 5 ++- components/ILIAS/WebServices/WebServices.php | 10 ++++- components/ILIAS/Wiki/Wiki.php | 5 ++- .../ILIAS/WorkflowEngine/WorkflowEngine.php | 5 ++- ...Agent.php => class.ilCommonSetupAgent.php} | 2 +- 86 files changed, 374 insertions(+), 116 deletions(-) rename components/ILIAS/setup_/classes/{class.ilSetupAgent.php => class.ilCommonSetupAgent.php} (99%) diff --git a/components/ILIAS/AccessControl/AccessControl.php b/components/ILIAS/AccessControl/AccessControl.php index aa4ae888f459..3ba82681611c 100644 --- a/components/ILIAS/AccessControl/AccessControl.php +++ b/components/ILIAS/AccessControl/AccessControl.php @@ -32,6 +32,13 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilAccessControlSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilAccessRBACSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Administration/Administration.php b/components/ILIAS/Administration/Administration.php index 8ee083a3dd58..c2e33b8a304e 100644 --- a/components/ILIAS/Administration/Administration.php +++ b/components/ILIAS/Administration/Administration.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Administration\Setup\ilAdministrationSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/AdministrativeNotification/AdministrativeNotification.php b/components/ILIAS/AdministrativeNotification/AdministrativeNotification.php index dd68213c82dd..a6cf6b3e0bea 100644 --- a/components/ILIAS/AdministrativeNotification/AdministrativeNotification.php +++ b/components/ILIAS/AdministrativeNotification/AdministrativeNotification.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilADNAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/AdvancedMetaData/AdvancedMetaData.php b/components/ILIAS/AdvancedMetaData/AdvancedMetaData.php index 3d87d8c35ab0..f2224eff0569 100644 --- a/components/ILIAS/AdvancedMetaData/AdvancedMetaData.php +++ b/components/ILIAS/AdvancedMetaData/AdvancedMetaData.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\AdvancedMetaData\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Authentication/Authentication.php b/components/ILIAS/Authentication/Authentication.php index 08ee89d7076b..1a7f58cf8f18 100644 --- a/components/ILIAS/Authentication/Authentication.php +++ b/components/ILIAS/Authentication/Authentication.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilAuthenticationSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/BackgroundTasks/BackgroundTasks.php b/components/ILIAS/BackgroundTasks/BackgroundTasks.php index 1d48d935bb92..5f092e5b5486 100644 --- a/components/ILIAS/BackgroundTasks/BackgroundTasks.php +++ b/components/ILIAS/BackgroundTasks/BackgroundTasks.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilBackgroundTasksSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Bibliographic/Bibliographic.php b/components/ILIAS/Bibliographic/Bibliographic.php index 1f5867f178d3..91da0b8d8b5c 100644 --- a/components/ILIAS/Bibliographic/Bibliographic.php +++ b/components/ILIAS/Bibliographic/Bibliographic.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilBibliographicSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Blog/Blog.php b/components/ILIAS/Blog/Blog.php index 0ebb6e813ce4..ec2b546b9639 100644 --- a/components/ILIAS/Blog/Blog.php +++ b/components/ILIAS/Blog/Blog.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Blog\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/BookingManager/BookingManager.php b/components/ILIAS/BookingManager/BookingManager.php index b4dc8b4d681f..84a338c2947f 100644 --- a/components/ILIAS/BookingManager/BookingManager.php +++ b/components/ILIAS/BookingManager/BookingManager.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\BookingManager\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/COPage/COPage.php b/components/ILIAS/COPage/COPage.php index c92abe123792..a65fd3ea83f5 100644 --- a/components/ILIAS/COPage/COPage.php +++ b/components/ILIAS/COPage/COPage.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\COPage\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Calendar/Calendar.php b/components/ILIAS/Calendar/Calendar.php index f4741113383f..84514694e219 100644 --- a/components/ILIAS/Calendar/Calendar.php +++ b/components/ILIAS/Calendar/Calendar.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilCalendarSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Certificate/Certificate.php b/components/ILIAS/Certificate/Certificate.php index 3956028d3eb0..442a6a1d4c3b 100644 --- a/components/ILIAS/Certificate/Certificate.php +++ b/components/ILIAS/Certificate/Certificate.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilCertificatSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Chatroom/Chatroom.php b/components/ILIAS/Chatroom/Chatroom.php index d22452662c3d..10917b81b9aa 100644 --- a/components/ILIAS/Chatroom/Chatroom.php +++ b/components/ILIAS/Chatroom/Chatroom.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilChatroomSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Cloud/Cloud.php b/components/ILIAS/Cloud/Cloud.php index f37b4d081207..12e9cb6e4c89 100644 --- a/components/ILIAS/Cloud/Cloud.php +++ b/components/ILIAS/Cloud/Cloud.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilObjCloudModuleUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/CmiXapi/CmiXapi.php b/components/ILIAS/CmiXapi/CmiXapi.php index f445697a7bbf..808c5c8b71e7 100644 --- a/components/ILIAS/CmiXapi/CmiXapi.php +++ b/components/ILIAS/CmiXapi/CmiXapi.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilCmiXapiSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Component/Component.php b/components/ILIAS/Component/Component.php index 6b947de27a93..a69870fb6ff8 100644 --- a/components/ILIAS/Component/Component.php +++ b/components/ILIAS/Component/Component.php @@ -33,5 +33,10 @@ public function init( array | \ArrayAccess &$internal, ): void { $contribute[Component\EntryPoint::class] = fn() => new Component\EntryPoint\HelloWorld("Component/HelloWorld"); + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilComponentsSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/ContentPage/ContentPage.php b/components/ILIAS/ContentPage/ContentPage.php index b89e0f9e0841..e3bb8d046a29 100644 --- a/components/ILIAS/ContentPage/ContentPage.php +++ b/components/ILIAS/ContentPage/ContentPage.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilContentPageSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Course/Course.php b/components/ILIAS/Course/Course.php index 5570fd296656..9edaad150191 100644 --- a/components/ILIAS/Course/Course.php +++ b/components/ILIAS/Course/Course.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilCourseObjectiveSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Dashboard/Dashboard.php b/components/ILIAS/Dashboard/Dashboard.php index 61a18dfae392..641518aaf384 100644 --- a/components/ILIAS/Dashboard/Dashboard.php +++ b/components/ILIAS/Dashboard/Dashboard.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Dashboard\Setup\ilDashboardUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/DataCollection/DataCollection.php b/components/ILIAS/DataCollection/DataCollection.php index c259a39344d9..05ebe065e048 100644 --- a/components/ILIAS/DataCollection/DataCollection.php +++ b/components/ILIAS/DataCollection/DataCollection.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilDataCollectionSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/DataProtection/DataProtection.php b/components/ILIAS/DataProtection/DataProtection.php index 538cdae32ef3..59228837ba4c 100644 --- a/components/ILIAS/DataProtection/DataProtection.php +++ b/components/ILIAS/DataProtection/DataProtection.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\DataProtection\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Database/Database.php b/components/ILIAS/Database/Database.php index 867e424a129c..a497bcd18f1c 100644 --- a/components/ILIAS/Database/Database.php +++ b/components/ILIAS/Database/Database.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilDatabaseSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/EmployeeTalk/EmployeeTalk.php b/components/ILIAS/EmployeeTalk/EmployeeTalk.php index 4ea832d2e3ef..b147d155b507 100644 --- a/components/ILIAS/EmployeeTalk/EmployeeTalk.php +++ b/components/ILIAS/EmployeeTalk/EmployeeTalk.php @@ -32,6 +32,10 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/EventHandling/EventHandling.php b/components/ILIAS/EventHandling/EventHandling.php index ce614c7765f8..dc501f1cb5a7 100644 --- a/components/ILIAS/EventHandling/EventHandling.php +++ b/components/ILIAS/EventHandling/EventHandling.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilEventHandlingSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Exercise/Exercise.php b/components/ILIAS/Exercise/Exercise.php index 93904d0ecd8f..935c65157254 100644 --- a/components/ILIAS/Exercise/Exercise.php +++ b/components/ILIAS/Exercise/Exercise.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilExerciseSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/File/File.php b/components/ILIAS/File/File.php index 83c9041c6aac..9bb3768d6112 100644 --- a/components/ILIAS/File/File.php +++ b/components/ILIAS/File/File.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilFileObjectAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/FileDelivery/FileDelivery.php b/components/ILIAS/FileDelivery/FileDelivery.php index d04dcb77eb5a..6c5a004f398c 100644 --- a/components/ILIAS/FileDelivery/FileDelivery.php +++ b/components/ILIAS/FileDelivery/FileDelivery.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\FileDelivery\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/FileServices/FileServices.php b/components/ILIAS/FileServices/FileServices.php index dab4815be7ae..9512e4c2bd0a 100644 --- a/components/ILIAS/FileServices/FileServices.php +++ b/components/ILIAS/FileServices/FileServices.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilFileServicesSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Filesystem/Filesystem.php b/components/ILIAS/Filesystem/Filesystem.php index 98e648e9bf75..b99733889aa9 100644 --- a/components/ILIAS/Filesystem/Filesystem.php +++ b/components/ILIAS/Filesystem/Filesystem.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilFileSystemSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Forum/Forum.php b/components/ILIAS/Forum/Forum.php index 19a56c14a736..fba2781c4374 100644 --- a/components/ILIAS/Forum/Forum.php +++ b/components/ILIAS/Forum/Forum.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilForumSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/GlobalCache/GlobalCache.php b/components/ILIAS/GlobalCache/GlobalCache.php index f525b7ae917b..901f1fd0bf4f 100644 --- a/components/ILIAS/GlobalCache/GlobalCache.php +++ b/components/ILIAS/GlobalCache/GlobalCache.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilGlobalCacheSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/GlobalScreen/GlobalScreen.php b/components/ILIAS/GlobalScreen/GlobalScreen.php index 0d236d7cd957..e00f762fa530 100644 --- a/components/ILIAS/GlobalScreen/GlobalScreen.php +++ b/components/ILIAS/GlobalScreen/GlobalScreen.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilGlobalScreenSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Glossary/Glossary.php b/components/ILIAS/Glossary/Glossary.php index 61af2998d610..44e264498239 100644 --- a/components/ILIAS/Glossary/Glossary.php +++ b/components/ILIAS/Glossary/Glossary.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilGlossarySetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Help/Help.php b/components/ILIAS/Help/Help.php index 814af435ff8f..9e5722b4ee90 100644 --- a/components/ILIAS/Help/Help.php +++ b/components/ILIAS/Help/Help.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Help\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Http_/Http_.php b/components/ILIAS/Http_/Http_.php index 435bca8c24d1..7665d5a9aaaf 100644 --- a/components/ILIAS/Http_/Http_.php +++ b/components/ILIAS/Http_/Http_.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilHttpSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/ILIASObject/ILIASObject.php b/components/ILIAS/ILIASObject/ILIASObject.php index 59df17e5c7e7..693bd5a293af 100644 --- a/components/ILIAS/ILIASObject/ILIASObject.php +++ b/components/ILIAS/ILIASObject/ILIASObject.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Object\Setup\ilObjectSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Imprint/Imprint.php b/components/ILIAS/Imprint/Imprint.php index cabb26941fb9..dfd9620c60bd 100644 --- a/components/ILIAS/Imprint/Imprint.php +++ b/components/ILIAS/Imprint/Imprint.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Imprint\Setup\ImprintUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/IndividualAssessment/IndividualAssessment.php b/components/ILIAS/IndividualAssessment/IndividualAssessment.php index f182f04c0f8d..03eadc651505 100644 --- a/components/ILIAS/IndividualAssessment/IndividualAssessment.php +++ b/components/ILIAS/IndividualAssessment/IndividualAssessment.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilIndividualAssessmentSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/ItemGroup/ItemGroup.php b/components/ILIAS/ItemGroup/ItemGroup.php index 43b9ea9a82ad..dee1609f13bb 100644 --- a/components/ILIAS/ItemGroup/ItemGroup.php +++ b/components/ILIAS/ItemGroup/ItemGroup.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\ItemGroup\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/LTI/LTI.php b/components/ILIAS/LTI/LTI.php index 319178367e28..397cb8506163 100644 --- a/components/ILIAS/LTI/LTI.php +++ b/components/ILIAS/LTI/LTI.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLTISetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/LTIConsumer/LTIConsumer.php b/components/ILIAS/LTIConsumer/LTIConsumer.php index 2f453b8225c9..96e3dc4e3f50 100644 --- a/components/ILIAS/LTIConsumer/LTIConsumer.php +++ b/components/ILIAS/LTIConsumer/LTIConsumer.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLTIConsumerSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Language/Language.php b/components/ILIAS/Language/Language.php index f06de5450288..6526d6699345 100644 --- a/components/ILIAS/Language/Language.php +++ b/components/ILIAS/Language/Language.php @@ -35,6 +35,15 @@ public function init( $define[] = \ILIAS\Language\Language::class; $implement[\ILIAS\Language\Language::class] = fn() => + $internal[\ilSetupLanguage::class]; + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLanguageSetupAgent( + $pull[\ILIAS\Refinery\Factory::class], + $internal[\ilSetupLanguage::class] + ); + + $internal[\ilSetupLanguage::class] = fn() => new \ilSetupLanguage("en"); } } diff --git a/components/ILIAS/Language/classes/Setup/class.ilLanguageSetupAgent.php b/components/ILIAS/Language/classes/Setup/class.ilLanguageSetupAgent.php index d6864a86b2f1..b7b13b82f0e4 100755 --- a/components/ILIAS/Language/classes/Setup/class.ilLanguageSetupAgent.php +++ b/components/ILIAS/Language/classes/Setup/class.ilLanguageSetupAgent.php @@ -32,7 +32,6 @@ class ilLanguageSetupAgent implements Setup\Agent public function __construct( Refinery\Factory $refinery, - $_, // this is Data\Factory, but we do not need it... \ilSetupLanguage $il_setup_language ) { $this->refinery = $refinery; diff --git a/components/ILIAS/LearningModule/LearningModule.php b/components/ILIAS/LearningModule/LearningModule.php index 4e650caa6842..77413b3aba4c 100644 --- a/components/ILIAS/LearningModule/LearningModule.php +++ b/components/ILIAS/LearningModule/LearningModule.php @@ -32,6 +32,14 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLearningModuleSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\LearningModule\Setup\DBUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/LearningSequence/LearningSequence.php b/components/ILIAS/LearningSequence/LearningSequence.php index 7a74a4776b30..da1e15deb6c2 100644 --- a/components/ILIAS/LearningSequence/LearningSequence.php +++ b/components/ILIAS/LearningSequence/LearningSequence.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLearningSequenceSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Link/Link.php b/components/ILIAS/Link/Link.php index f2df8a4aadf8..58ce7a52e02f 100644 --- a/components/ILIAS/Link/Link.php +++ b/components/ILIAS/Link/Link.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Link\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Logging/Logging.php b/components/ILIAS/Logging/Logging.php index d80ca05e6232..e1564b1b0008 100644 --- a/components/ILIAS/Logging/Logging.php +++ b/components/ILIAS/Logging/Logging.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilLoggingSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Mail/Mail.php b/components/ILIAS/Mail/Mail.php index e4d5efacb94f..4ee492005fb8 100644 --- a/components/ILIAS/Mail/Mail.php +++ b/components/ILIAS/Mail/Mail.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilMailSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/MathJax/MathJax.php b/components/ILIAS/MathJax/MathJax.php index 1033c5b3670d..f9b0989c5f16 100644 --- a/components/ILIAS/MathJax/MathJax.php +++ b/components/ILIAS/MathJax/MathJax.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilMathJaxSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/MediaCast/MediaCast.php b/components/ILIAS/MediaCast/MediaCast.php index 4138c3b85bcc..efbb27cabcf6 100644 --- a/components/ILIAS/MediaCast/MediaCast.php +++ b/components/ILIAS/MediaCast/MediaCast.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\MediaCast\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/MediaObjects/MediaObjects.php b/components/ILIAS/MediaObjects/MediaObjects.php index b16686ecd0d5..2945a7d0e793 100644 --- a/components/ILIAS/MediaObjects/MediaObjects.php +++ b/components/ILIAS/MediaObjects/MediaObjects.php @@ -32,6 +32,13 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilMediaObjectSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\MediaObjects\Setup\DBUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/MetaData/MetaData.php b/components/ILIAS/MetaData/MetaData.php index c5fa0e093757..47da4cda24b6 100644 --- a/components/ILIAS/MetaData/MetaData.php +++ b/components/ILIAS/MetaData/MetaData.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilMDSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Notes/Notes.php b/components/ILIAS/Notes/Notes.php index c37e5b7bd111..d58a1ba52617 100644 --- a/components/ILIAS/Notes/Notes.php +++ b/components/ILIAS/Notes/Notes.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Notes\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Notifications/Notifications.php b/components/ILIAS/Notifications/Notifications.php index d6316e05fe12..cf038baef7a2 100644 --- a/components/ILIAS/Notifications/Notifications.php +++ b/components/ILIAS/Notifications/Notifications.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilNotificationUpdateAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/OrgUnit/OrgUnit.php b/components/ILIAS/OrgUnit/OrgUnit.php index 467a4c7aae0e..be8280cc39d4 100644 --- a/components/ILIAS/OrgUnit/OrgUnit.php +++ b/components/ILIAS/OrgUnit/OrgUnit.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilOrgUnitSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/PDFGeneration/PDFGeneration.php b/components/ILIAS/PDFGeneration/PDFGeneration.php index c48d9a74af9f..2dcfbe346e87 100644 --- a/components/ILIAS/PDFGeneration/PDFGeneration.php +++ b/components/ILIAS/PDFGeneration/PDFGeneration.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilPDFGenerationSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Portfolio/Portfolio.php b/components/ILIAS/Portfolio/Portfolio.php index b24a945e08ed..f21b592c9e51 100644 --- a/components/ILIAS/Portfolio/Portfolio.php +++ b/components/ILIAS/Portfolio/Portfolio.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Portfolio\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/PrivacySecurity/PrivacySecurity.php b/components/ILIAS/PrivacySecurity/PrivacySecurity.php index bb41c24abe01..ec358c949f33 100644 --- a/components/ILIAS/PrivacySecurity/PrivacySecurity.php +++ b/components/ILIAS/PrivacySecurity/PrivacySecurity.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilPrivacySecuritySetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Radius/Radius.php b/components/ILIAS/Radius/Radius.php index 0b70050325c4..fa73a53130bb 100644 --- a/components/ILIAS/Radius/Radius.php +++ b/components/ILIAS/Radius/Radius.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilRadiusAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Registration/Registration.php b/components/ILIAS/Registration/Registration.php index 9fe580f4461a..17a48df540c5 100644 --- a/components/ILIAS/Registration/Registration.php +++ b/components/ILIAS/Registration/Registration.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilRegistrationAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Repository/Repository.php b/components/ILIAS/Repository/Repository.php index 233d4d21ec3a..f6a8a177a673 100644 --- a/components/ILIAS/Repository/Repository.php +++ b/components/ILIAS/Repository/Repository.php @@ -32,6 +32,13 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilRepositorySetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Repository\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/ResourceStorage/ResourceStorage.php b/components/ILIAS/ResourceStorage/ResourceStorage.php index 1d1f4f55fd46..755b70a172a9 100644 --- a/components/ILIAS/ResourceStorage/ResourceStorage.php +++ b/components/ILIAS/ResourceStorage/ResourceStorage.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilResourceStorageSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Session/Session.php b/components/ILIAS/Session/Session.php index fa867f7f77c2..0743ca655764 100644 --- a/components/ILIAS/Session/Session.php +++ b/components/ILIAS/Session/Session.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilSessionSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Setup/Setup.php b/components/ILIAS/Setup/Setup.php index 8c41b00e9597..ee87286b0e94 100644 --- a/components/ILIAS/Setup/Setup.php +++ b/components/ILIAS/Setup/Setup.php @@ -44,6 +44,12 @@ public function init( $internal["command.migrate"] ); + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilCommonSetupAgent( + $pull[\ILIAS\Refinery\Factory::class], + $pull[\ILIAS\Data\Factory::class] + ); + $internal["command.install"] = fn() => new \ILIAS\Setup\CLI\InstallCommand( $internal["agent_finder"], @@ -83,21 +89,13 @@ public function init( new \ilUseRootConfirmed() ]; - $internal["common_agent"] = fn() => - new \ilSetupAgent( - $pull[\ILIAS\Refinery\Factory::class], - $pull[\ILIAS\Data\Factory::class] - ); - $internal["agent_finder"] = fn() => new \ILIAS\Setup\ImplementationOfAgentFinder( $pull[\ILIAS\Refinery\Factory::class], $pull[\ILIAS\Data\Factory::class], $use[\ILIAS\Language\Language::class], $internal["interface_finder"], - [ - "common" => $internal["common_agent"] - ] + $seek[\ILIAS\Setup\Agent::class] ); $internal["config_reader"] = fn() => diff --git a/components/ILIAS/Setup/src/AgentFinder.php b/components/ILIAS/Setup/src/AgentFinder.php index 44a76953fb7d..132a91599001 100755 --- a/components/ILIAS/Setup/src/AgentFinder.php +++ b/components/ILIAS/Setup/src/AgentFinder.php @@ -30,7 +30,7 @@ public function getAgents(): AgentCollection; /** * Collect core agents from the system bundled in a collection. */ - public function getCoreAgents(): AgentCollection; + public function getComponentAgents(): AgentCollection; /** * Get a agent from a specific plugin. diff --git a/components/ILIAS/Setup/src/CLI/HasAgent.php b/components/ILIAS/Setup/src/CLI/HasAgent.php index 7822cb4548ef..711abfc43b34 100755 --- a/components/ILIAS/Setup/src/CLI/HasAgent.php +++ b/components/ILIAS/Setup/src/CLI/HasAgent.php @@ -47,7 +47,7 @@ protected function getRelevantAgent(InputInterface $input): Agent if ($input->hasOption("no-plugins") && $input->getOption("no-plugins")) { // The agents of the core are in all folders but the customizing folder. - return $this->agent_finder->getCoreAgents(); + return $this->agent_finder->getComponentAgents(); } if ($input->hasOption("plugin")) { diff --git a/components/ILIAS/Setup/src/ImplementationOfAgentFinder.php b/components/ILIAS/Setup/src/ImplementationOfAgentFinder.php index 21d9161e3d9b..c5eb5cd8ac83 100755 --- a/components/ILIAS/Setup/src/ImplementationOfAgentFinder.php +++ b/components/ILIAS/Setup/src/ImplementationOfAgentFinder.php @@ -25,6 +25,8 @@ class ImplementationOfAgentFinder implements AgentFinder { + protected array|AgentCollection $component_agents; + /** * @var array $predefined_agents */ @@ -33,8 +35,9 @@ public function __construct( protected Data\Factory $data_factory, protected \ILIAS\Language\Language $lng, protected ImplementationOfInterfaceFinder $interface_finder, - protected array $predefined_agents = [] + $component_agents ) { + $this->component_agents = $component_agents; } /** @@ -44,7 +47,7 @@ public function __construct( */ public function getAgents(): AgentCollection { - $agents = $this->getCoreAgents(); + $agents = $this->getComponentAgents(); // Get a list of existing plugins in the system. $plugins = $this->getPluginNames(); @@ -63,34 +66,23 @@ public function getAgents(): AgentCollection /** * Collect core agents from the system bundled in a collection. */ - public function getCoreAgents(): AgentCollection + public function getComponentAgents(): AgentCollection { - // Initialize the agents. - $agents = new AgentCollection( - $this->refinery, - $this->predefined_agents - ); + if ($this->component_agents instanceof AgentCollection) { + return $this->component_agents; + } - // This is a list of all agent classes in the system (which we don't want to ignore). - $agent_classes = $this->interface_finder->getMatchingClassNames( - Agent::class, - ["[/]Customizing/.*"] - ); + $agents = new AgentCollection($this->refinery, []); - foreach ($agent_classes as $class_name) { - if ($class_name != 'ILIAS\Setup\AgentCollection') { - $agents = $agents->withAdditionalAgent( - $this->getAgentNameByClassName($class_name), - new $class_name( - $this->refinery, - $this->data_factory, - $this->lng - ) - ); - } + foreach ($this->component_agents as $agent) { + $agents = $agents->withAdditionalAgent( + $this->getAgentNameByClassName(get_class($agent)), + $agent + ); } - return $agents; + $this->component_agents = $agents; + return $this->component_agents; } /** diff --git a/components/ILIAS/Setup/tests/CLI/HasAgentTest.php b/components/ILIAS/Setup/tests/CLI/HasAgentTest.php index 7bcc2ce6c4d7..19700d66121a 100755 --- a/components/ILIAS/Setup/tests/CLI/HasAgentTest.php +++ b/components/ILIAS/Setup/tests/CLI/HasAgentTest.php @@ -86,7 +86,7 @@ public function testGetRelevantAgentWithNoPluginOption(): void $this->agent_finder ->expects($this->once()) - ->method("getCoreAgents") + ->method("getComponentAgents") ->with() ->willReturn($ac); diff --git a/components/ILIAS/Skill/Skill.php b/components/ILIAS/Skill/Skill.php index 4a1d3660f114..79dab88e0866 100644 --- a/components/ILIAS/Skill/Skill.php +++ b/components/ILIAS/Skill/Skill.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilSkillSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/StaticURL/StaticURL.php b/components/ILIAS/StaticURL/StaticURL.php index a5abd92597ae..f4ce746465f3 100644 --- a/components/ILIAS/StaticURL/StaticURL.php +++ b/components/ILIAS/StaticURL/StaticURL.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\StaticURL\SetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/StudyProgramme/StudyProgramme.php b/components/ILIAS/StudyProgramme/StudyProgramme.php index 7979948e8366..a3c7588e682a 100644 --- a/components/ILIAS/StudyProgramme/StudyProgramme.php +++ b/components/ILIAS/StudyProgramme/StudyProgramme.php @@ -32,6 +32,5 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... } } diff --git a/components/ILIAS/Style/Style.php b/components/ILIAS/Style/Style.php index 4cf58c45a57f..61b1ac867f19 100644 --- a/components/ILIAS/Style/Style.php +++ b/components/ILIAS/Style/Style.php @@ -32,6 +32,14 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilStyleSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Style\Content\Setup\ContentStyleAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/SystemFolder/SystemFolder.php b/components/ILIAS/SystemFolder/SystemFolder.php index 4e50df840677..9de3b1769ce4 100644 --- a/components/ILIAS/SystemFolder/SystemFolder.php +++ b/components/ILIAS/SystemFolder/SystemFolder.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilSystemFolderSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Test/Test.php b/components/ILIAS/Test/Test.php index b94643c51c28..e24d8cdf6c2d 100644 --- a/components/ILIAS/Test/Test.php +++ b/components/ILIAS/Test/Test.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilTestSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/TestQuestionPool/TestQuestionPool.php b/components/ILIAS/TestQuestionPool/TestQuestionPool.php index 1648873c8679..19138ef9a455 100644 --- a/components/ILIAS/TestQuestionPool/TestQuestionPool.php +++ b/components/ILIAS/TestQuestionPool/TestQuestionPool.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilTestQuestionPoolSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Tree/Tree.php b/components/ILIAS/Tree/Tree.php index 01b231a62caf..25db7b4663e8 100644 --- a/components/ILIAS/Tree/Tree.php +++ b/components/ILIAS/Tree/Tree.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilTreeSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/UICore/UICore.php b/components/ILIAS/UICore/UICore.php index b03d9ce7ef3f..e0c429d331f4 100644 --- a/components/ILIAS/UICore/UICore.php +++ b/components/ILIAS/UICore/UICore.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilUICoreSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/User/User.php b/components/ILIAS/User/User.php index 5c65638672db..890dd8b537ac 100644 --- a/components/ILIAS/User/User.php +++ b/components/ILIAS/User/User.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilUserSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Utilities/Utilities.php b/components/ILIAS/Utilities/Utilities.php index 3d460d72dfee..9ebe2ff81096 100644 --- a/components/ILIAS/Utilities/Utilities.php +++ b/components/ILIAS/Utilities/Utilities.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilUtilitiesSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/VirusScanner/VirusScanner.php b/components/ILIAS/VirusScanner/VirusScanner.php index c2956779bc7e..72171385f10d 100644 --- a/components/ILIAS/VirusScanner/VirusScanner.php +++ b/components/ILIAS/VirusScanner/VirusScanner.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilVirusScannerSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/WOPI/WOPI.php b/components/ILIAS/WOPI/WOPI.php index 505f10cf3939..eef1052b06ba 100644 --- a/components/ILIAS/WOPI/WOPI.php +++ b/components/ILIAS/WOPI/WOPI.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilWOPISetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/WebResource/WebResource.php b/components/ILIAS/WebResource/WebResource.php index 87a355e9e73a..eb5fdc057082 100644 --- a/components/ILIAS/WebResource/WebResource.php +++ b/components/ILIAS/WebResource/WebResource.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilWebResourceSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/WebServices/WebServices.php b/components/ILIAS/WebServices/WebServices.php index 523449207362..6ae160704ecf 100644 --- a/components/ILIAS/WebServices/WebServices.php +++ b/components/ILIAS/WebServices/WebServices.php @@ -32,6 +32,14 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilWebServicesSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); + + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilECSAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Wiki/Wiki.php b/components/ILIAS/Wiki/Wiki.php index d24f25ae6da2..2c433582a4ee 100644 --- a/components/ILIAS/Wiki/Wiki.php +++ b/components/ILIAS/Wiki/Wiki.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ILIAS\Wiki\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/WorkflowEngine/WorkflowEngine.php b/components/ILIAS/WorkflowEngine/WorkflowEngine.php index f57eff024ffc..8f871826a7a8 100644 --- a/components/ILIAS/WorkflowEngine/WorkflowEngine.php +++ b/components/ILIAS/WorkflowEngine/WorkflowEngine.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = fn() => + new \ilWorkflowEngineSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/setup_/classes/class.ilSetupAgent.php b/components/ILIAS/setup_/classes/class.ilCommonSetupAgent.php similarity index 99% rename from components/ILIAS/setup_/classes/class.ilSetupAgent.php rename to components/ILIAS/setup_/classes/class.ilCommonSetupAgent.php index 4752fb554691..f8cdf48422ea 100755 --- a/components/ILIAS/setup_/classes/class.ilSetupAgent.php +++ b/components/ILIAS/setup_/classes/class.ilCommonSetupAgent.php @@ -28,7 +28,7 @@ * general all this stuff here is supposed to go elsewhere once we find out * which service it really belongs to. */ -class ilSetupAgent implements Setup\Agent +class ilCommonSetupAgent implements Setup\Agent { public const PHP_MEMORY_LIMIT = "128M";