magebit / module-magento2-configurator
Keep magento persistently configured using files
Installs: 8 698
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 60
Open Issues: 3
Type:magento2-module
Requires
- firegento/fastsimpleimport: ^2.0
- symfony/yaml: ~4.0|~5.0|~6.0
Requires (Dev)
- magento/magento-coding-standard: 5
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^6.2
- satooshi/php-coveralls: ^1.0
- sebastian/phpcpd: ~3.0 || ~4.0
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-11-05 11:27:25 UTC
README
A Magento module initially created by CTI Digital to create and maintain database variables using files. This module aims to bring the following benefits to a Magento developer's work flow:
- Install Magento from scratch with important database based configuration ready.
- Share and collaborate configuration with other colleagues using your own versioning system.
- Keep versions of your configurations using your own versioning system.
- Split your configuration based on the environment you're developing on.
Adjustments by Magebit
- Create/Maintain mode functionality
- Currently support these components
- Category
- CMS Pages/Blocks
- Configuration
- Currently support these components
- Better templating system for CMS content to allow for phtml files
- Adds version control for Create mode (Usage info: https://github.com/magebitcom/magento2-configurator/wiki/Versioning)
- Currently supports these components
- CMS Pages/Blocks
- Currently supports these components
If you're interested to find out more about the background of the configurator, watch this lightning talk by Raj Chevli at Mage Titans in Manchester on YouTube.
This is a work in progress and by no means for use with production environments (and probably not even development environments either just yet).
Testing Locally For Development
If you are contributing the module, please run the following commands to stand the best chance with Travis CI liking your code. These test include PHP Code Sniffer, PHP Mess Detector, PHP Copy and Paste Detector, PHP Unit
php vendor/bin/phpcs --standard=vendor/magento/magento-coding-standard/Magento2/ruleset.xml vendor/ctidigital/magento2-configurator/Model/ vendor/ctidigital/magento2-configurator/Console/ vendor/ctidigital/magento2-configurator/Test/ vendor/ctidigital/magento2-configurator/Api/ vendor/ctidigital/magento2-configurator/Component/ vendor/ctidigital/magento2-configurator/Exception/
php vendor/bin/phpmd vendor/ctidigital/magento2-configurator/Model/,vendor/ctidigital/magento2-configurator/Console/,vendor/ctidigital/magento2-configurator/Test/,vendor/ctidigital/magento2-configurator/Api/,vendor/ctidigital/magento2-configurator/Component/,vendor/ctidigital/magento2-configurator/Exception/ text cleancode,codesize,controversial,design,naming,unusedcode
php vendor/bin/phpcpd vendor/ctidigital/magento2-configurator/Model/ vendor/ctidigital/magento2-configurator/Console vendor/ctidigital/magento2-configurator/Test/ vendor/ctidigital/magento2-configurator/Api/ vendor/ctidigital/magento2-configurator/Component/ vendor/ctidigital/magento2-configurator/Exception/
php vendor/bin/phpunit vendor/ctidigital/magento2-configurator/Test/Unit/
Known issues
Integration tests
- Configure your Magento integration test environment.
- Add the XML below to dev/tests/integration/phpunit.xml.dist
<testsuite name="magento2-configurator">
<directory>../../../vendor/ctidigital/magento2-configurator/Test/Integration</directory>
</testsuite>
- You can run the tests from the correct place on the command line
/dev/tests/integration$ ../../../vendor/bin/phpunit --testsuite "magento2-configurator"
- You can also add the magento PHP developer tools to your path, so that you do not have to specify location of phpunit
export PATH=$PATH:/var/www/magento2/vendor/bin
Unit tests
If you're developing a new component, please ensure you have your corresponding unit test which extends ComponentAbstractTestCase
as that will test that your component has the required functions.
Do also include sample files with your component that works
Travis
We also use Travis CI to automate part of the testing process (we are still looking to add more to this!). It tests the following:
- CodeSniffer
- MessDetector
- Copy & Paste Detection
- Unit Tests
- Run Configurator (we aim to run it on these versions)
- Latest 3 minor versions
- Latest release candidate (allowed to fail)
Getting Started
- Create a
master.yaml
file in<mage_root>/app/etc/
. (seeSamples/master.yaml
) - Enable Modules
CtiDigital_Configurator
,FireGento_FastSimpleImport
. - Run
bin/magento configurator:run --env="<environment>"
Usage
- Listing available components
bin/magento configurator:list
- Running individual components
bin/magento configurator:run --env="<environment>" --component="config"
- Extra logs
bin/magento configurator:run --env="<environment>" -v
Roadmap for components to do
License
MIT