-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Project Structure Proposal #466
Comments
@cbleek and me have discussed this thoroughly in the last weeks and we fully agree with this proposal. Indeed, we came to the conclusion that we should go even further: -> 1. Skeleton applicationYes. It should be called 'yawik/yawik' and be 'installable' with composers' creat-project directive. -> 2. Development MethodInstead of relying on a custom git command (subsplit), we should split the current repository once. For development, one then have to add the repositories in the composer.json to checkout the respective repository instead of simply copying files from a specific tag as it will be done for production installations.
Other
@kilip We highly appreciate your enthusiasm and motivation to improve YAWIK. Keep it up! |
hi @cbleek @TiSiE @sergey-galenko and all developers, Since my pull #498 is merged, we need to do $ cd /path/to/yawik
$ git pull origin develop
$ composer install This command will execute the docker integrationI am introducing a docker into yawik development: $ cd /path/to/yawik
$ docker-compose up With this command we will have nginx, php, mongodb, and selenium running in docker. You can browse yawik in this address: |
Hi Toni, if I install yawik using:
I get the the following exception:
|
Hi @cbleek , I have made some changes, so please try to install yawik again using create-project command. By default Yawik in production environment, copy your path/to/yawik/.env.dist file to .env and change APPLICATION_ENV value to development. This is one of the reason why I want to make #504 pull request to disable cache in install mode also clear cache files if config is changed. Regards, |
Hi @kilip But I've:
And after that, I can access https://composer.yawik.org/en I've put your ssh key on the dev mashine any you should be able to |
New Installation Method
Current yawik installation method have a complex process to update, because we need to download latest yawik version and replace directory contents with a new yawik version from zip file. And we can't easily customize every yawik installation too, because every yawik installation have a same
composer.json
file.By using composer and with proper project structure, we can simplify this install/update method and make every yawik installation to be fully customizable.
1. Skeleton Application
By creating a skeleton project every yawik installation can be customized easily, such as define additional requirements or library in composer.json:
Now install and update can be easily done by using composer
install
orupdate
command.2. Development Method
In order to support new installation method above, we need to make all yawik core modules (Core,Auth, Jobs, Organizations, etc.) installable from composer. Every core modules should have their own dependencies defined in
composer.json
file with psr4 autoload definition:Since we need to define every module as github repository in packagist, we need to
git subsplit
our main repositorycross-solution/yawik
intoyawik/*
:This can be done automatically upon commit by using github web hook.
3. A Test Project
I have create a skeleton project called
yawik/standard
:https://github.com/kilip/yawik-standard
To make this test project working, I need to modify
cross-solution/yawik
repository and create a special yawik github repository:https://github.com/kilip/yawik-test
Here's what I modify in that
yawik-test
repository:ModuleName/Module.php
file toModuleName/src/Module.php
directory, so it compatible with psr4 autoloading.ModuleName/src/*
to fit psr4 autoloading.composer.json
file, so can be loaded automatically in skeleton project.autolad_classmap.php
files because autolad already provided by composer autoloadModuleName\Module::getAutoloaderConfig()
method, because we already use composer psr4 autoloadingCoding Standard
All Yawik module should use psr-4 autoloading, and to prevent conflict with another external library I think we should start prefix all module with
Yawik
:I know this will make a lot of breaking changes and bugs, but with the help of
phpunit
andbehat
test we can easily detect error during prefixing module namespace.The text was updated successfully, but these errors were encountered: