Skip to content

Commit

Permalink
Drop support of old Event class name
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored and trasher committed May 13, 2024
1 parent d4b49de commit d5e7da6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions install/migrations/update_10.0.x_to_11.0.0/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
* ---------------------------------------------------------------------
*/

use Glpi\Event;

/**
* @var array $ADDTODISPLAYPREF
* @var \Migration $migration
*/

$ADDTODISPLAYPREF['Glpi\Event'] = [155, 156, 157, 158, 159, 160];

$migration->renameItemtype('Event', Event::class);
5 changes: 0 additions & 5 deletions src/DbUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,6 @@ public function getClassForItemtype(string $itemtype): ?string
return null;
}

if ($itemtype === 'Event') {
//to avoid issues when pecl-event is installed...
$itemtype = 'Glpi\\Event';
}

$classname = $this->fixItemtypeCase($itemtype);

if (!is_subclass_of($classname, CommonGLPI::class, true)) {
Expand Down
1 change: 0 additions & 1 deletion tests/functional/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function testTransfer()
'/^DB.*/',
'/^SlaLevel.*/',
'/^OlaLevel.*/',
'Event',
'Glpi\\Event',
'KnowbaseItem',
'/SavedSearch.*/',
Expand Down

0 comments on commit d5e7da6

Please sign in to comment.