LUYA Dev Environment
The LUYA DEV ENV repo helps you developing new extension and modules or making pull requests to the luya core repos.
Before installing the env dev project, fork the repos you like to work with.
- Create project into your workspace
composer create-project luyadev/luya-env-deva. When asked
Do you want to remove the existing VCS (.git, .svn..) history?- answer with
- Run init command
env.phpand modify your Database connection component to match your local env settings.
- Execute commands
public_htmlon your webserver.
Update your local luya-env-dev repos
To fetch the upstream for all forked modules from the
repos folder run:
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:
- Go into the luya-module-admin
- Create new branch and commit your changes
git branch my-fixgo into branch
git checkout my-fix.
- Make your changes and add them
git add .and commit
git commit -m 'Added something ...'.
- Push branch to your fork
git push origin my-fix.
- Create pull request from GitHub.
Develop your own module or extension
- Clone your repo into the repos folder with
./vendor/bin/luyadev repo/clone USERNAME/REPO_NAME.
- Create a
Module.phpfile accordingly to the LUYA guide specifications.
- Adding your module via psr-4 binding to your
composer.jsonat the autoload section from luya-env-dev root directory.
composer dump-autoloadfor luya-env-dev.
- Include your module in
If you would like to use the
@boweralias inside your own module to include dependencies from
vendor/bowerkeep 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.