Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 4.0.0 - Unreleased
## 4.0.0 - 2026-02-01

- Organization support
- Hyvor\Internal\Laravel\LogFake removed
Expand Down
49 changes: 49 additions & 0 deletions bundle/src/Comms/Event/FromCore/License/LicenseChanged.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace Hyvor\Internal\Bundle\Comms\Event\FromCore\License;

use Hyvor\Internal\Billing\License\Resolved\ResolvedLicense;
use Hyvor\Internal\Bundle\Comms\Event\AbstractEvent;
use Hyvor\Internal\Component\Component;

class LicenseChanged extends AbstractEvent
{

public function __construct(
private int $organizationId,
private Component $component, // this event is generally sent to this component
private ResolvedLicense $previousLicense,
private ResolvedLicense $newLicense,
) {}

public function getOrganizationId(): int
{
return $this->organizationId;
}

public function getComponent(): Component
{
return $this->component;
}

public function getPreviousLicense(): ResolvedLicense
{
return $this->previousLicense;
}

public function getNewLicense(): ResolvedLicense
{
return $this->newLicense;
}

public function from(): array
{
return [Component::CORE];
}

public function to(): array
{
return [];
}

}