Skip to content
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

yii2-bootstap application setup #325

Closed
schmunk42 opened this issue May 21, 2013 · 6 comments
Closed

yii2-bootstap application setup #325

schmunk42 opened this issue May 21, 2013 · 6 comments

Comments

@schmunk42
Copy link
Contributor

Would be nice, if creating a yii2-bootstrap project could also setup permissions for runtime and www/assets and also migrations or any command provided by package.

Could be implemented with composer scripts, here's a sample implementation for Yii 1.x.

@tonydspaniard
Copy link
Contributor

Agree with Tobias, Yiinitializr is another example (http://yiinitializr.2amigos.us)
Enviado desde mi BlackBerry® de Vodafone

-----Original Message-----
From: Tobias Munk notifications@github.com
Date: Tue, 21 May 2013 00:19:25
To: yiisoft/yii2yii2@noreply.github.com
Reply-To: yiisoft/yii2 reply@reply.github.com
Subject: [yii2] yii2-bootstap application setup (#325)

Would be nice, if creating a yii2-bootstrap project could also setup permissions for runtime and www/assets and also migrations or any command provided by package.

Could be implemented with composer scripts, here's a sample implementation for Yii 1.x.


Reply to this email directly or view it on GitHub:
#325

@samdark
Copy link
Member

samdark commented May 21, 2013

This one is the composer config for application template: https://github.com/yiisoft/yii2/blob/master/apps/bootstrap/composer.json

@schmunk42 @tonydspaniard can you handle creating a pull request with code that will set permissions?

@schmunk42
Copy link
Contributor Author

@samdark For sure I can create a PR for this, but I've some questions first, maybe there are changes in Yii2 which could make the process even easier.

If we want to trigger something via composer scripts, we have to deliver it in the yii2-bootstrap package, because we don't know the exact dependency order in advance. (We get yiisoft/yii2-bootstrap before we get yiisoft/yii2!)

So I created this callback script, which can be configured in console.php which commands to run, when a certain package gets installed (or updated).

This was the only way for me in Yii 1.x to accomplish the task of running a command. But this may be improved in Yii2.

Any suggestions before I start? Eg. conventions about the command name for the root package and/or extension packages, we shouldn't have to configure every command in advance - at the end.

@schmunk42
Copy link
Contributor Author

btw: Here are the docs about composer scripts.

@samdark
Copy link
Member

samdark commented May 21, 2013

I think it can be just a dummy static class with a single install method. No need to use Yii for the install script itself.

@qiangxue
Copy link
Member

All done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants