From 3d30716723ed2f1d92d0ce7ad089e378d9dfca93 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Wed, 21 Oct 2020 16:17:41 +0200 Subject: [PATCH 01/10] EZP-32097: Expose EzSystemInfo in Admin UI and SystemInfoDumpCommand --- .../Resources/config/default_settings.yaml | 4 ++ src/bundle/Resources/config/services.yaml | 5 +- .../translations/systeminfo.en.xliff | 50 ++++++++++++++ .../admin/system_info/platform.html.twig | 67 +++++++++++++++++++ 4 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 src/bundle/Resources/views/themes/admin/system_info/platform.html.twig diff --git a/src/bundle/Resources/config/default_settings.yaml b/src/bundle/Resources/config/default_settings.yaml index e5a82a7f..74182226 100644 --- a/src/bundle/Resources/config/default_settings.yaml +++ b/src/bundle/Resources/config/default_settings.yaml @@ -2,6 +2,10 @@ parameters: ezsettings.default.system_info_view: {} ezsettings.global.system_info_view: pjax_tab: + ez: + template: '@@ezdesign/system_info/platform.html.twig' + match: + SystemInfo\Identifier: 'ez' composer: template: '@@ezdesign/system_info/composer.html.twig' match: diff --git a/src/bundle/Resources/config/services.yaml b/src/bundle/Resources/config/services.yaml index cac7446a..2e51903e 100644 --- a/src/bundle/Resources/config/services.yaml +++ b/src/bundle/Resources/config/services.yaml @@ -57,9 +57,8 @@ services: arguments: - "@support_tools.system_info.collector.composer.lock_file" - "%kernel.debug%" - # Can't tag this before v0.3 (2.5?) as it will blow up in admin UI for missing templates there - # And it does not look like there is any way to add it from this package, so maybe it needs to be made extensible(?) - #tags: [{ name: "support_tools.system_info.collector", identifier: "ez" }] + tags: + - { name: "support_tools.system_info.collector", identifier: "ez" } support_tools.system_info.collector.composer.lock_file: class: "%support_tools.system_info.collector.composer.lock_file.class%" diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index faeb7342..cf76122b 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -56,6 +56,51 @@ Disabled key: disabled + + Platform + Platform + key: platform + + + Name + Name + key: platform.name + + + Version + Version + key: platform.version + + + Is Enterprise + Is Enterprise + key: platform.is_enterprise + + + Is Commerce + Is Commerce + key: platform.is_commerce + + + Is End of Maintenance + Is End of Maintenance + key: platform.is_eom + + + Is End of Life + Is End of Life + key: platform.is_eol + + + Is Trial + Is Trial + key: platform.is_trial + + + Stability + Stability + key: platform.stability + Hardware Hardware @@ -176,6 +221,11 @@ System Information key: systeminfo + + Platform + Platform + key: tab.name.ez + Composer Composer diff --git a/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig b/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig new file mode 100644 index 00000000..bce4d2ff --- /dev/null +++ b/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig @@ -0,0 +1,67 @@ +{% trans_default_domain "systeminfo" %} + +{% set icons = asset('bundles/ezplatformadminui/img/ez-icons.svg') %} + + + +
+

{{ 'platform'|trans|desc('Platform') }}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'platform.name'|trans|desc('Name') }}{{ info.name }}
{{ 'platform.version'|trans|desc('Version') }}{{ info.release }}
{{ 'platform.is_enterprise'|trans|desc('Is Enterprise') }} + + + +
{{ 'platform.is_commerce'|trans|desc('Is Commerce') }} + + + +
{{ 'platform.is_eom'|trans|desc('Is End of Maintenance') }} + + + +
{{ 'platform.is_eol'|trans|desc('Is End of Life') }} + + + +
{{ 'platform.is_trial'|trans|desc('Is Trial') }} + + + +
{{ 'platform.stability'|trans|desc('Stability') }}{{ info.stability }}
+
+
From dc1b7ad42023c8ce5172fcedd49cb3b46d5bc3fe Mon Sep 17 00:00:00 2001 From: konradoboza Date: Fri, 23 Oct 2020 16:08:40 +0200 Subject: [PATCH 02/10] cr remarks, necessary renaming --- .../Resources/config/default_settings.yaml | 6 +- src/bundle/Resources/config/services.yaml | 8 +-- src/bundle/Resources/config/view.yaml | 2 +- .../translations/systeminfo.en.xliff | 56 ++++++++-------- .../admin/system_info/my_ibexa.html.twig | 65 +++++++++++++++++++ ...ector.php => IbexaSystemInfoCollector.php} | 10 +-- .../{EzSystemInfo.php => IbexaSystemInfo.php} | 4 +- ...t.php => IbexaSystemInfoCollectorTest.php} | 6 +- .../Dashboard/EzInfoTwigComponent.php | 16 ++--- 9 files changed, 119 insertions(+), 54 deletions(-) create mode 100644 src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig rename src/bundle/SystemInfo/Collector/{EzSystemInfoCollector.php => IbexaSystemInfoCollector.php} (95%) rename src/bundle/SystemInfo/Value/{EzSystemInfo.php => IbexaSystemInfo.php} (91%) rename src/bundle/Tests/SystemInfo/Collector/{EzSystemInfoCollectorTest.php => IbexaSystemInfoCollectorTest.php} (79%) diff --git a/src/bundle/Resources/config/default_settings.yaml b/src/bundle/Resources/config/default_settings.yaml index 74182226..24e8e4d9 100644 --- a/src/bundle/Resources/config/default_settings.yaml +++ b/src/bundle/Resources/config/default_settings.yaml @@ -2,10 +2,10 @@ parameters: ezsettings.default.system_info_view: {} ezsettings.global.system_info_view: pjax_tab: - ez: - template: '@@ezdesign/system_info/platform.html.twig' + ibexa: + template: '@@ezdesign/system_info/my_ibexa.html.twig' match: - SystemInfo\Identifier: 'ez' + SystemInfo\Identifier: 'ibexa' composer: template: '@@ezdesign/system_info/composer.html.twig' match: diff --git a/src/bundle/Resources/config/services.yaml b/src/bundle/Resources/config/services.yaml index 2e51903e..3b9571e0 100644 --- a/src/bundle/Resources/config/services.yaml +++ b/src/bundle/Resources/config/services.yaml @@ -11,7 +11,7 @@ parameters: support_tools.system_info.ezc.wrapper.class: EzSystems\EzSupportToolsBundle\SystemInfo\EzcSystemInfoWrapper support_tools.system_info.collector.composer.lock_file.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\JsonComposerLockSystemInfoCollector support_tools.system_info.collector.database.doctrine.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\DoctrineDatabaseSystemInfoCollector - support_tools.system_info.collector.system.ez.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzSystemInfoCollector + support_tools.system_info.collector.system.ibexa.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\IbexaSystemInfoCollector support_tools.system_info.collector.hardware.ezc.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzcHardwareSystemInfoCollector support_tools.system_info.collector.php.ezc.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzcPhpSystemInfoCollector support_tools.system_info.collector.symfony.kernel.config.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\ConfigurationSymfonyKernelSystemInfoCollector @@ -52,13 +52,13 @@ services: # SystemInfoCollectors - support_tools.system_info.collector.system.ez: - class: "%support_tools.system_info.collector.system.ez.class%" + support_tools.system_info.collector.system.ibexa: + class: "%support_tools.system_info.collector.system.ibexa.class%" arguments: - "@support_tools.system_info.collector.composer.lock_file" - "%kernel.debug%" tags: - - { name: "support_tools.system_info.collector", identifier: "ez" } + - { name: "support_tools.system_info.collector", identifier: "ibexa" } support_tools.system_info.collector.composer.lock_file: class: "%support_tools.system_info.collector.composer.lock_file.class%" diff --git a/src/bundle/Resources/config/view.yaml b/src/bundle/Resources/config/view.yaml index 679a498e..fa8ce3ed 100644 --- a/src/bundle/Resources/config/view.yaml +++ b/src/bundle/Resources/config/view.yaml @@ -43,7 +43,7 @@ services: autowire: true arguments: $template: '@@ezdesign/ui/dashboard/block/ez.html.twig' - $ezSystemInfo: "@=service('support_tools.system_info.collector.system.ez').collect()" + $ibexaSystemInfo: "@=service('support_tools.system_info.collector.system.ibexa').collect()" $urlList: '%support_tools.ez_url_list%' tags: - { name: ezplatform.admin_ui.component, group: 'dashboard-blocks', priority: 200 } diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index cf76122b..c1c36f9b 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -56,50 +56,50 @@ Disabled key: disabled
- - Platform - Platform - key: platform + + Product + Product + key: ibexa.product - + Name Name - key: platform.name + key: ibexa.name - + Version Version - key: platform.version + key: ibexa.version - - Is Enterprise - Is Enterprise - key: platform.is_enterprise + + Is DXP + Is DXP + key: ibexa.is_dxp - - Is Commerce - Is Commerce - key: platform.is_commerce + + Has Commerce + Has Commerce + key: ibexa.has_commerce - + Is End of Maintenance Is End of Maintenance - key: platform.is_eom + key: ibexa.is_eom - + Is End of Life Is End of Life - key: platform.is_eol + key: ibexa.is_eol - + Is Trial Is Trial - key: platform.is_trial + key: ibexa.is_trial - + Stability Stability - key: platform.stability + key: ibexa.stability Hardware @@ -221,10 +221,10 @@ System Information key: systeminfo - - Platform - Platform - key: tab.name.ez + + My Ibexa + My Ibexa + key: tab.name.my_ibexa Composer diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig new file mode 100644 index 00000000..ca96884b --- /dev/null +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -0,0 +1,65 @@ +{% trans_default_domain "systeminfo" %} + + + +
+

{{ 'ibexa.product'|trans|desc('Product') }}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'ibexa.name'|trans|desc('Name') }}{{ info.name }}
{{ 'ibexa.version'|trans|desc('Version') }}{{ info.release }}
{{ 'ibexa.is_dxp'|trans|desc('Is DXP') }} + + + +
{{ 'ibexa.is_commerce'|trans|desc('Has Commerce') }} + + + +
{{ 'ibexa.is_eom'|trans|desc('Is End of Maintenance') }} + + + +
{{ 'ibexa.is_eol'|trans|desc('Is End of Life') }} + + + +
{{ 'ibexa.is_trial'|trans|desc('Is Trial') }} + + + +
{{ 'ibexa.stability'|trans|desc('Stability') }}{{ info.stability }}
+
+
diff --git a/src/bundle/SystemInfo/Collector/EzSystemInfoCollector.php b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php similarity index 95% rename from src/bundle/SystemInfo/Collector/EzSystemInfoCollector.php rename to src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php index 8676c38f..13d410e7 100644 --- a/src/bundle/SystemInfo/Collector/EzSystemInfoCollector.php +++ b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php @@ -8,7 +8,7 @@ use EzSystems\EzPlatformCoreBundle\EzPlatformCoreBundle; use EzSystems\EzSupportToolsBundle\SystemInfo\Exception\ComposerLockFileNotFoundException; -use EzSystems\EzSupportToolsBundle\SystemInfo\Value\EzSystemInfo; +use EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo; use DateTime; /** @@ -22,7 +22,7 @@ * - Or be able to tell if install is greatly outdated * - Be able to give heads up when install is approaching end of life. */ -class EzSystemInfoCollector implements SystemInfoCollector +class IbexaSystemInfoCollector implements SystemInfoCollector { /** * Estimated release dates for given releases. @@ -117,13 +117,13 @@ public function __construct(SystemInfoCollector $composerCollector, $debug = fal } /** - * Collects information about the eZ distrobution and version. + * Collects information about the Ibexa distrobution and version. * - * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Value\EzSystemInfo + * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo */ public function collect() { - $ez = new EzSystemInfo(['debug' => $this->debug, 'composerInfo' => $this->composerInfo]); + $ez = new IbexaSystemInfo(['debug' => $this->debug, 'composerInfo' => $this->composerInfo]); if ($this->composerInfo === null) { return $ez; } diff --git a/src/bundle/SystemInfo/Value/EzSystemInfo.php b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php similarity index 91% rename from src/bundle/SystemInfo/Value/EzSystemInfo.php rename to src/bundle/SystemInfo/Value/IbexaSystemInfo.php index 7db5e266..1ddef899 100644 --- a/src/bundle/SystemInfo/Value/EzSystemInfo.php +++ b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php @@ -9,11 +9,11 @@ use eZ\Publish\API\Repository\Values\ValueObject; /** - * Value for information about the eZ installation. + * Value for information about the Ibexa installation. * * @internal This class will greatly change in the future and should not be used as an api. */ -class EzSystemInfo extends ValueObject implements SystemInfo +class IbexaSystemInfo extends ValueObject implements SystemInfo { /** * @var string diff --git a/src/bundle/Tests/SystemInfo/Collector/EzSystemInfoCollectorTest.php b/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php similarity index 79% rename from src/bundle/Tests/SystemInfo/Collector/EzSystemInfoCollectorTest.php rename to src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php index a5a98164..037cca13 100644 --- a/src/bundle/Tests/SystemInfo/Collector/EzSystemInfoCollectorTest.php +++ b/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php @@ -9,11 +9,11 @@ namespace SystemInfo\Collector; use EzSystems\EzPlatformCoreBundle\EzPlatformCoreBundle; -use EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzSystemInfoCollector; +use EzSystems\EzSupportToolsBundle\SystemInfo\Collector\IbexaSystemInfoCollector; use EzSystems\EzSupportToolsBundle\SystemInfo\Collector\JsonComposerLockSystemInfoCollector; use PHPUnit\Framework\TestCase; -class EzSystemInfoCollectorTest extends TestCase +class IbexaSystemInfoCollectorTest extends TestCase { public function testCollect(): void { @@ -21,7 +21,7 @@ public function testCollect(): void __DIR__ . '/_fixtures/composer.lock', __DIR__ . '/_fixtures/composer.json' ); - $systemInfoCollector = new EzSystemInfoCollector($composerCollector); + $systemInfoCollector = new IbexaSystemInfoCollector($composerCollector); $systemInfo = $systemInfoCollector->collect(); self::assertSame('Ibexa Platform', $systemInfo->name); self::assertSame(EzPlatformCoreBundle::VERSION, $systemInfo->release); diff --git a/src/lib/Component/Dashboard/EzInfoTwigComponent.php b/src/lib/Component/Dashboard/EzInfoTwigComponent.php index 43f5096f..cc63f34e 100644 --- a/src/lib/Component/Dashboard/EzInfoTwigComponent.php +++ b/src/lib/Component/Dashboard/EzInfoTwigComponent.php @@ -9,7 +9,7 @@ namespace EzSystems\EzSupportTools\Component\Dashboard; use EzSystems\EzPlatformAdminUi\Component\Renderable; -use EzSystems\EzSupportToolsBundle\SystemInfo\Value\EzSystemInfo; +use EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo; use Twig\Environment; class EzInfoTwigComponent implements Renderable @@ -23,8 +23,8 @@ class EzInfoTwigComponent implements Renderable /** @var array */ protected $parameters; - /** @var \EzSystems\EzSupportToolsBundle\SystemInfo\Value\EzSystemInfo */ - private $ezSystemInfo; + /** @var \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo */ + private $ibexaSystemInfo; /** @var array */ private $urlList; @@ -32,21 +32,21 @@ class EzInfoTwigComponent implements Renderable /** * @param \Twig\Environment $twig * @param string $template - * @param \EzSystems\EzSupportToolsBundle\SystemInfo\Value\EzSystemInfo $ezSystemInfo + * @param \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo $ibexaSystemInfo * @param array $urlList * @param array $parameters */ public function __construct( Environment $twig, string $template, - EzSystemInfo $ezSystemInfo, + IbexaSystemInfo $ibexaSystemInfo, array $urlList, array $parameters = [] ) { $this->twig = $twig; $this->template = $template; $this->parameters = $parameters; - $this->ezSystemInfo = $ezSystemInfo; + $this->ibexaSystemInfo = $ibexaSystemInfo; $this->urlList = $urlList; } @@ -61,7 +61,7 @@ public function render(array $parameters = []): string return $this->twig->render( $this->template, - $parameters + ['urls' => $urls, 'ez' => $this->ezSystemInfo] + $this->parameters + $parameters + ['urls' => $urls, 'ez' => $this->ibexaSystemInfo] + $this->parameters ); } @@ -72,7 +72,7 @@ private function replaceUrlPlaceholders(): array { $urls = $this->urlList; foreach ($this->urlList as $urlName => $url) { - foreach ($this->ezSystemInfo as $attribute => $value) { + foreach ($this->ibexaSystemInfo as $attribute => $value) { if (\is_string($value) && \strpos($url, '{ez.' . $attribute . '}') !== false) { $urls[$urlName] = \str_replace('{ez.' . $attribute . '}', $value, $url); } From 4d66777c7d2661672a3c30df890660607538fcd1 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Fri, 23 Oct 2020 16:15:17 +0200 Subject: [PATCH 03/10] removed unnecessary file --- .../admin/system_info/platform.html.twig | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/bundle/Resources/views/themes/admin/system_info/platform.html.twig diff --git a/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig b/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig deleted file mode 100644 index bce4d2ff..00000000 --- a/src/bundle/Resources/views/themes/admin/system_info/platform.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% trans_default_domain "systeminfo" %} - -{% set icons = asset('bundles/ezplatformadminui/img/ez-icons.svg') %} - - - -
-

{{ 'platform'|trans|desc('Platform') }}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'platform.name'|trans|desc('Name') }}{{ info.name }}
{{ 'platform.version'|trans|desc('Version') }}{{ info.release }}
{{ 'platform.is_enterprise'|trans|desc('Is Enterprise') }} - - - -
{{ 'platform.is_commerce'|trans|desc('Is Commerce') }} - - - -
{{ 'platform.is_eom'|trans|desc('Is End of Maintenance') }} - - - -
{{ 'platform.is_eol'|trans|desc('Is End of Life') }} - - - -
{{ 'platform.is_trial'|trans|desc('Is Trial') }} - - - -
{{ 'platform.stability'|trans|desc('Stability') }}{{ info.stability }}
-
-
From 8dc6c352b902425568de777c8f2bf9dec8053c4f Mon Sep 17 00:00:00 2001 From: konradoboza Date: Sat, 24 Oct 2020 16:32:43 +0200 Subject: [PATCH 04/10] exposed new IbexaSystemInfo properties, code refactoring, nitpicks --- .../translations/systeminfo.en.xliff | 20 +-- .../admin/system_info/my_ibexa.html.twig | 24 ++-- .../Collector/IbexaSystemInfoCollector.php | 122 +++++++++++------- .../SystemInfo/Value/IbexaSystemInfo.php | 10 ++ 4 files changed, 107 insertions(+), 69 deletions(-) diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index c1c36f9b..75babc26 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -81,15 +81,15 @@ Has Commerce key: ibexa.has_commerce
- - Is End of Maintenance - Is End of Maintenance - key: ibexa.is_eom + + End of Maintenance + End of Maintenance + key: ibexa.eom - - Is End of Life - Is End of Life - key: ibexa.is_eol + + End of Life + End of Life + key: ibexa.eol Is Trial @@ -221,10 +221,10 @@ System Information key: systeminfo - + My Ibexa My Ibexa - key: tab.name.my_ibexa + key: tab.name.ibexa Composer diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index ca96884b..4f47f604 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -1,6 +1,6 @@ {% trans_default_domain "systeminfo" %} - +

{{ 'ibexa.product'|trans|desc('Product') }}

@@ -32,33 +32,35 @@ - {{ 'ibexa.is_eom'|trans|desc('Is End of Maintenance') }} + {{ 'ibexa.is_trial'|trans|desc('Is Trial') }} - + - {{ 'ibexa.is_eol'|trans|desc('Is End of Life') }} + {{ 'ibexa.eom'|trans|desc('End of Maintenance') }}* - - - + {{ info.endOfMaintenanceDate is empty ? '' : info.endOfMaintenanceDate|date('F Y') }} - {{ 'ibexa.is_trial'|trans|desc('Is Trial') }} + {{ 'ibexa.eol'|trans|desc('End of Life') }}* - - - + {{ info.endOfLifeDate is empty ? '' : info.endOfLifeDate|date('F Y') }} {{ 'ibexa.stability'|trans|desc('Stability') }} {{ info.stability }} + + +
+ * you can read more about Service Life here + + diff --git a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php index 13d410e7..bcedcc12 100644 --- a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php +++ b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php @@ -8,26 +8,27 @@ use EzSystems\EzPlatformCoreBundle\EzPlatformCoreBundle; use EzSystems\EzSupportToolsBundle\SystemInfo\Exception\ComposerLockFileNotFoundException; +use EzSystems\EzSupportToolsBundle\SystemInfo\Value\ComposerPackage; use EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo; use DateTime; /** - * Collects information about the eZ installation. + * Collects information about the Ibexa installation. * - * @internal This class will greatly change in the future and should not be used as a api, planned: + * @internal This class will greatly change in the future and should not be used as an API, planned: * - Get most of this information off updates.ez.no * - Probably run this as a nightly cronjob to gather summary info * - Be able to provide warnings to admins when something (config/system setup) is not optimal - * - Be able to give information if important updates are avaiable to install - * - Or be able to tell if install is greatly outdated - * - Be able to give heads up when install is approaching end of life. + * - Be able to give information if important updates are available to the installation + * - Or be able to tell if installation is greatly outdated + * - Be able to give heads up when installation is approaching its End of Life. */ class IbexaSystemInfoCollector implements SystemInfoCollector { /** * Estimated release dates for given releases. * - * Mainly for usage for trail to calculate TTL expiry. + * Mainly for usage for trial to calculate TTL expiry. */ const RELEASES = [ '2.5' => '2019-03-29T16:59:59+00:00', @@ -37,17 +38,17 @@ class IbexaSystemInfoCollector implements SystemInfoCollector ]; /** - * Dates for when releases are considered end of maintenance. + * Dates for when releases are considered End of Maintenance. * - * Open source releases are considered end of life when this date ias reached. + * Open source releases are considered End of Life when this date is reached. * - * @Note: Only enterprise/commerce installs recives fixes for security - * issues before the issues are disclosed. Also be aware the link - * below is covering Enterprise/Commerce releases, lenght of + * @Note: Only Enterprise/Commerce installations receive fixes for security + * issues before the issues are disclosed. Also, be aware the link + * below is covering Enterprise/Commerce releases, length of * maintenance for LTS releases may not be as long for open source * releases as it depends on community maintenance efforts. * - * @see: https://support.ez.no/Public/Service-Life + * @see: https://support.ibexa.co/Public/Service-Life */ const EOM = [ '2.5' => '2022-03-29T23:59:59+00:00', @@ -57,11 +58,11 @@ class IbexaSystemInfoCollector implements SystemInfoCollector ]; /** - * Dates for when Enterprise/Commerce installs are considered end of life. + * Dates for when Enterprise/Commerce installations are considered End of Life. * - * Meaning when they stop reciving security fixes and support. + * Meaning, when they stop receiving security fixes and support. * - * @see: https://support.ez.no/Public/Service-Life + * @see: https://support.ibexa.co/Public/Service-Life */ const EOL = [ '2.5' => '2024-03-29T23:59:59+00:00', @@ -76,16 +77,16 @@ class IbexaSystemInfoCollector implements SystemInfoCollector const PACKAGE_WATCH_REGEX = '/^(doctrine|ezsystems|silversolutions|symfony)\//'; /** - * Packages that identifies install as Enterpirse install. + * Packages that identify installation as "Enterprise". */ - const ENTERPISE_PACKAGES = [ + const ENTERPRISE_PACKAGES = [ 'ezsystems/ezplatform-page-builder', 'ezsystems/flex-workflow', 'ezsystems/landing-page-fieldtype-bundle', ]; /** - * Packages that identifies install as Commerce install. + * Packages that identify installation as "Commerce". */ const COMMERCE_PACKAGES = [ 'silversolutions/silver.e-shop', @@ -117,63 +118,86 @@ public function __construct(SystemInfoCollector $composerCollector, $debug = fal } /** - * Collects information about the Ibexa distrobution and version. + * Collects information about the Ibexa distribution and version. * * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo + * @throws \Exception */ - public function collect() + public function collect(): IbexaSystemInfo { - $ez = new IbexaSystemInfo(['debug' => $this->debug, 'composerInfo' => $this->composerInfo]); + $ibexa = new IbexaSystemInfo(['debug' => $this->debug, 'composerInfo' => $this->composerInfo]); if ($this->composerInfo === null) { - return $ez; + return $ibexa; } - $ez->release = EzPlatformCoreBundle::VERSION; + $ibexa->release = EzPlatformCoreBundle::VERSION; // try to extract version number, but prepare for unexpected string - [$majorVersion, $minorVersion] = array_pad(explode('.', $ez->release), 2, ''); - $eZRelease = "{$majorVersion}.{$minorVersion}"; + [$majorVersion, $minorVersion] = array_pad(explode('.', $ibexa->release), 2, ''); + $ibexaRelease = "{$majorVersion}.{$minorVersion}"; - // In case someone switches from TTL to BUL, make sure we only identify install as Trial if this is present, + // In case someone switches from TTL to BUL, make sure we only identify installation as Trial if this is present, // as well as TTL packages $hasTTLComposerRepo = \in_array('https://updates.ez.no/ttl', $this->composerInfo->repositoryUrls); - if ($package = $this->getFirstPackage(self::ENTERPISE_PACKAGES)) { - $ez->isEnterpise = true; - $ez->isTrial = $hasTTLComposerRepo && $package->license === 'TTL-2.0'; - $ez->name = 'Ibexa DXP'; + if ($package = $this->getFirstPackage(self::ENTERPRISE_PACKAGES)) { + $ibexa->isEnterpise = true; + $ibexa->isTrial = $hasTTLComposerRepo && $package->license === 'TTL-2.0'; + $ibexa->name = 'Ibexa DXP'; } if ($package = $this->getFirstPackage(self::COMMERCE_PACKAGES)) { - $ez->isCommerce = true; - $ez->isTrial = $ez->isTrial || $hasTTLComposerRepo && $package->license === 'TTL-2.0'; - $ez->name = 'Ibexa Commerce'; + $ibexa->isCommerce = true; + $ibexa->isTrial = $ibexa->isTrial || $hasTTLComposerRepo && $package->license === 'TTL-2.0'; + $ibexa->name = 'Ibexa Commerce'; } - if ($ez->isTrial && isset(self::RELEASES[$eZRelease])) { - $months = (new DateTime(self::RELEASES[$eZRelease]))->diff(new DateTime())->m; - $ez->isEndOfMaintenance = $months > 3; + if ($ibexa->isTrial && isset(self::RELEASES[$ibexaRelease])) { + $months = (new DateTime(self::RELEASES[$ibexaRelease]))->diff(new DateTime())->m; + $ibexa->isEndOfMaintenance = $months > 3; // @todo We need to detect this in a better way, this is temporary until some of the work described in class doc is done. - $ez->isEndOfLife = $months > 6; + $ibexa->isEndOfLife = $months > 6; } else { - if (isset(self::EOM[$eZRelease])) { - $ez->isEndOfMaintenance = strtotime(self::EOM[$eZRelease]) < time(); + if (isset(self::EOM[$ibexaRelease])) { + $ibexa->isEndOfMaintenance = strtotime(self::EOM[$ibexaRelease]) < time(); } - if (isset(self::EOL[$eZRelease])) { - if (!$ez->isEnterpise) { - $ez->isEndOfLife = $ez->isEndOfMaintenance; + if (isset(self::EOL[$ibexaRelease])) { + if (!$ibexa->isEnterpise) { + $ibexa->isEndOfLife = $ibexa->isEndOfMaintenance; } else { - $ez->isEndOfLife = strtotime(self::EOL[$eZRelease]) < time(); + $ibexa->isEndOfLife = strtotime(self::EOL[$ibexaRelease]) < time(); } } } - $ez->stability = $this->getStability(); + $ibexa->endOfMaintenanceDate = $this->getEOMDate($ibexaRelease); + $ibexa->endOfLifeDate = $this->getEOLDate($ibexaRelease); + $ibexa->stability = $this->getStability(); - return $ez; + return $ibexa; } - private function getStability() + /** + * @throws \Exception + */ + private function getEOMDate(string $ibexaRelease): ?\DateTime + { + return isset(self::EOM[$ibexaRelease]) ? + new DateTime(self::EOM[$ibexaRelease]) : + null; + } + + /** + * @throws \Exception + */ + private function getEOLDate(string $ibexaRelease): ?\DateTime + { + return isset(self::EOL[$ibexaRelease]) ? + new DateTime(self::EOL[$ibexaRelease]) : + null; + } + + private function getStability(): string { $stabilityFlags = array_flip(JsonComposerLockSystemInfoCollector::STABILITIES); @@ -182,7 +206,7 @@ private function getStability() $stabilityFlags[$this->composerInfo->minimumStability] : $stabilityFlags['stable']; - // Check if any of the watche packages has lower stability then root + // Check if any of the watched packages has lower stability than root foreach ($this->composerInfo->packages as $name => $package) { if (!preg_match(self::PACKAGE_WATCH_REGEX, $name)) { continue; @@ -200,12 +224,14 @@ private function getStability() return JsonComposerLockSystemInfoCollector::STABILITIES[$stabilityFlag]; } - private function getFirstPackage($packageNames) + private function getFirstPackage($packageNames): ?ComposerPackage { foreach ($packageNames as $packageName) { if (isset($this->composerInfo->packages[$packageName])) { return $this->composerInfo->packages[$packageName]; } } + + return null; } } diff --git a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php index 1ddef899..aba0f28a 100644 --- a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php +++ b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php @@ -40,11 +40,21 @@ class IbexaSystemInfo extends ValueObject implements SystemInfo */ public $isEndOfMaintenance = true; + /** + * @var \DateTime + */ + public $endOfMaintenanceDate; + /** * @var bool */ public $isEndOfLife = true; + /** + * @var \DateTime + */ + public $endOfLifeDate; + /** * @var bool */ From 03c7f1ed4edfa785ddfd995cb11e5458899a032b Mon Sep 17 00:00:00 2001 From: konradoboza Date: Sat, 24 Oct 2020 17:24:19 +0200 Subject: [PATCH 05/10] cs --- src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php index bcedcc12..2a0f032f 100644 --- a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php +++ b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php @@ -120,8 +120,9 @@ public function __construct(SystemInfoCollector $composerCollector, $debug = fal /** * Collects information about the Ibexa distribution and version. * - * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo * @throws \Exception + * + * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Value\IbexaSystemInfo */ public function collect(): IbexaSystemInfo { From c8f23e77cb1414bbb536b615e9d23e45c705e665 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Thu, 29 Oct 2020 12:13:37 +0100 Subject: [PATCH 06/10] cr remarks, nitpick --- .../translations/systeminfo.en.xliff | 5 +++ .../admin/system_info/my_ibexa.html.twig | 41 ++++++++++--------- .../admin/ui/dashboard/block/ez.html.twig | 4 +- .../Collector/IbexaSystemInfoCollector.php | 4 +- .../SystemInfo/Value/IbexaSystemInfo.php | 2 +- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index 75babc26..619cb359 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -101,6 +101,11 @@ Stability key: ibexa.stability + + You can read more about Service Life for Ibexa DXP with a business license + You can read more about Service Life for Ibexa DXP with a business license + key: ibexa.read_more + Hardware Hardware diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index 4f47f604..f6619c63 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -19,7 +19,7 @@ {{ 'ibexa.is_dxp'|trans|desc('Is DXP') }} - + @@ -39,28 +39,31 @@ - - {{ 'ibexa.eom'|trans|desc('End of Maintenance') }}* - - {{ info.endOfMaintenanceDate is empty ? '' : info.endOfMaintenanceDate|date('F Y') }} - - - - {{ 'ibexa.eol'|trans|desc('End of Life') }}* - - {{ info.endOfLifeDate is empty ? '' : info.endOfLifeDate|date('F Y') }} - - {{ 'ibexa.stability'|trans|desc('Stability') }} {{ info.stability }} - - -
- * you can read more about Service Life here - - + {% if info.isEnterprise == true %} + + {{ 'ibexa.eom'|trans|desc('End of Maintenance') }}* + + {{ info.endOfMaintenanceDate is empty ? '' : info.endOfMaintenanceDate|date('F Y') }} + + + + {{ 'ibexa.eol'|trans|desc('End of Life') }}* + + {{ info.endOfLifeDate is empty ? '' : info.endOfLifeDate|date('F Y') }} + + + + +
+ * {{ 'ibexa.read_more'|trans|desc('You can read more about Service Life for Ibexa DXP with a business license') }} + here + + + {% endif %} diff --git a/src/bundle/Resources/views/themes/admin/ui/dashboard/block/ez.html.twig b/src/bundle/Resources/views/themes/admin/ui/dashboard/block/ez.html.twig index fdde3b1f..5ca9efd5 100644 --- a/src/bundle/Resources/views/themes/admin/ui/dashboard/block/ez.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/dashboard/block/ez.html.twig @@ -38,7 +38,7 @@ {% else %} {{ 'dashboard.ez_version.non_stable_packages'|trans({'%stability%': ez.stability})|desc("Your setup is running with @%stability% composer packages. This is not recommended except when testing updates or during development.") }} {% endif %} - {% if ez.isEnterpise %} + {% if ez.isEnterprise %} {{ 'dashboard.ez_version.non_stable_ee'|trans({'%support_url%': urls['support']})|desc("If you need assistance, don't hesitate to get in touch with Ibexa support.")|raw }} {% endif %} @@ -79,7 +79,7 @@ |raw }} - {% elseif not ez.isEnterpise %} + {% elseif not ez.isEnterprise %} {% set badge = 'GPL' %} {% if ez.isEndOfMaintenance %} {# In the future with retrival of info from updates.ez.no we can detect missing (public) security fixes and then let this become an error #} diff --git a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php index 2a0f032f..1932760c 100644 --- a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php +++ b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php @@ -141,7 +141,7 @@ public function collect(): IbexaSystemInfo $hasTTLComposerRepo = \in_array('https://updates.ez.no/ttl', $this->composerInfo->repositoryUrls); if ($package = $this->getFirstPackage(self::ENTERPRISE_PACKAGES)) { - $ibexa->isEnterpise = true; + $ibexa->isEnterprise = true; $ibexa->isTrial = $hasTTLComposerRepo && $package->license === 'TTL-2.0'; $ibexa->name = 'Ibexa DXP'; } @@ -163,7 +163,7 @@ public function collect(): IbexaSystemInfo } if (isset(self::EOL[$ibexaRelease])) { - if (!$ibexa->isEnterpise) { + if (!$ibexa->isEnterprise) { $ibexa->isEndOfLife = $ibexa->isEndOfMaintenance; } else { $ibexa->isEndOfLife = strtotime(self::EOL[$ibexaRelease]) < time(); diff --git a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php index aba0f28a..ba6644a7 100644 --- a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php +++ b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php @@ -28,7 +28,7 @@ class IbexaSystemInfo extends ValueObject implements SystemInfo /** * @var bool */ - public $isEnterpise = false; + public $isEnterprise = false; /** * @var bool From edc073e5c0a7787d875734dc238aaadb44d56af6 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Thu, 29 Oct 2020 12:34:27 +0100 Subject: [PATCH 07/10] added missing translation --- src/bundle/Resources/translations/systeminfo.en.xliff | 5 +++++ .../views/themes/admin/system_info/my_ibexa.html.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index 619cb359..03e83b16 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -106,6 +106,11 @@ You can read more about Service Life for Ibexa DXP with a business license key: ibexa.read_more
+ + here + here + key: ibexa.here + Hardware Hardware diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index f6619c63..6111c453 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -60,7 +60,7 @@
* {{ 'ibexa.read_more'|trans|desc('You can read more about Service Life for Ibexa DXP with a business license') }} - here + {{ 'ibexa.here'|trans|desc('here') }} {% endif %} From cc5314ef02eb4df7391f7a417a0ab3233ee0f44b Mon Sep 17 00:00:00 2001 From: konradoboza Date: Thu, 29 Oct 2020 19:17:18 +0100 Subject: [PATCH 08/10] cr remarks --- .../Resources/translations/systeminfo.en.xliff | 9 ++------- .../themes/admin/system_info/my_ibexa.html.twig | 14 ++++++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index 03e83b16..bcaba4e2 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -102,15 +102,10 @@ key: ibexa.stability
- You can read more about Service Life for Ibexa DXP with a business license - You can read more about Service Life for Ibexa DXP with a business license + You can read more about Service Life for Ibexa DXP with a business license at + You can read more about Service Life for Ibexa DXP with a business license at key: ibexa.read_more - - here - here - key: ibexa.here - Hardware Hardware diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index 6111c453..34540bcd 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -19,7 +19,7 @@ {{ 'ibexa.is_dxp'|trans|desc('Is DXP') }} - + @@ -27,7 +27,7 @@ {{ 'ibexa.is_commerce'|trans|desc('Has Commerce') }} - + @@ -35,7 +35,7 @@ {{ 'ibexa.is_trial'|trans|desc('Is Trial') }} - + @@ -43,7 +43,7 @@ {{ 'ibexa.stability'|trans|desc('Stability') }} {{ info.stability }} - {% if info.isEnterprise == true %} + {% if info.isEnterprise %} {{ 'ibexa.eom'|trans|desc('End of Maintenance') }}* @@ -59,8 +59,10 @@
- * {{ 'ibexa.read_more'|trans|desc('You can read more about Service Life for Ibexa DXP with a business license') }} - {{ 'ibexa.here'|trans|desc('here') }} + * {{ 'ibexa.read_more'|trans|desc('You can read more about Service Life for Ibexa DXP with a business license at') }} + + https://support.ibexa.co/Public/Service-Life + {% endif %} From e17085b4c9725450897faad6e350c55d6a38357e Mon Sep 17 00:00:00 2001 From: konradoboza Date: Mon, 2 Nov 2020 11:16:12 +0100 Subject: [PATCH 09/10] wrong translation key --- .../Resources/views/themes/admin/system_info/my_ibexa.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index 34540bcd..4c664400 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -24,7 +24,7 @@ - {{ 'ibexa.is_commerce'|trans|desc('Has Commerce') }} + {{ 'ibexa.has_commerce'|trans|desc('Has Commerce') }} From 606dd78b630c65d007a235d4bc761d4282be845d Mon Sep 17 00:00:00 2001 From: konradoboza Date: Tue, 3 Nov 2020 08:58:51 +0100 Subject: [PATCH 10/10] improved naming reflecting recent product renaming --- .../Resources/translations/systeminfo.en.xliff | 10 ---------- .../themes/admin/system_info/my_ibexa.html.twig | 16 ---------------- .../Collector/IbexaSystemInfoCollector.php | 2 +- src/bundle/SystemInfo/Value/IbexaSystemInfo.php | 2 +- .../Collector/IbexaSystemInfoCollectorTest.php | 2 +- .../SystemInfo/Collector/_fixtures/composer.json | 4 ++-- 6 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/bundle/Resources/translations/systeminfo.en.xliff b/src/bundle/Resources/translations/systeminfo.en.xliff index bcaba4e2..7cb99576 100644 --- a/src/bundle/Resources/translations/systeminfo.en.xliff +++ b/src/bundle/Resources/translations/systeminfo.en.xliff @@ -71,16 +71,6 @@ Version key: ibexa.version
- - Is DXP - Is DXP - key: ibexa.is_dxp - - - Has Commerce - Has Commerce - key: ibexa.has_commerce - End of Maintenance End of Maintenance diff --git a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig index 4c664400..95dd1930 100644 --- a/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig +++ b/src/bundle/Resources/views/themes/admin/system_info/my_ibexa.html.twig @@ -15,22 +15,6 @@ {{ 'ibexa.version'|trans|desc('Version') }} {{ info.release }} - - {{ 'ibexa.is_dxp'|trans|desc('Is DXP') }} - - - - - - - - {{ 'ibexa.has_commerce'|trans|desc('Has Commerce') }} - - - - - - {{ 'ibexa.is_trial'|trans|desc('Is Trial') }} diff --git a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php index 1932760c..be8829f3 100644 --- a/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php +++ b/src/bundle/SystemInfo/Collector/IbexaSystemInfoCollector.php @@ -143,7 +143,7 @@ public function collect(): IbexaSystemInfo if ($package = $this->getFirstPackage(self::ENTERPRISE_PACKAGES)) { $ibexa->isEnterprise = true; $ibexa->isTrial = $hasTTLComposerRepo && $package->license === 'TTL-2.0'; - $ibexa->name = 'Ibexa DXP'; + $ibexa->name = 'Ibexa Experience'; } if ($package = $this->getFirstPackage(self::COMMERCE_PACKAGES)) { diff --git a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php index ba6644a7..c76bc683 100644 --- a/src/bundle/SystemInfo/Value/IbexaSystemInfo.php +++ b/src/bundle/SystemInfo/Value/IbexaSystemInfo.php @@ -18,7 +18,7 @@ class IbexaSystemInfo extends ValueObject implements SystemInfo /** * @var string */ - public $name = 'Ibexa Platform'; + public $name = 'Ibexa Open Source'; /** * @var string|null Either string like '2.5' or null if not detected. diff --git a/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php b/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php index 037cca13..59145e41 100644 --- a/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php +++ b/src/bundle/Tests/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php @@ -23,7 +23,7 @@ public function testCollect(): void $systemInfoCollector = new IbexaSystemInfoCollector($composerCollector); $systemInfo = $systemInfoCollector->collect(); - self::assertSame('Ibexa Platform', $systemInfo->name); + self::assertSame('Ibexa Open Source', $systemInfo->name); self::assertSame(EzPlatformCoreBundle::VERSION, $systemInfo->release); } } diff --git a/src/bundle/Tests/SystemInfo/Collector/_fixtures/composer.json b/src/bundle/Tests/SystemInfo/Collector/_fixtures/composer.json index fd529cfa..c9f50a34 100644 --- a/src/bundle/Tests/SystemInfo/Collector/_fixtures/composer.json +++ b/src/bundle/Tests/SystemInfo/Collector/_fixtures/composer.json @@ -1,12 +1,12 @@ { "name": "ezsystems/ezplatform-ee", - "description": "eZ Platform Enterprise Edition distribution", + "description": "Ibexa Experience distribution", "homepage": "https://github.com/ezsystems/ezplatform-ee", "license": "proprietary", "type": "project", "authors": [ { - "name": "eZ dev-team & eZ Community", + "name": "Ibexa dev-team & Ibexa Community", "homepage": "https://github.com/ezsystems/ezplatform-ee/contributors" } ],