Skip to content

Commit c4bca67

Browse files
committed
feat(): 📦 Add basic package release
0 parents  commit c4bca67

9 files changed

+172
-0
lines changed

.gitlab-ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
stages:
2+
- deploy
3+
4+
deploy_composer:
5+
image: curlimages/curl:latest
6+
only:
7+
- tags
8+
stage: deploy
9+
script:
10+
- curl -sS --show-error --fail --data tag=${CI_COMMIT_TAG} "https://__token__:${DEPLOY_TOKEN}@git.team23.de/api/v4/projects/${CI_PROJECT_ID}/packages/composer"

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
## [1.0.0] - 2023-03-01
8+
9+
Initial release.

LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2023 Team23 GmbH
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its contributors may be used
15+
to endorse or promote products derived from this software without
16+
specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Plugin/RemoveElasticSuiteBanner.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Team23\RemoveElasticSuiteBanner\Plugin;
6+
7+
use Smile\ElasticsuiteCore\Model\System\Message\NotificationAboutVersions;
8+
9+
/**
10+
* Class RemoveElasticSuiteBanner
11+
*
12+
* Remove the ElasticSuite banner notification from top of backend messages.
13+
*/
14+
class RemoveElasticSuiteBanner
15+
{
16+
/**
17+
* Prevent notification being displayed
18+
*
19+
* @param NotificationAboutVersions $subject
20+
* @param bool $result
21+
* @return bool
22+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
23+
*/
24+
public function afterIsDisplayed(NotificationAboutVersions $subject, bool $result): bool
25+
{
26+
return false;
27+
}
28+
}

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Team23 Remove ElasticSuite Banner extension
2+
3+
Prevents backend notification being displayed.
4+
5+
## Description
6+
7+
The newest Smile_ElasticSuite extension versions are displaying a notification on top of the backend, which can't get
8+
marked as read by the user. This extension prevents this banner from being displayed at all.
9+
10+
## Installation
11+
12+
Installation is done via `composer`.
13+
14+
### Add composer registry
15+
16+
```shell
17+
composer config repositories.git.team23.de/171 '{"type": "composer", "url": "https://git.team23.de/api/v4/group/171/-/packages/composer/packages.json"}'
18+
```
19+
20+
### Install package
21+
22+
```shell
23+
composer require team23/module-remove-elasticsuite-banner
24+
```
25+
26+
Use following commands to enable the extension:
27+
28+
```shell
29+
bin/magento module:enable Team23_RemoveElasticSuiteBanner
30+
bin/magento setup:upgrade
31+
```

composer.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "team23/module-remove-elasticsuite-banner",
3+
"description": "Remove ElasticSuite notification from Magento backend",
4+
"type": "magento2-module",
5+
"version": "1.0.0",
6+
"license": [
7+
"BSD-3-Clause"
8+
],
9+
"authors": [
10+
{
11+
"name": "Team23 GmbH",
12+
"email": "[email protected]",
13+
"homepage": "https://www.team23.de"
14+
}
15+
],
16+
"keywords": [
17+
"Magento 2",
18+
"Elasticsearch",
19+
"ElasticSuite"
20+
],
21+
"require": {
22+
"php": "^7.4||^8.1",
23+
"magento/framework": ">=103",
24+
"magento/module-backend": ">=100",
25+
"smile/module-elasticsuite-core": ">=2.10.13"
26+
},
27+
"minimum-stability": "stable",
28+
"prefer-stable": true,
29+
"autoload": {
30+
"files": [
31+
"registration.php"
32+
],
33+
"psr-4": {
34+
"Team23\\RemoveElasticSuiteBanner\\": ""
35+
}
36+
}
37+
}

etc/adminhtml/di.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
5+
<type name="Smile\ElasticsuiteCore\Model\System\Message\NotificationAboutVersions">
6+
<plugin name="remove_elasticsuite_banner"
7+
type="Team23\RemoveElasticSuiteBanner\Plugin\RemoveElasticSuiteBanner"
8+
sortOrder="1"/>
9+
</type>
10+
</config>

etc/module.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0"?>
2+
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
5+
<module name="Team23_RemoveElasticSuiteBanner">
6+
<sequence>
7+
<module name="Magento_Backend"/>
8+
<module name="Smile_ElasticsuiteCore"/>
9+
</sequence>
10+
</module>
11+
</config>

registration.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
use \Magento\Framework\Component\ComponentRegistrar;
4+
5+
ComponentRegistrar::register(
6+
ComponentRegistrar::MODULE,
7+
'Team23_RemoveElasticSuiteBanner',
8+
__DIR__
9+
);

0 commit comments

Comments
 (0)