Skip to content

The LUYA environment for developers repo helps you developing new extension and modules or making pull requests to the luya core repos.

License

Notifications You must be signed in to change notification settings

luyadev/luya-env-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

802fa18 · May 29, 2019

History

82 Commits
Dec 18, 2017
Apr 1, 2019
Feb 6, 2019
Dec 18, 2017
Dec 18, 2017
Apr 1, 2019
Jul 18, 2018
May 29, 2019
May 29, 2019
May 27, 2019
May 27, 2019
May 15, 2019

Repository files navigation

LUYA Logo

LUYA Dev Environment

LUYA Latest Stable Version Total Downloads Slack Support

The LUYA DEV ENV repo helps you developing new extension and modules or making pull requests to the luya core repos.

Installation

Before installing the env dev project, fork the repos you like to work with.

  1. Create project into your workspace composer create-project luyadev/luya-env-dev a. When asked Do you want to remove the existing VCS (.git, .svn..) history? - answer with Y, Yes.
  2. Run init command ./vendor/bin/luyadev repo/init
  3. Rename env.php.dist to env.php and modify your Database connection component to match your local env settings.
  4. Execute commands ./luya migrate, ./luya import, ./luya admin/setup, ./luya health.
  5. Access public_html on your webserver.

Update your local luya-env-dev repos

To fetch the upstream for all forked modules from the repos folder run:

./vendor/bin/luyadev repo/update

Make sure you push each module after update to get your remote fork even with the upstream.

Its highly recommend to leave the master branch of the modules untouched to ensure that rebasing works properly. Always create a new branch to work on it.

Changes, collaboration and contribution

For all the FORKED repos (not the read only repos) you can now make changes directly in the repos/ folder. Assuming you want to make a change in the luya-admin-module which you have forked to your account:

  1. Go into the luya-module-admin cd /repos/luya-module-admin.
  2. Create new branch and commit your changes git branch my-fix go into branch git checkout my-fix.
  3. Make your changes and add them git add . and commit git commit -m 'Added something ...'.
  4. Push branch to your fork git push origin my-fix.
  5. Create pull request from GitHub.

Run Unit Tests for a Repo

In order to run your tests for the repo please keep in mind that first of all you have to run composer install in the root of the repo (e.g. replos/luya-admin-module) to install all dependencies afterwards run ./vendor/bin/phpunit tests in the root of the repo to run the tests in the tests-folder.

Develop your own module or extension

  1. Clone your repo into the repos folder with ./vendor/bin/luyadev repo/clone USERNAME/REPO_NAME.
  2. Create a Module.php file accordingly to the LUYA guide specifications.
  3. Adding your module via psr-4 binding to your composer.json at the autoload section from luya-env-dev root directory.
  4. Run composer dump-autoload for luya-env-dev.
  5. Include your module in configs/env.php.

If you would like to use the @bower alias inside your own module to include dependencies from vendor/bower keep in mind that dependecies need to be installed via composer inside your luya-env-dev root directory.

Managing assets and vendors in modules and extensions

Please keep in mind that all modules and extensions are treated as independent projects, so do not forget to run in the root directory of the module composer install and probably npm install in the /resources directories of modules to download all needed dependencies.

Find more infos

About

The LUYA environment for developers repo helps you developing new extension and modules or making pull requests to the luya core repos.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published