diff --git a/.gitignore b/.gitignore
index 70f81a2..02b4609 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,3 @@
.idea
-**/lang/*
-!**/lang/ilias_de.lang
-!**/lang/ilias_en.lang
-#LuceneObjectDefinition.xml
#node_modules
-#plugin.php
-#plugin.xml
#vendor
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05e8552..3e48f29 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,15 @@
-FluxPublishUtils:
- stage: build
- image: docker-registry.fluxpublisher.ch/flux-publish-utils:latest
- script:
- - "false"
- only:
- - /^main$/
+stages:
+ - publish-utils
+
+publish-utils:
+ stage: publish-utils
+ image: php:cli-alpine
+ script:
+ - (if [ ! -d flux-publish-utils ]; then mkdir -p flux-publish-utils && cd flux-publish-utils && wget -O - https://github.com/fluxfw/flux-publish-utils/releases/download/v2022-07-12-1/flux-publish-utils-v2022-07-12-1-build.tar.gz | tar -xz --strip-components=1; fi)
+ - flux-publish-utils/bin/publish-utils.php
+ cache:
+ key: publish-utils
+ paths:
+ - flux-publish-utils
+ only:
+ - main
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f508f0d..d5870c8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog
+## [1.3.0]
+- Clean up
+
## [1.2.0]
- Switched to main branch
- ILIAS 7 support
diff --git a/README.md b/README.md
index 2f46525..6eb57c2 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Start at your ILIAS root directory
```bash
mkdir -p Customizing/global/plugins/Services/Cron/CronHook
cd Customizing/global/plugins/Services/Cron/CronHook
-git clone https://github.com/fluxapps/SrUserEnrolmentCron.git SrUserEnrolmentCron
+git clone https://github.com/fluxfw/SrUserEnrolmentCron.git SrUserEnrolmentCron
```
Update, activate and config the plugin in the ILIAS Plugin Administration
@@ -25,7 +25,7 @@ Update, activate and config the plugin in the ILIAS Plugin Administration
### Base plugin
-First you need to install the [SrUserEnrolment](https://github.com/fluxapps/SrUserEnrolment) plugin
+First you need to install the [SrUserEnrolment](https://github.com/fluxfw/SrUserEnrolment) plugin
### Cron jobs
diff --git a/composer.json b/composer.json
index 26580bc..051ad99 100644
--- a/composer.json
+++ b/composer.json
@@ -1,16 +1,7 @@
{
"name": "srag/sruserenrolmentcron",
"description": "Cron jobs for enrol by rule and enrolment workflow",
- "version": "1.2.0",
- "extra": {
- "ilias_plugin": {
- "id": "srusrenrcron",
- "name": "SrUserEnrolmentCron",
- "ilias_min_version": "6.0",
- "ilias_max_version": "7.999",
- "slot": "Services/Cron/CronHook"
- }
- },
+ "version": "1.3.0",
"type": "project",
"keywords": [
"cron",
@@ -18,19 +9,9 @@
"job",
"plugin"
],
- "homepage": "https://github.com/fluxapps/SrUserEnrolmentCron",
"license": "GPL-3.0-only",
- "authors": [
- {
- "name": "fluxlabs",
- "email": "support@fluxlabs.ch",
- "homepage": "https://fluxlabs.ch",
- "role": "Developer"
- }
- ],
"require": {
"php": ">=7.2",
- "srag/generateplugininfoshelper": ">=0.1.0",
"srag/librariesnamespacechanger": ">=0.1.0"
},
"autoload": {
@@ -51,11 +32,7 @@
},
"scripts": {
"pre-autoload-dump": [
- "srag\\LibrariesNamespaceChanger\\LibrariesNamespaceChanger::rewriteLibrariesNamespaces",
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\GeneratePluginPhpAndXml::generatePluginPhpAndXml"
- ],
- "update-version": [
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\UpdateVersion::updateVersion"
+ "srag\\LibrariesNamespaceChanger\\LibrariesNamespaceChanger::rewriteLibrariesNamespaces"
]
}
}
diff --git a/composer.lock b/composer.lock
index ce66c2e..c627e28 100644
--- a/composer.lock
+++ b/composer.lock
@@ -6,51 +6,6 @@
],
"content-hash": "8f8bd2153162a139cac61dd7118e8db5",
"packages": [
- {
- "name": "srag/generateplugininfoshelper",
- "version": "2.12.0",
- "source": {
- "type": "git",
- "url": "https://github.com/fluxapps/GeneratePluginInfosHelper.git",
- "reference": "ac48769122303e52c757f581c1b7d68a03acc640"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/fluxapps/GeneratePluginInfosHelper/zipball/ac48769122303e52c757f581c1b7d68a03acc640",
- "reference": "ac48769122303e52c757f581c1b7d68a03acc640",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "srag\\GeneratePluginInfosHelper\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-3.0-only"
- ],
- "authors": [
- {
- "name": "fluxlabs",
- "email": "support@fluxlabs.ch",
- "homepage": "https://fluxlabs.ch",
- "role": "Developer"
- }
- ],
- "description": "Automatic generate plugin infos such README.md, plugin.php, plugin.xml, ... from composer.json",
- "homepage": "https://github.com/fluxapps/GeneratePluginInfosHelper",
- "keywords": [
- "Infos",
- "generate",
- "helper",
- "plugin"
- ],
- "time": "2021-07-20T08:32:36+00:00"
- },
{
"name": "srag/librariesnamespacechanger",
"version": "0.16.1",
diff --git a/plugin.php b/plugin.php
index f822ca5..7fca778 100644
--- a/plugin.php
+++ b/plugin.php
@@ -1,11 +1,10 @@
-
-
-
-
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 01ee26e..4cd530e 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -7,8 +7,5 @@
return array(
'ilSrUserEnrolmentCronPlugin' => $baseDir . '/classes/class.ilSrUserEnrolmentCronPlugin.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\GeneratePluginPhpAndXml' => $vendorDir . '/srag/generateplugininfoshelper/src/GeneratePluginPhpAndXml.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\GeneratePluginReadme' => $vendorDir . '/srag/generateplugininfoshelper/src/GeneratePluginReadme.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\UpdateVersion' => $vendorDir . '/srag/generateplugininfoshelper/src/UpdateVersion.php',
'srag\\LibrariesNamespaceChanger\\LibrariesNamespaceChanger' => $vendorDir . '/srag/librariesnamespacechanger/src/LibrariesNamespaceChanger.php',
);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 0bb819b..b8e4a21 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -8,5 +8,4 @@
return array(
'srag\\Plugins\\SrUserEnrolmentCron\\' => array($baseDir . '/src'),
'srag\\LibrariesNamespaceChanger\\' => array($vendorDir . '/srag/librariesnamespacechanger/src'),
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\' => array($vendorDir . '/srag/generateplugininfoshelper/src'),
);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 6bc340e..828ef17 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -15,7 +15,6 @@ class ComposerStaticInit44a45322a214a2f83ec68cbe7753e9f8
array (
'srag\\Plugins\\SrUserEnrolmentCron\\' => 33,
'srag\\LibrariesNamespaceChanger\\' => 31,
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\' => 51,
),
);
@@ -28,17 +27,10 @@ class ComposerStaticInit44a45322a214a2f83ec68cbe7753e9f8
array (
0 => __DIR__ . '/..' . '/srag/librariesnamespacechanger/src',
),
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\' =>
- array (
- 0 => __DIR__ . '/..' . '/srag/generateplugininfoshelper/src',
- ),
);
public static $classMap = array (
'ilSrUserEnrolmentCronPlugin' => __DIR__ . '/../..' . '/classes/class.ilSrUserEnrolmentCronPlugin.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\GeneratePluginPhpAndXml' => __DIR__ . '/..' . '/srag/generateplugininfoshelper/src/GeneratePluginPhpAndXml.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\GeneratePluginReadme' => __DIR__ . '/..' . '/srag/generateplugininfoshelper/src/GeneratePluginReadme.php',
- 'srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\UpdateVersion' => __DIR__ . '/..' . '/srag/generateplugininfoshelper/src/UpdateVersion.php',
'srag\\LibrariesNamespaceChanger\\LibrariesNamespaceChanger' => __DIR__ . '/..' . '/srag/librariesnamespacechanger/src/LibrariesNamespaceChanger.php',
);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 779d2ac..a3acbbc 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,51 +1,4 @@
[
- {
- "name": "srag/generateplugininfoshelper",
- "version": "2.12.0",
- "version_normalized": "2.12.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/fluxapps/GeneratePluginInfosHelper.git",
- "reference": "ac48769122303e52c757f581c1b7d68a03acc640"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/fluxapps/GeneratePluginInfosHelper/zipball/ac48769122303e52c757f581c1b7d68a03acc640",
- "reference": "ac48769122303e52c757f581c1b7d68a03acc640",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2"
- },
- "time": "2021-07-20T08:32:36+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-3.0-only"
- ],
- "authors": [
- {
- "name": "fluxlabs",
- "email": "support@fluxlabs.ch",
- "homepage": "https://fluxlabs.ch",
- "role": "Developer"
- }
- ],
- "description": "Automatic generate plugin infos such README.md, plugin.php, plugin.xml, ... from composer.json",
- "homepage": "https://github.com/fluxapps/GeneratePluginInfosHelper",
- "keywords": [
- "Infos",
- "generate",
- "helper",
- "plugin"
- ]
- },
{
"name": "srag/librariesnamespacechanger",
"version": "0.16.1",
diff --git a/vendor/srag/generateplugininfoshelper/.gitignore b/vendor/srag/generateplugininfoshelper/.gitignore
deleted file mode 100644
index 82cfc4e..0000000
--- a/vendor/srag/generateplugininfoshelper/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.idea
-composer.lock
-vendor
diff --git a/vendor/srag/generateplugininfoshelper/.gitlab-ci.yml b/vendor/srag/generateplugininfoshelper/.gitlab-ci.yml
deleted file mode 100644
index 05e8552..0000000
--- a/vendor/srag/generateplugininfoshelper/.gitlab-ci.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-FluxPublishUtils:
- stage: build
- image: docker-registry.fluxpublisher.ch/flux-publish-utils:latest
- script:
- - "false"
- only:
- - /^main$/
diff --git a/vendor/srag/generateplugininfoshelper/CHANGELOG.md b/vendor/srag/generateplugininfoshelper/CHANGELOG.md
deleted file mode 100644
index 9123aa7..0000000
--- a/vendor/srag/generateplugininfoshelper/CHANGELOG.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# Changelog
-
-## [2.12.0]
-- Deprecate GeneratePluginReadme
-
-## [2.11.0]
-- Min PHP 7.2
-
-## [2.10.4]
-- Change utils url
-
-## [2.10.3]
-- Update urls
-
-## [2.10.2]
-- Update readme
-
-## [2.10.1]
-- `UpdateVersion`
-
-## [2.10.0]
-- `UpdateVersion`
-
-## [2.9.4]
-- Update project url
-
-## [2.9.3]
-- Revert change to fluxfw prefix
-
-## [2.9.2]
-- Revert gitlab composer registry
-
-## [2.9.1]
-- Change to fluxfw prefix
-
-## [2.9.0]
-- Gitlab composer registry
-
-## [2.8.0]
-- Add `supports_cli_setup` support
-
-## [2.7.0]
-- `long_description_template` config
-
-## [2.6.2]
-- Fix generate `plugin.xml`
-
-## [2.6.1]
-- Update readme
-- Update `Adjustment suggestions`
-
-## [2.6.0]
-- Possibility to pass `$version` manually
-
-## [2.5.0]
-- Possibility to pass `$extra_ilias_plugin` manually
-
-## [2.4.5]
-- Fix doc folder
-
-## [2.4.4]
-- Autogenerated comment only on composer script
-
-## [2.4.3]
-- Log only on composer script
-
-## [2.4.2]
-- Pass template per code
-- Throw exception not die
-
-## [2.4.1]
-- Possibility to run without composer script
-
-## [2.4.0]
-- Possibility to run without composer script
-
-## [2.3.3]
-- Move requirements before installation
-- Move doc/DESCRIPTION.md to src/LONG_DESCRIPTION.md
-
-## [2.3.2]
-- Generate readme
-
-## [2.3.1]
-- Only store README.md if changed
-- Only replace images docs links
-
-## [2.3.0]
-- Generate readme
-
-## [2.2.1]
-- Library template
-
-## [2.2.0]
-- Library template
-
-## [2.1.5]
-- Fix library template
-
-## [2.1.4]
-- Fix other missing variables in composer.json
-
-## [2.1.3]
-- Fix other missing variables in composer.json
-
-## [2.1.2]
-- Fix other missing variables in composer.json
-
-## [2.1.1]
-- Fix missing extra > ilias_plugin
-
-## [2.1.0]
-- Required template declaration in composer.json
-- Library template
-
-## [2.0.0]
-- Generate short and long description in README.md
-- Generate licence in README.md
-- Translate plugin SLA to english
-- Only load old `plugin.php` infos if file exists
-- Remove deprecated `UpdatePluginReadme`
-
-## [1.0.1]
-- Typo in name
-
-## [1.0.0]
-- First version
diff --git a/vendor/srag/generateplugininfoshelper/README.md b/vendor/srag/generateplugininfoshelper/README.md
deleted file mode 100644
index 2a33376..0000000
--- a/vendor/srag/generateplugininfoshelper/README.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# srag/generateplugininfoshelper Library
-
-Automatic generate plugin infos such README.md, plugin.php, plugin.xml, ... from composer.json
-
-This project is licensed under the GPL-3.0-only license
-
-## Usage
-
-### Composer
-
-First add the following to your `composer.json` file:
-
-```json
-"require": {
- "srag/generateplugininfoshelper": ">=1.0.0"
-},
-```
-
-And run a `composer install`.
-
-If you deliver your plugin, the plugin has it's own copy of this library and the user doesn't need to install the library.
-
-Tip: Because of multiple autoloaders of plugins, it could be, that different versions of this library exists and suddenly your plugin use an older or a newer version of an other plugin!
-
-So I recommand to use [srag/librariesnamespacechanger](https://packagist.org/packages/srag/librariesnamespacechanger) in your plugin.
-
-### GeneratePluginPhpAndXml
-
-Generate `plugin.php` and `plugin.xml` and `LuceneObjectDefinition.xml` for ILIAS plugins from `composer.json`
-
-Complete your `composer.json` with
-
-```json
- ...
- "version": "x.y.z",
- ...
- "extra": {
- "ilias_plugin": {
- "id": "x",
- "name" => "X",
- "ilias_min_version": "x.y.z",
- "ilias_max_version": "x.y.z",
- "learning_progress": true | false,
- "lucene_search": true | false,
- "supports_export": true | false,
- "supports_cli_setup": true | false,
- "slot": "x/y/z"
- "events": [
- {
- "id": "X/Y",
- "type": "listen|raise"
- }
- ]
- }
- },
- ...
- "authors": [
- {
- "name": "...",
- "email": "...",
- "homepage": "...",
- "role": "Developer"
- }
- ],
- ...
-```
-
-#### Composer script
-
-##### Automatic
-
-```json
- ...
- "pre-autoload-dump": [
- ...,
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\x\\GeneratePluginPhpAndXml::generatePluginPhpAndXml"
- ]
- ...
-```
-
-```bash
-composer du
-```
-
-##### Manual
-
-```json
- ...
- "generate-plugin-php-and-xml": [
- ...,
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\x\\GeneratePluginPhpAndXml::generatePluginPhpAndXml"
- ]
- ...
-```
-
-```bash
-composer generate-plugin-php-and-xml
-```
-
-#### In code
-
-```php
-...
-use srag\GeneratePluginInfosHelper\SrUserEnrolmentCron\x\GeneratePluginPhpAndXml;
-...
-GeneratePluginPhpAndXml::getInstance()->doGeneratePluginPhpAndXml(string $project_root, ?string $version = null, ?array $extra_ilias_plugin = null, bool $autogenerated_comment = false, bool $log = false)
-...
-```
-
-### UpdateVersion
-
-Auto update version in `composer.json` and `CHANGELOG.md`
-
-- If the latest version in `CHANGELOG.md` is newer than the version in `composer.json`
- - It just sets the version in `CHANGELOG.md` to the version in `composer.json` and skip updating version
-- If the version in `composer.json` is missing
- - It just sets the version to `1.0.0` and skip updating version
-- If available a `x` version in `CHANGELOG.md`, it will be replaced with the new version
- - Otherwise a new version is added to `CHANGELOG.md` (With `TODO`)
-
-#### Composer script
-
-```json
- ...
- "update-version": [
- ...,
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\x\\UpdateVersion::updateVersion"
- ]
- ...
-```
-
-```bash
-composer update-version [update_type] [todo_changelog]
-```
-
-#### In code
-
-```php
-...
-use srag\GeneratePluginInfosHelper\SrUserEnrolmentCron\x\UpdateVersion;
-...
-UpdateVersion::getInstance()->doGeneratePluginReadme(string $project_root, int $update_type = UpdateVersion::UPDATE_TYPE_PATCH|UpdateVersion::UPDATE_TYPE_MINOR|UpdateVersion::UPDATE_TYPE_MAJOR, ?string $todo_changelog = null, bool $log = false)
-...
-```
-
-## Requirements
-
-* PHP >=7.2
diff --git a/vendor/srag/generateplugininfoshelper/composer.json b/vendor/srag/generateplugininfoshelper/composer.json
deleted file mode 100644
index 084474d..0000000
--- a/vendor/srag/generateplugininfoshelper/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "srag/generateplugininfoshelper",
- "description": "Automatic generate plugin infos such README.md, plugin.php, plugin.xml, ... from composer.json",
- "version": "2.12.0",
- "type": "library",
- "keywords": [
- "generate",
- "helper",
- "infos",
- "plugin"
- ],
- "homepage": "https://github.com/fluxapps/GeneratePluginInfosHelper",
- "license": "GPL-3.0-only",
- "authors": [
- {
- "name": "fluxlabs",
- "email": "support@fluxlabs.ch",
- "homepage": "https://fluxlabs.ch",
- "role": "Developer"
- }
- ],
- "require": {
- "php": ">=7.2"
- },
- "autoload": {
- "psr-4": {
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\": "src/"
- }
- },
- "config": {
- "classmap-authoritative": true,
- "optimize-autoloader": true,
- "sort-packages": true
- },
- "scripts": {
- "update-version": [
- "srag\\GeneratePluginInfosHelper\\SrUserEnrolmentCron\\UpdateVersion::updateVersion"
- ]
- }
-}
diff --git a/vendor/srag/generateplugininfoshelper/src/GeneratePluginPhpAndXml.php b/vendor/srag/generateplugininfoshelper/src/GeneratePluginPhpAndXml.php
deleted file mode 100644
index 0055b16..0000000
--- a/vendor/srag/generateplugininfoshelper/src/GeneratePluginPhpAndXml.php
+++ /dev/null
@@ -1,509 +0,0 @@
-baseDir;
- }, $event->getComposer()->getConfig(), Config::class)(), "/");
-
- self::getInstance()->doGeneratePluginPhpAndXml($project_root, null, null, true, true);
- }
-
-
- /**
- * @return self
- */
- public static function getInstance() : self
- {
- if (self::$instance === null) {
- self::$instance = new self();
- }
-
- return self::$instance;
- }
-
-
- /**
- * @param string $project_root
- * @param string|null $version
- * @param array|null $extra_ilias_plugin
- * @param bool $autogenerated_comment
- * @param bool $log
- */
- public function doGeneratePluginPhpAndXml(
- string $project_root, /*?*/ string $version = null, /*?*/ array $extra_ilias_plugin = null,
- bool $autogenerated_comment = false,
- bool $log = false
- ) : void {
- $plugin_composer_json = json_decode(file_get_contents($project_root . "/" . self::PLUGIN_COMPOSER_JSON));
-
- $this->updateMissingVariablesComposerJson($project_root, $log, $plugin_composer_json, $version, $extra_ilias_plugin);
-
- $this->generatePluginPhp($plugin_composer_json, $version, $extra_ilias_plugin, $project_root, $autogenerated_comment, $log);
-
- $this->generatePluginXml($extra_ilias_plugin, $project_root, $autogenerated_comment, $log);
-
- $this->generateLuceneObjectDefinitionXml($extra_ilias_plugin, $project_root, $autogenerated_comment, $log);
- }
-
-
- /**
- * @param array $extra_ilias_plugin
- * @param string $project_root
- * @param bool $autogenerated_comment
- * @param bool $log
- */
- private function generateLuceneObjectDefinitionXml(array $extra_ilias_plugin, string $project_root, bool $autogenerated_comment, bool $log) : void
- {
- if (!empty($extra_ilias_plugin["lucene_search"])) {
- if ($log) {
- echo "(Re)generate " . self::LUCENE_OBJECT_DEFINITION_XML . "
-";
- }
-
- file_put_contents($project_root . "/" . self::LUCENE_OBJECT_DEFINITION_XML, '' . ($autogenerated_comment ? '
-' : '') . '
-
-
-
-
-
-');
- }
- }
-
-
- /**
- * @param stdClass $plugin_composer_json
- * @param string $version
- * @param array $extra_ilias_plugin
- * @param string $project_root
- * @param bool $autogenerated_comment
- * @param bool $log
- */
- private function generatePluginPhp(stdClass $plugin_composer_json, string $version, array $extra_ilias_plugin, string $project_root, bool $autogenerated_comment, bool $log) : void
- {
- if ($log) {
- echo "(Re)generate " . self::PLUGIN_PHP . "
-";
- }
-
- $plugins_vars = [
- "id" => strval($extra_ilias_plugin["id"]),
- "version" => $version,
- "ilias_min_version" => strval($extra_ilias_plugin["ilias_min_version"]),
- "ilias_max_version" => strval($extra_ilias_plugin["ilias_max_version"]),
- "responsible" => strval($plugin_composer_json->authors[0]->name),
- "responsible_mail" => strval($plugin_composer_json->authors[0]->email)
- ];
-
- if (!empty($extra_ilias_plugin["learning_progress"])) {
- $plugins_vars["learning_progress"] = true;
- }
-
- if (!empty($extra_ilias_plugin["supports_export"])) {
- $plugins_vars["supports_export"] = true;
- }
-
- if (!empty($extra_ilias_plugin["supports_cli_setup"])) {
- $plugins_vars["supports_cli_setup"] = true;
- }
-
- file_put_contents($project_root . "/" . self::PLUGIN_PHP, '' . ($autogenerated_comment ? '
-' : '') . '
-
-');
- }
-
-
- /**
- * @param string $variable
- * @param string $project_root
- *
- * @return string
- */
- private function getOldPluginVar(string $variable, string $project_root) : string
- {
- if (file_exists($project_root . "/" . self::PLUGIN_PHP)) {
- $plugin_php = file_get_contents($project_root . "/" . self::PLUGIN_PHP);
-
- $text = [];
-
- preg_match('/\\$' . $variable . '\\s*=\\s*["\']?([^"\']+)["\']?\\s*;/', $plugin_php, $text);
-
- if (is_array($text) && count($text) > 1) {
- $text = $text[1];
-
- if (is_string($text) && !empty($text)) {
- return $text;
- }
- }
- }
-
- return "";
- }
-
-
- /**
- * @param string $project_root
- * @param bool $log
- * @param stdClass $plugin_composer_json
- * @param string|null $version
- * @param array|null $extra_ilias_plugin
- */
- private function updateMissingVariablesComposerJson(
- string $project_root,
- bool $log,
- stdClass $plugin_composer_json, /*?*/ string &$version = null, /*?*/ array &$extra_ilias_plugin = null
- ) : void {
- $updated_composer_json = false;
- $extra_ilias_plugin_from_composer_json = false;
-
- if (empty($version)) {
- $old_version = $this->getOldPluginVar("version", $project_root);
- if (empty($plugin_composer_json->version) || (!empty($old_version) && version_compare($old_version, $plugin_composer_json->version, ">"))) {
- if ($log) {
- echo "Update missing or older " . self::PLUGIN_COMPOSER_JSON . " > version (" . ($plugin_composer_json->version ?? null) . ") from " . self::PLUGIN_PHP . " > version ("
- . $old_version . ")
-";
- }
-
- $plugin_composer_json->version = $old_version;
-
- $updated_composer_json = true;
- }
- $version = $plugin_composer_json->version;
- }
-
- if (empty($extra_ilias_plugin)) {
- if (empty($plugin_composer_json->extra)) {
- $plugin_composer_json->extra = (object) [];
-
- $updated_composer_json = true;
- }
-
- if (isset($plugin_composer_json->ilias_plugin)) {
- if ($log) {
- echo "Migrate " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin to " . self::PLUGIN_COMPOSER_JSON . " > extra > ilias_plugin
-";
- }
-
- $plugin_composer_json->extra->ilias_plugin = $plugin_composer_json->ilias_plugin;
-
- unset($plugin_composer_json->ilias_plugin);
-
- $updated_composer_json = true;
- }
-
- if (empty($plugin_composer_json->extra->ilias_plugin)) {
- $plugin_composer_json->extra->ilias_plugin = (object) [];
-
- $updated_composer_json = true;
- }
-
- $extra_ilias_plugin = json_decode(json_encode($plugin_composer_json->extra->ilias_plugin), true);
- $extra_ilias_plugin_from_composer_json = true;
- }
-
- $id = $this->getOldPluginVar("id", $project_root);
- if (empty($extra_ilias_plugin["id"])) {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > id (" . ($extra_ilias_plugin["id"] ?? null) . ") from " . self::PLUGIN_PHP . " > id ("
- . $id . ")
-";
- }
-
- $extra_ilias_plugin["id"] = $id;
-
- $updated_composer_json = true;
- }
-
- $name = basename($project_root);
- if (empty($extra_ilias_plugin["name"])) {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > name (" . ($extra_ilias_plugin["name"] ?? null) . ") from current folder ("
- . $name . ")
-";
- }
-
- $extra_ilias_plugin["name"] = $name;
-
- $updated_composer_json = true;
- }
-
- $old_ilias_min_version = $this->getOldPluginVar("ilias_min_version", $project_root);
- if (empty($extra_ilias_plugin["ilias_min_version"])
- || (!empty($old_ilias_min_version)
- && version_compare($old_ilias_min_version, $extra_ilias_plugin["ilias_min_version"], ">"))
- ) {
- if ($log) {
- echo "Update missing or older " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > ilias_min_version (" . ($extra_ilias_plugin["ilias_min_version"] ?? null)
- . ") from " . self::PLUGIN_PHP . " > ilias_min_version ("
- . $old_ilias_min_version . ")
-";
- }
-
- $extra_ilias_plugin["ilias_min_version"] = $old_ilias_min_version;
-
- $updated_composer_json = true;
- }
-
- $old_ilias_max_version = $this->getOldPluginVar("ilias_max_version", $project_root);
- if (empty($extra_ilias_plugin["ilias_max_version"])
- || (!empty($old_ilias_max_version)
- && version_compare($old_ilias_max_version, $extra_ilias_plugin["ilias_max_version"], ">"))
- ) {
- if ($log) {
- echo "Update missing or older " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > ilias_max_version (" . ($extra_ilias_plugin["ilias_max_version"] ?? null)
- . ") from " . self::PLUGIN_PHP . " > ilias_max_version ("
- . $old_ilias_max_version . ")
-";
- }
-
- $extra_ilias_plugin["ilias_max_version"] = $old_ilias_max_version;
-
- $updated_composer_json = true;
- }
-
- if (empty($extra_ilias_plugin["slot"])) {
- $plugin_class = "classes/class.il" . $extra_ilias_plugin["name"] . "Plugin.php";
-
- $plugin_class_code = file_get_contents($project_root . "/" . $plugin_class);
-
- $matches = [];
- preg_match("/Plugin\s+extends\s+il([A-Za-z]+)Plugin/", $plugin_class_code, $matches);
- $hook = $matches[1];
-
- $matches = [];
- $readme = file_get_contents($project_root . "/" . self::PLUGIN_README);
- preg_match("/Customizing\/global\/plugins\/([A-Za-z]+)\/([A-Za-z]+)\/" . $hook . "/", $readme, $matches);
-
- $component = implode("/", [
- $matches[1],
- $matches[2]
- ]);
-
- $slot = implode("/", [
- $component,
- $hook
- ]);
-
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > slot (" . ($extra_ilias_plugin["slot"] ?? null) . ") from " . $plugin_class . " ("
- . $hook
- . ") and "
- . self::PLUGIN_README . " ("
- . $component . ")
-";
- }
-
- $extra_ilias_plugin["slot"] = $slot;
-
- $updated_composer_json = true;
- }
-
- if (empty($extra_ilias_plugin["learning_progress"])) {
- $learning_progress = $this->getOldPluginVar("learning_progress", $project_root);
-
- if ($learning_progress === "true") {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > learning_progress (" . ($extra_ilias_plugin["learning_progress"] ?? null)
- . ") from "
- . self::PLUGIN_PHP . " > learning_progress (" . $learning_progress . ")
-";
- }
-
- $extra_ilias_plugin["learning_progress"] = true;
-
- $updated_composer_json = true;
- }
- }
-
- if (empty($extra_ilias_plugin["lucene_search"])) {
- $lucene_search = json_encode(file_exists($project_root . "/" . self::LUCENE_OBJECT_DEFINITION_XML));
-
- if ($lucene_search === "true") {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > lucene_search (" . ($extra_ilias_plugin["lucene_search"] ?? null) . ") from "
- . self::LUCENE_OBJECT_DEFINITION_XML . " (" . $lucene_search . ")
-";
- }
-
- $extra_ilias_plugin["lucene_search"] = true;
-
- $updated_composer_json = true;
- }
- }
-
- if (empty($extra_ilias_plugin["supports_export"])) {
- $supports_export = $this->getOldPluginVar("supports_export", $project_root);
-
- if ($supports_export === "true") {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > supports_export (" . ($extra_ilias_plugin["supports_export"] ?? null) . ") from "
- . self::PLUGIN_PHP . " > supports_export (" . $supports_export . ")
-";
- }
-
- $extra_ilias_plugin["supports_export"] = true;
-
- $updated_composer_json = true;
- }
- }
-
- if (empty($extra_ilias_plugin["supports_cli_setup"])) {
- $supports_cli_setup = $this->getOldPluginVar("supports_cli_setup", $project_root);
-
- if ($supports_cli_setup === "true") {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > supports_cli_setup (" . ($extra_ilias_plugin["supports_cli_setup"] ?? null) . ") from "
- . self::PLUGIN_PHP . " > supports_cli_setup (" . $supports_cli_setup . ")
-";
- }
-
- $extra_ilias_plugin["supports_cli_setup"] = true;
-
- $updated_composer_json = true;
- }
- }
-
- if (empty($plugin_composer_json->authors)) {
- $responsible = $this->getOldPluginVar("responsible", $project_root);
- $responsible_mail = $this->getOldPluginVar("responsible_mail", $project_root);
-
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > authors (" . ($plugin_composer_json->authors ?? null) . ") from " . self::PLUGIN_PHP . " > responsible (" . $responsible
- . ") and " . self::PLUGIN_PHP . " > responsible_mail ("
- . $responsible_mail . ")
-";
- }
-
- $plugin_composer_json->authors = [
- (object) [
- "name" => $responsible,
- "email" => $responsible_mail,
- "homepage" => "",
- "role" => "Developer"
- ]
- ];
-
- $updated_composer_json = true;
- }
-
- if (empty($extra_ilias_plugin["events"])) {
- if (file_exists($project_root . "/" . self::PLUGIN_XML)) {
- $plugin_xml = json_decode(json_encode(simpleXML_load_file($project_root . "/" . self::PLUGIN_XML)));
-
- if (!empty($plugin_xml->events) && !empty($plugin_xml->events->event)) {
- if ($log) {
- echo "Update missing " . self::PLUGIN_COMPOSER_JSON . " > ilias_plugin > events (" . ($extra_ilias_plugin["events"] ?? null) . ") from "
- . self::PLUGIN_XML . " > events
-";
- }
-
- $extra_ilias_plugin["events"] = array_map(function (stdClass $event) : stdClass {
- return (object) [
- "id" => $event->{"@attributes"}->id,
- "type" => $event->{"@attributes"}->type
- ];
- }, $plugin_xml->events->event);
-
- $updated_composer_json = true;
- }
- }
- }
-
- if ($extra_ilias_plugin_from_composer_json) {
- $plugin_composer_json->extra->ilias_plugin = json_decode(json_encode($extra_ilias_plugin));
- }
-
- if ($updated_composer_json) {
- if ($log) {
- echo "Store updated changes in " . self::PLUGIN_COMPOSER_JSON . "
-";
- }
-
- file_put_contents($project_root . "/" . self::PLUGIN_COMPOSER_JSON, preg_replace_callback("/\n( +)/", function (array $matches) : string {
- return "
-" . str_repeat(" ", (strlen($matches[1]) / 2));
- }, json_encode($plugin_composer_json, JSON_UNESCAPED_SLASHES + JSON_PRETTY_PRINT)) . "
-");
- }
- }
-}
diff --git a/vendor/srag/generateplugininfoshelper/src/GeneratePluginReadme.php b/vendor/srag/generateplugininfoshelper/src/GeneratePluginReadme.php
deleted file mode 100644
index 2deafe8..0000000
--- a/vendor/srag/generateplugininfoshelper/src/GeneratePluginReadme.php
+++ /dev/null
@@ -1,199 +0,0 @@
-baseDir;
- }, $event->getComposer()->getConfig(), Config::class)(), "/");
-
- self::getInstance()->doGeneratePluginReadme($project_root, null, null, null, null, true, true);
- }
-
-
- /**
- * @return self
- *
- * @depracated
- */
- public static function getInstance() : self
- {
- if (self::$instance === null) {
- self::$instance = new self();
- }
-
- return self::$instance;
- }
-
-
- /**
- * @param string $project_root
- * @param string|null $template
- * @param string|null $long_description_template
- * @param string|null $version
- * @param array|null $extra_ilias_plugin
- * @param bool $autogenerated_comment
- * @param bool $log
- *
- * @depracated
- */
- public function doGeneratePluginReadme(
- string $project_root, /*?*/ string $template = null, /*?*/ $long_description_template = null, /*?*/ string $version = null,/*?*/ array $extra_ilias_plugin = null,
- bool $autogenerated_comment = false,
- bool $log = false
- ) : void {
- if ($log) {
- echo "GeneratePluginReadme is deprecated and will be removed!\n";
-
- echo "(Re)generate " . self::PLUGIN_README . "
-";
- }
-
- $plugin_composer_json = json_decode(file_get_contents($project_root . "/" . self::PLUGIN_COMPOSER_JSON), true);
-
- if (empty($version)) {
- $version = strval($plugin_composer_json["version"] ?? "");
- }
-
- if (empty($extra_ilias_plugin)) {
- $extra_ilias_plugin = (array) ($plugin_composer_json["extra"]["ilias_plugin"] ?? []);
- }
-
- if (file_exists($project_root . "/" . self::PLUGIN_README)) {
- $old_readme = file_get_contents($project_root . "/" . self::PLUGIN_README);
- } else {
- $old_readme = "";
- }
-
- if (empty($long_description_template)) {
- $long_description_template = ($plugin_composer_json["extra"]["long_description_template"] ?? "");
- }
-
- if (!empty($long_description_template) && file_exists($project_root . "/" . $long_description_template)) {
- $long_description = str_replace("../doc/", "./doc/", trim(file_get_contents($project_root . "/" . $long_description_template)));
- } else {
- $long_description = "";
- }
-
- $placeholders = [
- "AUTHOR_EMAIL" => strval($plugin_composer_json["authors"][0]["email"] ?? ""),
- "AUTHOR_HOMEPAGE" => strval($plugin_composer_json["authors"][0]["homepage"] ?? ""),
- "AUTHOR_NAME" => strval($plugin_composer_json["authors"][0]["name"] ?? ""),
- "GITHUB_REPO" => strval($plugin_composer_json["homepage"] ?? "") . ".git",
- "HOMEPAGE" => strval($plugin_composer_json["homepage"] ?? ""),
- "KEYWORDS" => implode("\n", array_map(function (string $keyword) : string {
- return "- " . $keyword;
- }, (array) $plugin_composer_json["keywords"] ?? [])),
- "ILIAS_PLUGIN_BASE_SLOT_PATH" => "Customizing/global/plugins/" . strval($extra_ilias_plugin["slot"] ?? ""),
- "ILIAS_PLUGIN_ID" => strval($extra_ilias_plugin["id"] ?? ""),
- "ILIAS_PLUGIN_MAX_ILIAS_VERSION" => strval($extra_ilias_plugin["ilias_max_version"] ?? ""),
- "ILIAS_PLUGIN_MIN_ILIAS_VERSION" => strval($extra_ilias_plugin["ilias_min_version"] ?? ""),
- "ILIAS_PLUGIN_NAME" => strval($extra_ilias_plugin["name"] ?? ""),
- "ILIAS_PLUGIN_SLOT" => strval($extra_ilias_plugin["slot"] ?? ""),
- "LICENSE" => strval($plugin_composer_json["license"] ?? ""),
- "LONG_DESCRIPTION" => $long_description,
- "NAME" => strval($plugin_composer_json["name"] ?? ""),
- "PHP_VERSION" => strval($plugin_composer_json["require"]["php"] ?? ""),
- "SHORT_DESCRIPTION" => strval($plugin_composer_json["description"] ?? ""),
- "SUPPORT_LINK" => strval($plugin_composer_json["support"]["issues"] ?? ""),
- "VERSION" => $version
- ];
-
- if (empty($template)) {
- $template = ($plugin_composer_json["extra"]["generate_plugin_readme_template"] ?? "");
- }
-
- if (!empty($template)) {
- if (!file_exists(
- $template_file = self::PLUGIN_README_TEMPLATE_FOLDER . "/" . $template . self::PLUGIN_README_TEMPLATE_FOLDER_SUFFIX)
- ) {
- if (!file_exists($template_file = $project_root . "/" . $template . self::PLUGIN_README_TEMPLATE_FOLDER_SUFFIX)) {
- throw new Exception("Invalid composer.json > extra > generate_plugin_readme_template
- ");
- }
- }
- } else {
- throw new Exception("Please set composer.json > extra > generate_plugin_readme_template
- ");
- }
-
- if ($log) {
- echo "Use template " . $template_file . "
-";
- }
- $plugin_readme = file_get_contents($template_file);
-
- foreach ($placeholders as $key => $value) {
- $plugin_readme = str_replace("__" . $key . "__", $value, $plugin_readme);
- }
-
- if ($autogenerated_comment) {
- $plugin_readme = '
-
-' . $plugin_readme;
- }
-
- if ($old_readme !== $plugin_readme) {
- if ($log) {
- echo "Store changes in " . self::PLUGIN_README . "
-";
- }
-
- file_put_contents($project_root . "/" . self::PLUGIN_README, $plugin_readme);
- } else {
- if ($log) {
- echo "No changes in " . self::PLUGIN_README . "
-";
- }
- }
- }
-}
diff --git a/vendor/srag/generateplugininfoshelper/src/UpdateVersion.php b/vendor/srag/generateplugininfoshelper/src/UpdateVersion.php
deleted file mode 100644
index 77d3473..0000000
--- a/vendor/srag/generateplugininfoshelper/src/UpdateVersion.php
+++ /dev/null
@@ -1,253 +0,0 @@
-baseDir;
- }, $event->getComposer()->getConfig(), Config::class)(), "/");
-
- self::getInstance()->doUpdateVersion($project_root, intval($event->getArguments()[0] ?? self::UPDATE_TYPE_AUTO), strval($event->getArguments()[1] ?? ""), true);
- }
-
-
- /**
- * @param string $project_root
- * @param int $update_type
- * @param string|null $todo_changelog
- * @param bool $log
- */
- public function doUpdateVersion(string $project_root, int $update_type = self::UPDATE_TYPE_AUTO, /*?*/ string $todo_changelog = null, bool $log = false) : void
- {
- $old_composer_json = file_get_contents($project_root . "/" . self::COMPOSER_JSON);
- $composer_json = json_decode($old_composer_json, true);
-
- if (file_exists($project_root . "/" . self::CHANGELOG_MD)) {
- $old_changelog = file_get_contents($project_root . "/" . self::CHANGELOG_MD);
- } else {
- $old_changelog = "";
- }
- $new_changelog = $old_changelog;
-
- $header_pos = strpos($new_changelog, self::CHANGELOG_INIT);
- if ($header_pos === false) {
- if ($log) {
- echo "Missing header in " . self::CHANGELOG_MD . " - Added it
-";
- }
- $new_changelog = self::CHANGELOG_INIT . $new_changelog;
- } else {
- if ($header_pos !== 0) {
- if ($log) {
- echo "WARNING: Header not found on first line in " . self::CHANGELOG_MD . " - Aborting
-";
- exit(1);
- }
- }
- }
-
- $version = strval($composer_json["version"] ?? "");
- if (!empty($version)) {
- if ($log) {
- echo "Use version " . $version . " from " . self::COMPOSER_JSON . "
-";
- }
- } else {
- if ($log) {
- echo "Version is missing in " . self::COMPOSER_JSON . " - Use version " . self::VERSION_INIT . "
-";
- }
- $version = self::VERSION_INIT;
- $update_type = self::UPDATE_TYPE_NONE;
- }
-
- $last_changelog_version_line = explode(self::LINE_BREAK_SEPARATOR, $new_changelog)[substr_count(self::CHANGELOG_INIT, self::LINE_BREAK_SEPARATOR)];
-
- if (!empty($last_changelog_version_line)) {
- $last_changelog_version_line .= self::LINE_BREAK_SEPARATOR;
-
- $last_changelog_version_line_start_pos = strlen(self::CHANGELOG_VERSION_BEFORE);
- $last_changelog_version_line_end_pos = (strlen($last_changelog_version_line) - strlen(self::CHANGELOG_VERSION_AFTER));
-
- if (strpos($last_changelog_version_line, self::CHANGELOG_VERSION_BEFORE) === 0
- && strrpos($last_changelog_version_line, self::CHANGELOG_VERSION_AFTER) === $last_changelog_version_line_end_pos
- ) {
- $last_changelog_version = substr($last_changelog_version_line, $last_changelog_version_line_start_pos, ($last_changelog_version_line_end_pos - $last_changelog_version_line_start_pos));
-
- if (version_compare($last_changelog_version, $version, ">")) {
- if ($log) {
- echo "Use newer version " . $last_changelog_version . " from " . self::CHANGELOG_MD . "
-";
- }
- $version = $last_changelog_version;
- $update_type = self::UPDATE_TYPE_NONE;
- }
- }
- }
-
- if ($update_type !== self::UPDATE_TYPE_NONE) {
- if ($update_type === self::UPDATE_TYPE_AUTO) {
- $update_type = self::UPDATE_TYPE_PATCH;
- }
-
- $version_parts = explode(self::VERSION_SEPARATOR, $version);
-
- switch ($update_type) {
- case self::UPDATE_TYPE_MAJOR:
- $version_part_pos = 0;
- break;
-
- case self::UPDATE_TYPE_MINOR:
- $version_part_pos = 1;
- break;
-
- case self::UPDATE_TYPE_PATCH:
- default:
- $version_part_pos = 2;
- break;
- }
-
- $version_parts[$version_part_pos] = intval($version_parts[$version_part_pos] ?? 0) + 1;
- for ($i = $version_part_pos + 1; $i < max(count($version_parts), count(explode(self::VERSION_SEPARATOR, self::VERSION_INIT))); $i++) {
- $version_parts[$i] = 0;
- }
- $version = implode(self::VERSION_SEPARATOR, $version_parts);
- if ($log) {
- echo "Update version to " . $version . "
-";
- }
- } else {
- if ($log) {
- echo "Skip updating version
-";
- }
- }
-
- $composer_json["version"] = $version;
-
- if (strpos($new_changelog, self::CHANGELOG_VERSION_BEFORE . self::CHANGELOG_VERSION_X . self::CHANGELOG_VERSION_AFTER) !== false) {
- if ($log) {
- echo "Replace " . self::CHANGELOG_VERSION_X . " version in " . self::CHANGELOG_MD . "
-";
- }
- $new_changelog = str_replace(self::CHANGELOG_VERSION_BEFORE . self::CHANGELOG_VERSION_X . self::CHANGELOG_VERSION_AFTER,
- self::CHANGELOG_VERSION_BEFORE . $version . self::CHANGELOG_VERSION_AFTER, $new_changelog);
- } else {
- if (strpos($new_changelog, self::CHANGELOG_VERSION_BEFORE . $version . self::CHANGELOG_VERSION_AFTER) === false) {
- if ($log) {
- echo "Add version " . $version . " to " . self::CHANGELOG_MD . "
-";
- }
-
- if (empty($todo_changelog)) {
- $todo_changelog = self::CHANGELOG_TODO;
- }
-
- $new_changelog = self::CHANGELOG_INIT . self::CHANGELOG_VERSION_BEFORE . $version . self::CHANGELOG_VERSION_AFTER . self::CHANGELOG_TODO_BEFORE . $todo_changelog
- . self::CHANGELOG_TODO_AFTER . substr($new_changelog,
- strlen(self::CHANGELOG_INIT));
- }
- }
-
- $new_changelog = rtrim($new_changelog, self::LINE_BREAK_SEPARATOR) . self::LINE_BREAK_SEPARATOR;
-
- $new_composer_json = preg_replace_callback("/\n( +)/", function (array $matches) : string {
- return "
-" . str_repeat(" ", (strlen($matches[1]) / 2));
- }, json_encode($composer_json, JSON_UNESCAPED_SLASHES + JSON_PRETTY_PRINT)) . "
-";
-
- if ($old_composer_json !== $new_composer_json) {
- if ($log) {
- echo "Store changes in " . self::COMPOSER_JSON . "
-";
- }
-
- file_put_contents($project_root . "/" . self::COMPOSER_JSON, $new_composer_json);
- } else {
- if ($log) {
- echo "No changes in " . self::COMPOSER_JSON . "
-";
- }
- }
-
- if ($old_changelog !== $new_changelog) {
- if ($log) {
- echo "Store changes in " . self::CHANGELOG_MD . "
-";
- }
-
- file_put_contents($project_root . "/" . self::CHANGELOG_MD, $new_changelog);
- } else {
- if ($log) {
- echo "No changes in " . self::CHANGELOG_MD . "
-";
- }
- }
- }
-}
diff --git a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_LIBRARY_README.md b/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_LIBRARY_README.md
deleted file mode 100644
index e68745d..0000000
--- a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_LIBRARY_README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# __NAME__ Library for ILIAS Plugins
-
-__SHORT_DESCRIPTION__
-
-This project is licensed under the __LICENSE__ license
-
-__LONG_DESCRIPTION__
-
-## Requirements
-
-* ILIAS __ILIAS_PLUGIN_MIN_ILIAS_VERSION__ - __ILIAS_PLUGIN_MAX_ILIAS_VERSION__
-* PHP __PHP_VERSION__
diff --git a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_PLUGIN_README.md b/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_PLUGIN_README.md
deleted file mode 100755
index 1a74f62..0000000
--- a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/ILIAS_PLUGIN_README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# __ILIAS_PLUGIN_NAME__ ILIAS Plugin
-
-__SHORT_DESCRIPTION__
-
-This project is licensed under the __LICENSE__ license
-
-## Requirements
-
-* ILIAS __ILIAS_PLUGIN_MIN_ILIAS_VERSION__ - __ILIAS_PLUGIN_MAX_ILIAS_VERSION__
-* PHP __PHP_VERSION__
-
-## Installation
-
-Start at your ILIAS root directory
-
-```bash
-mkdir -p __ILIAS_PLUGIN_BASE_SLOT_PATH__
-cd __ILIAS_PLUGIN_BASE_SLOT_PATH__
-git clone __GITHUB_REPO__ __ILIAS_PLUGIN_NAME__
-```
-
-Update, activate and config the plugin in the ILIAS Plugin Administration
-
-## Description
-
-__LONG_DESCRIPTION__
diff --git a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/LIBRARY_README.md b/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/LIBRARY_README.md
deleted file mode 100644
index a452786..0000000
--- a/vendor/srag/generateplugininfoshelper/templates/GeneratePluginReadme/LIBRARY_README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# __NAME__ Library
-
-__SHORT_DESCRIPTION__
-
-This project is licensed under the __LICENSE__ license
-
-__LONG_DESCRIPTION__
-
-## Requirements
-
-* PHP __PHP_VERSION__