diff --git a/Block/Adminhtml/System/Config/Environments/Table.php b/Block/Adminhtml/System/Config/Environments/Table.php index 8cef4ac..debb0ce 100644 --- a/Block/Adminhtml/System/Config/Environments/Table.php +++ b/Block/Adminhtml/System/Config/Environments/Table.php @@ -4,7 +4,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ diff --git a/Block/Adminhtml/System/Config/Form/Field/Style.php b/Block/Adminhtml/System/Config/Form/Field/Style.php index b78c961..8c30f35 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Style.php +++ b/Block/Adminhtml/System/Config/Form/Field/Style.php @@ -4,7 +4,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ diff --git a/Helper/Data.php b/Helper/Data.php index b5d7eb4..eea858d 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -4,7 +4,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ diff --git a/Observer/Adminhtml/AddCss.php b/Observer/Adminhtml/AddCss.php index 7c32fb2..9467234 100644 --- a/Observer/Adminhtml/AddCss.php +++ b/Observer/Adminhtml/AddCss.php @@ -4,7 +4,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ diff --git a/README.md b/README.md index 3d23750..3b68f3d 100644 --- a/README.md +++ b/README.md @@ -11,30 +11,15 @@ anyone from accidentally changing content on the wrong environment. - Magento 2.3.x, 2.4.x - PHP 5.6.x, 7.x -## Installation (Composer) - -1. Update your composer.json `composer require "magenizr/magento2-envbar":"1.0.2" --no-update` -2. Install dependencies and update your composer.lock `composer update --lock` - -``` -./composer.json has been updated -Loading composer repositories with package information -Updating dependencies (including require-dev) -Package operations: 1 install, 0 updates, 0 removals - - Installing magenizr/magento2-envbar (1.0.2): Downloading (100%) -Writing lock file -Generating autoload files -``` - ## Installation (Composer 2) -1. Update your composer.json `composer require "magenizr/magento2-envbar":"1.0.2" --no-update` +1. Update your composer.json `composer require "magenizr/magento2-envbar":"^1.0" --no-update` 2. Use `composer update magenizr/magento2-envbar --no-install` to update your composer.lock file. ``` Updating dependencies Lock file operations: 1 install, 1 update, 0 removals - - Locking magenizr/magento2-envbar (1.0.2) + - Locking magenizr/magento2-envbar (1.0.3) ``` 3. And then `composer install` to install the package. @@ -43,7 +28,7 @@ Lock file operations: 1 install, 1 update, 0 removals Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Package operations: 1 install, 0 update, 0 removals - - Installing magenizr/magento2-envbar (1.0.2): Extracting archive + - Installing magenizr/magento2-envbar (1.0.3): Extracting archive ``` 4. Enable the module and clear static content. @@ -56,7 +41,7 @@ php bin/magento setup:upgrade ## Installation (Manually) 1. Download the code. -2. Extract the downloaded tar.gz file. Example: `tar -xzf Magenizr_Envbar_1.0.2.tar.gz`. +2. Extract the downloaded tar.gz file. Example: `tar -xzf Magenizr_Envbar_1.0.3.tar.gz`. 3. Copy the code into `./app/code/Magenizr/Envbar/`. 4. Enable the module and clear static content. @@ -77,9 +62,7 @@ Simply go to `Stores > Configuration > Magenizr > Envbar` and enable the module ## Support -If you experience any issues, don't hesitate to open an issue -on [Github](https://github.com/magenizr/Magenizr_Envbar/issues). For a custom build, don't hesitate to contact us -on [Magento Marketplace](https://marketplace.magento.com/partner/magenizr). +If you experience any issues, don't hesitate to open an issue on [Github](https://github.com/magenizr/Magenizr_Envbar/issues). ## Purchase @@ -91,6 +74,11 @@ Follow us on [GitHub](https://github.com/magenizr), [Twitter](https://twitter.co and [Facebook](https://www.facebook.com/magenizr). ## History +===== 1.0.3 ===== +* 2.4.6 compatibility tested +* Cleanup various files to meet coding standards (EQP, ECG) +* Remove InstallData.php, styles.css, default.xml + ===== 1.0.2 ===== * Cleanup various files to meet coding standards (EQP, ECG) * Replace InstallData with Data Patch diff --git a/Setup/InstallData.php b/Setup/InstallData.php deleted file mode 100644 index 187c1dc..0000000 --- a/Setup/InstallData.php +++ /dev/null @@ -1,75 +0,0 @@ -configFactory = $configFactory; - $state->setAreaCode('adminhtml'); - } - - /** - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) - { - $index = time(); - $configData = [ - 'section' => 'magenizr_envbar', - 'website' => null, - 'store' => null, - 'groups' => [ - 'general' => [ - 'fields' => [ - 'environments' => [ - 'value' => [ - $index.'_0' => [ - 'name' => 'Development', - 'url' => '*.develop,*.local', - 'style' => 'development', - ], - $index.'_1' => ['name' => 'Staging', 'url' => '*.build', 'style' => 'staging'], - $index.'_2' => [ - 'name' => 'Production', - 'url' => '*.com.au,*.com', - 'style' => 'production', - ], - ], - ], - ], - ], - ], - ]; - - /** @var \Magento\Config\Model\Config $configModel */ - $configModel = $this->configFactory->create(['data' => $configData]); - $configModel->save(); - } -} diff --git a/Setup/Patch/Data/Defaults.php b/Setup/Patch/Data/Defaults.php index 760a9fc..f27c8aa 100644 --- a/Setup/Patch/Data/Defaults.php +++ b/Setup/Patch/Data/Defaults.php @@ -4,7 +4,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ @@ -20,7 +20,7 @@ class Defaults implements DataPatchInterface { - protected const XML_PATH_ENV = 'magenizr_envbar/general/environments'; + const XML_PATH_ENV = 'magenizr_envbar/general/environments'; /** * @var ModuleDataSetupInterface diff --git a/composer.json b/composer.json index 37c1609..bc7a6af 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magenizr/magento2-envbar", "type": "magento2-module", - "version": "1.0.2", + "version": "1.0.3", "license": "OSL-3.0", "description": "Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation. This should help backend users to identify the environment ( e.g local, develop, staging, production ) and prevent anyone from accidentally changing content on the wrong environment.", "keywords": [ diff --git a/etc/adminhtml/events.xml b/etc/adminhtml/events.xml index b48ed26..0ac60b4 100644 --- a/etc/adminhtml/events.xml +++ b/etc/adminhtml/events.xml @@ -3,7 +3,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ --> diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index cbfe473..44aa427 100755 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -3,7 +3,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ --> diff --git a/etc/config.xml b/etc/config.xml index 06a087a..9a9e614 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -3,7 +3,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ --> diff --git a/etc/module.xml b/etc/module.xml index 9cfad1a..2b0faeb 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -3,7 +3,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ --> diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index ccc3c77..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,8 +0,0 @@ -var gulp = require('gulp'); -var gulpless = require('gulp-less'); - -gulp.task('styles', function () { - return gulp.src(['view/adminhtml/web/less/source/styles.less']) - .pipe(gulpless()) - .pipe(gulp.dest('view/adminhtml/web/css/source/')) -}); diff --git a/registration.php b/registration.php index 9b3d616..dd23715 100755 --- a/registration.php +++ b/registration.php @@ -2,7 +2,7 @@ /** * Magenizr Envbar * - * @copyright Copyright (c) 2021 Magenizr (https://www.magenizr.com) + * @copyright Copyright (c) 2021 - 2023 Magenizr (https://www.magenizr.com) * @license https://www.magenizr.com/license Magenizr EULA */ diff --git a/view/adminhtml/layout/default.xml b/view/adminhtml/layout/default.xml deleted file mode 100644 index 9578a2f..0000000 --- a/view/adminhtml/layout/default.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/view/adminhtml/web/less/source/styles.less b/view/adminhtml/web/css/source/_module.less similarity index 100% rename from view/adminhtml/web/less/source/styles.less rename to view/adminhtml/web/css/source/_module.less diff --git a/view/adminhtml/web/css/source/styles.css b/view/adminhtml/web/css/source/styles.css deleted file mode 100644 index 9b12b3b..0000000 --- a/view/adminhtml/web/css/source/styles.css +++ /dev/null @@ -1,19 +0,0 @@ -.magenizr-envbar:not(.adminhtml-auth-login) .menu-wrapper { - top: 20px !important; -} - -.magenizr-envbar:not(.adminhtml-auth-login).env-development .menu-wrapper:before { - border-top: 20px solid #28b41c; -} - -.magenizr-envbar:not(.adminhtml-auth-login).env-staging .menu-wrapper:before { - border-top: 20px solid #d9b227; -} - -.magenizr-envbar:not(.adminhtml-auth-login).env-production .menu-wrapper:before { - border-top: 20px solid #e30c0c; -} - -.magenizr-envbar:not(.adminhtml-auth-login).env-custom .menu-wrapper:before { - border-top: 20px solid #f5c6cb; -}