is anybody up for fixing all the php short tags in the codebase. This was actually dealt with about a year ago, but somehow some code with short tags seems to have gotten back into the codebase. Also may make sense to ensure the form scripts aren’t producing forms with short tags. This is important because having short tags off has been the default action of php for some time and is a common gotcha for new OpenEMR installations.
There’s a lot of whitespace changes (ie. pseudochanges) that will dirty up the repo history (especially prevalent in the <?echo cleanup commit). Is there a way to not include that.
I am using a simple find and replace function within PhpStorm. I am not aware of removing anything else. I’ll check again. I do have Php CodeSniffer being applied as a work.
just a diff and … I see -ignore-space-at-eol Ignore changes in whitespace at EOL.
-b, -ignore-space-change Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.
-w, -ignore-all-space Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.
and this
Add ?w=1 to the URL to see the diff with whitespace ignored.
# Go to my local updated master branch
git checkout master
# Create a working branch
git checkout -b php-short-tags_1
# Bring your commits into the working branch
git cherry-pick 06239d0fe5ad9a4fbcb36f32812202d3d3c394ab
git cherry-pick 88da5839dbd803399bdbafea6ac384c76b830703
# Check out another working branch (from master)
git checkout master
git checkout -b php-short-tags_2
# Make a patch file via diff command with the -w switch
# (the diff is between master and the first working branch with your commits in it)
git diff -w master..php-short-tags_1 > patch_file
# Now gonna cheat and not use git
patch -p 1 < patch_file
rm patch_file
# Now gonna make the new commit
git commit -a --author="fndtn357 <fndtn357@gmail.com>"
(create the commit message and save it)
# Now push the branch with the new commit to github
git push origin php-short-tags_2
Forgot to discuss the ?w=0 thing. This is basically just something you can use when looking a commits in github (Tony discovered this trick), which makes code reviewing on code with lots of whitespace changes much easier (it’s basically github’s way to do a git diff -w).