Not completely setup with my development environment - I still can't seem to get PHPUnit to work with PhpStorm - but I did get Elkarte installed.
After installation I automatically get redirected to /install/install.php. Not sure how I can keep the install directory so I can work on it but still test Elkarte. I don't think there is a way to do this without copying the files which is a huge pain for developers.
Instead of requiring me to delete the directory, I think we should put a setting in Settings.php $ignore_install_dir. If it is set, it will ignore the install directory warnings.
Of course, this means that we need to move the install check further down because we need to load Settings.php. So this proposal is kind of long but before I submit a PR I want to get your opinion.
- Check if there is an /install directory
- Check if there is a Settings.php
a) If it's not there, redirect to install
b) if it is, continue - Require Settings.php
- Check if (empty($ignore_install_dir)
a) if it's true, continue
b) if it's not, redirect to install
Even this method seems hacky to me but it's the best solution I can come up with right now.
btw, how do we not have a button to create a sub list? The editor is really missing the ability to indent.
Use the debug variable? If true ignore install, otherwise no?
I was thinking that but I want to be able to test a page with and without debugging on. Also, this would only be for developers, not admins trying to debug their site or mod developers.
I just went ahead and submitted a PR: https://github.com/elkarte/Elkarte/pull/2198
It's on my main branch so hopefully it gets merged so I don't have to rebase or do anything crazy like that.
You can use the Vagrant setup I provided to avoid needing to mess about with the install directory.
I wouldn't be able to edit things and then click refresh to see them changed. I'd have to do another step which defeats the purpose.
This makes it much easier for developers to develop. Anything we can do to make development faster/better we should do.
On another note, I just found a whole couple of undefined indices on my install :)
Ugh, it removed the sample Settings file and I committed that change >:(
Okay, in install.php > action_checkFilesExist() instead of renaming the files, it should make a copy of the files. Is there any issue with that? If it's an issue with permissions, we can try to copy it and if that doesn't work rename it.
If I remember correctly, yes, I did a rename to avoid altogether issues with creating new files.
No strong opinions on how to deal with it.
I'm not a Git expert so I need to figure out how best to change this back. A revert will result in another commit which will be ugly.
Revert it an force update your branch
If you don't want to have the commit, you could do a rebase -i, remove the commit and then a push -f
Yeah, someone else said to rebase but I don't really understand how to do it.
You can also start a new branch from 1.1 and then cherry pick the (2) commits from your other branch and submit that as a new PR and cancel the current ... git be wild !
A good right-click tool is tortoisegit, easier than learning the CLI. PHPStorm also has a history view, so if you open the file you accidentally chanced, you can get the last history, save and re-commit it (undoing the changes) .. extra commit in the PR but should work as well.
You can see rebase as an automated cherry-picking: you go back of a certain amount of commits (e.g. HEAD~6 six commits) and you do what you want with them, including removing, merging, splitting, reorder, etc.
As you can see I just went with revert/commit. I tried doing a reset but that didn't seem to work. Maybe I'll just use command line instead of SmartGit.
That's exactly how the Vagrant setup works. What extra step do you mean?
https://github.com/Ant59/elkarte-vagrant/blob/master/provision/setup.sh
You have to provision each time you make a change. I just save and refresh my browser. It's like having a local copy.
Certainly not :) That's what I'm trying to say. With my Vagrant setup, you just change, save and refresh. No need to re-provision.