{"id":29196616,"url":"https://github.com/flancer32/sample_mage2_module","last_synced_at":"2025-07-02T06:07:52.168Z","repository":{"id":62505331,"uuid":"43493121","full_name":"flancer32/sample_mage2_module","owner":"flancer32","description":"Stub for Magento 2 module with development environment","archived":false,"fork":false,"pushed_at":"2017-02-02T17:00:28.000Z","size":640,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-21T13:53:01.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flancer32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-01T11:38:14.000Z","updated_at":"2024-04-21T13:53:01.081Z","dependencies_parsed_at":"2022-11-02T12:45:33.282Z","dependency_job_id":null,"html_url":"https://github.com/flancer32/sample_mage2_module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flancer32/sample_mage2_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fsample_mage2_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fsample_mage2_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fsample_mage2_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fsample_mage2_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flancer32","download_url":"https://codeload.github.com/flancer32/sample_mage2_module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fsample_mage2_module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263083718,"owners_count":23411165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-02T06:07:46.578Z","updated_at":"2025-07-02T06:07:52.160Z","avatar_url":"https://github.com/flancer32.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample module for Magento 2\n\nStub for Magento 2 module with development environment.\n\n[![Build Status](https://travis-ci.org/flancer32/sample_mage2_module.svg)](https://travis-ci.org/flancer32/sample_mage2_module/)\n\nEnvironment is deployed using PHP Composer (sources are downloaded from Magento repo), contains simple tests units\nand CI descriptor to run these tests on Travis-CI.\n\n\n## Installation\n\n### Create local configuration\n\n    $ cp deploy.cfg.sh.init deploy.cfg.work.sh\n    $ nano deploy.cfg.work.sh    //edit configuration for deployment\n\n### Get credentials to authenticate on 'repo.magento.com'\n\nGo to your [Magento Connect](https://www.magentocommerce.com/magento-connect/customer/account/) account, \nsection (_My Account / Connect / Developer / Secure Keys_) and generate pair of keys to connect to Magento 2 repository.\n\n### Setup environment\n\n[System requirements](http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html)\n\n### Run deployment script\n\n    $ sh deploy.sh\n\n\tClean up application's root folder (/.../sample_mage2_module/work)...\n\n\tCreate M2 CE project in '/.../sample_mage2_module/work' using 'composer install'...\n\t\tAuthentication required (repo.magento.com):    // NOTE: on the first iteration only if you will save credentials.\n\t\t  Username: \u003cMagento pub key\u003e\n\t\t  Password: \u003cMagento priv key\u003e\n\t...\n\tFilter original    // NOTE: unset unnecessary nodes and merge Magento's \"composer.json\" with your own options.\n\t\t\t'/.../sample_DB_NAME_module/work/composer.json' on\n\t\t\t'/.../sample_DB_NAME_module/deploy/composer_unset.json' set and populate with additional options from\n\t\t\t'/.../sample_DB_NAME_module/deploy/composer_opts.json'...\n\t...\n\tUpdate M2 CE project with additional options...\n\t...\n\tDrop M2 database DB_NAME...\n\tDatabase \"DB_NAME\" dropped\n\n\t(Re)install Magento using database 'DB_NAME' (connecting as 'USER_NAME').\n\t...\n\tCreate working folders before permissions will be set.\n\n\tSwitch Magento 2 instance into 'developer' mode.\n\tEnabled developer mode.\n\n\tSet file system ownership (OWNER:GROUP) and permissions...\n\n\tDeployment is done.\n\tGo to http://.../ to check your Magento 2 instance.\n\n\n\n## Tests\n\n    $ cd work/vendor\n    $ php ./bin/phpunit -c flancer32/sample_mage2_module/test/unit/phpunit.dist.xml\n    $ php ./bin/phpunit -c flancer32/sample_mage2_module/test/functional/phpunit.dist.xml\n\n## Travis CI\n\n[Last log](https://travis-ci.org/flancer32/sample_mage2_module/).\n\n\n## Notes\n\n### Install Composer\n\nThis is allowed for PHP 5.6:\n\n    $ sudo apt-get install composer\n\nUse this method for PHP 7:\n\n    $ curl -sS https://getcomposer.org/installer | php\n    $ sudo mv composer.phar /usr/local/bin/composer\n\n### Required PHP exts\n\nYou can see error message like this\n\n    Your requirements could not be resolved to an installable set of packages.\n\n      Problem 1\n        - Installation request for magento/product-community-edition 2.0.2 -\u003e satisfiable by magento/product-community-edition[2.0.2].\n        - magento/product-community-edition 2.0.2 requires ext-gd * -\u003e the requested PHP extension gd is missing from your system.\n\nin case of not all [required PHP extensions](http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html) are installed.\n\nInstall PHP extensions on Ubuntu:\n\n    $ sudo apt-get install php7.0-bcmath php7.0-curl php7.0-gd php7.0-intl php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-xml libapache2-mod-php7.0 php7.0-zip php7.0-json php7.0-opcache\n\n\n## Apache2\n\n    $ sudo apt-get install libapache2-mod-php7.0\n    $ sudo a2enmod rewrite\n    $ sudo service apache2 restart\n\nSample of the virtual host config:\n\n    \u003cVirtualHost *:80\u003e\n            ServerName mage2.localhost\n            ServerAdmin webmaster@localhost\n            DocumentRoot /.../sample_mage2_module/work\n            \u003cDirectory \"/.../sample_mage2_module/work/\"\u003e\n                    AllowOverride All\n                    Require all granted\n            \u003c/Directory\u003e\n            LogLevel info\n            ErrorLog ${APACHE_LOG_DIR}/error.log\n            CustomLog ${APACHE_LOG_DIR}/access.log combined\n    \u003c/VirtualHost\u003e\n\nDon't forget about `AllowOverride All`, otherwise rewrite rules in `.htaccess` files will not be allowed and public resources will not be generated in the `/pub/static/[frontend|adminhtml]` folders.\n\n## Links\n\n* [Installing Magento 2 (Integrators)](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html)\n* [Magento 2: PHP 5.5, 5.6, or 7.0—CentOS](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html)\n* [Magento 2: PHP 5.5, 5.6, or 7.0—Ubuntu](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html)\n* [Magento authentication keys](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html)\n* [Travis CI: Defining Variables in Repository Settings](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflancer32%2Fsample_mage2_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflancer32%2Fsample_mage2_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflancer32%2Fsample_mage2_module/lists"}