Skip to content

Commit 5c86035

Browse files
committed
Differentiate between Craft Version & Edition
1 parent f79a3be commit 5c86035

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/PhoneHome.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function init(): void
3737
// If enabled hasn't been configured, enable for non-devMode environments
3838
$enabled = $this->getSettings()->enabled ?? Craft::$app->getConfig()->getGeneral()->devMode === false;
3939

40+
$this->phoneHome->sendPayload();
41+
4042
if (!$enabled) {
4143
return;
4244
}

src/endpoints/NotionEndpoint.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class NotionEndpoint implements EndpointInterface
2929
{
3030
private const PROPERTY_URL = "Url";
3131
private const PROPERTY_ENVIRONMENT = "Environment";
32+
private const PROPERTY_CRAFT_EDITION = "Craft Edition";
3233
private const PROPERTY_CRAFT_VERSION = "Craft Version";
3334
private const PROPERTY_PHP_VERSION = "PHP Version";
3435
private const PROPERTY_DB_VERSION = "DB Version";
@@ -50,6 +51,9 @@ class NotionEndpoint implements EndpointInterface
5051
self::PROPERTY_ENVIRONMENT => [
5152
'class' => SelectDb::class,
5253
],
54+
self::PROPERTY_CRAFT_EDITION => [
55+
'class' => SelectDb::class,
56+
],
5357
self::PROPERTY_CRAFT_VERSION => [
5458
'class' => SelectDb::class,
5559
],
@@ -160,6 +164,7 @@ public function send(SitePayload $payload): void
160164
$page = $page->addProperty(self::PROPERTY_NAME, Title::fromString($payload->siteName))
161165
->addProperty(self::PROPERTY_URL, Url::create($payload->siteUrl))
162166
->addProperty(self::PROPERTY_ENVIRONMENT, Select::fromName($payload->environment))
167+
->addProperty(self::PROPERTY_CRAFT_EDITION, Select::fromName($payload->craftEdition))
163168
->addProperty(self::PROPERTY_CRAFT_VERSION, Select::fromName($payload->craftVersion))
164169
->addProperty(self::PROPERTY_PHP_VERSION, Select::fromName($payload->phpVersion))
165170
->addProperty(self::PROPERTY_DB_VERSION, Select::fromName($payload->dbVersion))

0 commit comments

Comments
 (0)