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
WIP: [ticket/11163] Make ext/ dir upon composer install command #1032
Conversation
@@ -8,5 +8,8 @@ | |||
}, | |||
"require-dev": { | |||
"fabpot/goutte": "1.0.x-dev" | |||
}, | |||
"scripts": { | |||
"post-install-cmd": "mkdir ext" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ext
-> ext/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works either way
You might need backticks.
Is this not tested? |
As I said, make sure your composer.phar is up to date. I did test it and it On Sat, Nov 3, 2012 at 11:08 AM, Michael C. notifications@github.comwrote:
|
I think you should also create an .htaccess and an empty index.html... |
This should be extended to all the other folders such as cache. The .htacces and index.html file should IMO be created by the build script. We can assume that people using phpBB via git know how to secure their webserver. |
I didn't test it but travis did and it uses the composer.phar in the repo? https://travis-ci.org/#!/phpbb/phpbb3/jobs/3045295 |
Well I have updated composer.phar and composer.lock but the tests are failing due to it being unable to locate a file or something. So it's not my fault. |
Actually, they were all failing earlier, since you updated the |
Please rebase. |
Please let's not pile up all feature requests into a single PR (cough bantu). |
@p huh? I just want to get rid of the composer.phar file here because that has been updated already (and has to go into develop-olympus too) |
I was referring to
|
Although if you have to populate ext then obviously you have to do that, sorry. |
Also, if this is done, for a future PR I would like to see a command to recreate all generated files and directories. |
@p Yes, just run |
Why is composer.lock changed in this PR? |
5 similar comments
Why is composer.lock changed in this PR? |
Why is composer.lock changed in this PR? |
Why is composer.lock changed in this PR? |
Why is composer.lock changed in this PR? |
Why is composer.lock changed in this PR? |
composer.lock change should be removed together with composer.phar. |
I rebased out the changes to composer.phar and composer.lock. Note that you may need to update your own composer to the latest in order to get it to work. Also, the travis test will fail because its composer is not updated. EDIT: And looks like I'm wrong; the tests passed. |
If a composer update is needed it should be done in its own PR. |
Huh. We already updated composer in the repo for this.
|
Does not seem to work. https://gist.github.com/d37a17e5f3009dc84d92 No ext directory was created. |
1 similar comment
Does not seem to work. https://gist.github.com/d37a17e5f3009dc84d92 No ext directory was created. |
Scratch that, forgot to rsync. Patch does work. |
Scratch that, forgot to rsync. Patch does work. |
2 similar comments
Scratch that, forgot to rsync. Patch does work. |
Scratch that, forgot to rsync. Patch does work. |
The command should be mkdir -p, not mkdir. |
mkdir -p works on Unix, but not on Windows. |
Maybe the directories should be created by PHP. |
If users checking out phpbb code from git can be assumed to know where extensions are supposed to go, maybe just create directories during package building. |
I would also be content with a develop script to make them. |
Can I ask, why are we coming up with alternatives? What is wrong with composer creating the file? Composer needs to run for a phpBB install to work and the build script calls composer. |
I would not do this with composer. ext should be created in the repo (via ext/.gitkeep) and then |
That was done by nathan but people said the implementation wasn't how it should be done. |
So, use gitkeep and have build script 1) remove gitkeep and 2) create index and .htaccess? |
If we need an |
The other approach is however more failure-proof. |
The current patch requires that the directory does not already exist. Running composer install twice results in a failure to create the directory the second time because it was created on the first run. See my previous comment. |
Add an if? |
If you're talking about a shell if, the syntax will differ across operating systems. If you're talking about a composer if, I don't know what composer provides. |
If I understand correctly, this is not an acceptable solution. Closing. |
You could invoke a php file to make the directory. However, if at that point you can simply provide this file for users to invoke as they please. |
I'll work on an alternative patch. |
Filed composer/composer#1417. |
http://tracker.phpbb.com/browse/PHPBB3-11163