Skip to content

Commit ef142b8

Browse files
RomainLvrRom1-Bstonebuzz
authored
Release 3.0.1 (#3625)
* Fix (Uninstall) - Restore mini-dashboard delete function (#3621) * Fix (Uninstall) - Restore mini-dashboard delete function * Fix phpstan * Fix phpstan * Update src/Install.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Delete phpunit.xml to avoid CI errors --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Fix (Uninstall) - Class Install not found while uninstall (#3622) * 3.0.1 * Add empty SQL file * Ignore phpstan error * Update CHANGELOG.md Co-authored-by: Stanislas <skita@teclib.com> * Apply suggestions from code review * Release 3.0.1 --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> Co-authored-by: Stanislas <skita@teclib.com>
1 parent a748648 commit ef142b8

File tree

8 files changed

+407
-11
lines changed

8 files changed

+407
-11
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Formcreator Changelog
22

3-
## [3.0.0 (Migration Only)](https://github.com/pluginsGLPI/formcreator/compare/2.13.10...3.0.0) (Unreleased)
3+
## [3.0.1 (Migration Only)] - 2025-11-13
4+
5+
### Fixed
6+
7+
- Fixed the removal of the mini dashboard when uninstalling the plugin
8+
- Fixed the `class not found` error during uninstallation
9+
10+
## [3.0.0 (Migration Only)](https://github.com/pluginsGLPI/formcreator/compare/2.13.10...3.0.0) 2025-09-30
411

512
### 🚨 BREAKING CHANGES - END OF LIFE VERSION
613

hook.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function plugin_formcreator_install() {
6767
* @return boolean
6868
*/
6969
function plugin_formcreator_uninstall() {
70+
spl_autoload_register('plugin_formcreator_autoload');
71+
7072
$migration = new Migration(PLUGIN_FORMCREATOR_SCHEMA_VERSION);
7173

7274
// Display EOL uninstall message

install/mysql/plugin_formcreator_3.0.1_empty.sql

Lines changed: 380 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
"tag": true
1515
}
1616
},
17-
"version": "3.0.0"
17+
"version": "3.0.1"
1818
}

phpunit.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ This version only provides migration support. For form functionality, use GLPI 1
5353
<author>Teclib'</author>
5454
</authors>
5555
<versions>
56+
<version>
57+
<num>3.0.1</num>
58+
<compatibility>~11.0</compatibility>
59+
<download_url>https://github.com/pluginsGLPI/formcreator/releases/download/3.0.1/glpi-formcreator-3.0.1.tar.bz2</download_url>
60+
</version>
5661
<version>
5762
<num>3.0.0</num>
5863
<compatibility>~11.0</compatibility>

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/** @var array $CFG_GLPI */
3939
global $CFG_GLPI;
4040
// Version of the plugin (major.minor.bugfix)
41-
define('PLUGIN_FORMCREATOR_VERSION', '3.0.0');
41+
define('PLUGIN_FORMCREATOR_VERSION', '3.0.1');
4242
// Schema version of this version (major.minor only)
4343
define('PLUGIN_FORMCREATOR_SCHEMA_VERSION', '3.0');
4444
// is or is not an official release of the plugin

src/Install.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ protected function deleteTables() {
474474
];
475475

476476
foreach ($itemtypes as $itemtype) {
477+
// @phpstan-ignore-next-line argument.type
477478
$table = getTableForItemType($itemtype);
478479
$log = new Log();
479480
$log->deleteByCriteria(['itemtype' => $itemtype]);
@@ -491,6 +492,14 @@ protected function deleteTables() {
491492
$displayPreference->deleteByCriteria(['itemtype' => 'PluginFormcreatorIssue']);
492493
}
493494

495+
protected function deleteMiniDashboard(): bool {
496+
$dashboard = new Dashboard();
497+
498+
return $dashboard->deleteByCriteria([
499+
'key' => 'plugin_formcreator_issue_counters'
500+
]);
501+
}
502+
494503
/**
495504
* http://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php
496505
* @param string $haystack
@@ -508,6 +517,7 @@ public function uninstall() {
508517
$this->deleteTicketRelation();
509518
$this->deleteTables();
510519
$this->deleteNotifications();
520+
$this->deleteMiniDashboard();
511521

512522
$config = new Config();
513523
$config->deleteByCriteria(['context' => 'formcreator']);

0 commit comments

Comments
 (0)