Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The correct naming is PhpTransliteration and not PHPTransliteration.
Remaining tasks
- Rename all instances of PHPTransliteration to PhpTransliteration.
- Rename files with PHPTransliteration in the name to PhpTransliteration.
- Commit.
Beta phase evaluation
Issue category | Task, because this is a coding standards change. |
---|---|
Issue priority | Not critical because coding standard changes are not critical. |
Disruption | Not disruptive since the rename will not cause anything to break - class names are not case sensitive in PHP. |
The renaming is not an API break and the disruption is minimal, so it is allowed in the beta.
Comment | File | Size | Author |
---|---|---|---|
#29 | drupal-renaming-2388169-29.patch | 108.67 KB | tadityar |
Comments
Comment #1
tadityar CreditAttribution: tadityar commentedComment #2
tadityar CreditAttribution: tadityar commentedHello,
This is the patch for renaming all 'PHPTransliteration' inside drupal files.
There is 2 renaming left which are renaming /core/lib/Drupal/Component/Transliteration/PHPTransliteration.php to PhpTransliteration.php and renaming /core/lib/Drupal/Core/Transliteration/PHPTransliteration.php to PhpTransliteration.php
I can't seem to do it though because when I renamed the file using
git mv -f PHPTransliteration PhpTransliteration
and run the patch, it'll return 'already exists in working directory'
Is there any way I can work around this?
Thank You
Comment #3
tadityar CreditAttribution: tadityar commentedComment #5
daffie CreditAttribution: daffie commentedThank you for making the patch. I wanted to ask you for rename the files did you do:
of did you do
And what was your working directory?
In my local environment is it working fine.
The testbot failed because you have now a class PhpTransliteration in a file named PHPTransliteration.php.
Comment #6
tadityar CreditAttribution: tadityar commentedThank you for reviewing my patch too. I did the second one, to be exact since I did it from the drupal directory I did
git mv -f /path/to/Transliteration/PHPTransliteration.php /path/to/Transliteration/PhpTransliteration.php
The patch that I posted is not the one that include the change though because it fails when I was applying the patch.
Comment #7
daffie CreditAttribution: daffie commented@tadityar: Just rename the file and make the patch. If you do not succeed with "git mv" use another method of renaming the files. The patch file will still work. Instead of a rename it has then a deleted file and a new file. But it still works.
Comment #8
tadityar CreditAttribution: tadityar commentedThis is my update of renaming the file.
Let's see if the test will pass.. I used a new method using
git mv PHPTransliteration.php PHPTransliteration.php.tmp && git mv PHPTransliteration.php.tmp PhpTransliteration.php
In case the test fails,
Do you have any suggestion regarding this?
Thank you,
Comment #9
daffie CreditAttribution: daffie commented@tadityar: The files are deleted and created, so combined they are renamed. Very good of you. But where are all the other changes? All the renaming of PHPTransliteration to PhpTransliteration is gone!
Comment #11
tadityar CreditAttribution: tadityar commentedMy Bad! That's why I thought why was the file so small?.. I had many different tabs on the same file and the file that I checked was the other file with same name..
Comment #12
tadityar CreditAttribution: tadityar commentedComment #13
daffie CreditAttribution: daffie commentedAll occurring instances of PHPTransliteration have been replaced by PhpTransliteration.
Two files have been renamed.
It all looks good to me, so I give it RTBC.
Comment #14
amateescu CreditAttribution: amateescu commented@tadityar, can you please generate a patch with
git diff -C
. That will make it easier to see what are the actual changes to\Drupal\Component\Transliteration\PHPTransliteration
and it also doesn't change the entire revision history of that file.Comment #15
daffie CreditAttribution: daffie commented@amateescu: This is her first patch and it did not go very easy. The patch does what is has to, so give her some slack. :-)
Comment #16
amateescu CreditAttribution: amateescu commented@daffie, I'm sorry but committing the current patch means that we will lose all the version history of that file.
Comment #17
amateescu CreditAttribution: amateescu commentedAlso, I'll be happy to assist @tadityar if any help is needed for re-rolling this patch.
I would recommend reading the instructions from https://www.drupal.org/documentation/git/configure and apply at least the "Optimize diffs for renamed and copied files" part there to your git configuration. That will have the same effect as the command I proposed above (
git diff -C
) when you create a new patch.Comment #18
tadityar CreditAttribution: tadityar commented@amateescu I've enable all the configurations and this is my revised patch.
Sorry I didn't know about that.
Comment #20
tadityar CreditAttribution: tadityar commentedComment #21
tadityar CreditAttribution: tadityar commentedComment #23
tadityar CreditAttribution: tadityar commentedreverted configuration and used
diff --staged -C
insteadComment #24
slashrsm CreditAttribution: slashrsm commentedLooks good to me.
Comment #25
amateescu CreditAttribution: amateescu commentedNice! Great work, @tadityar :)
Comment #29
tadityar CreditAttribution: tadityar commentedRe-rolling the patch.
Comment #30
amateescu CreditAttribution: amateescu commentedReroll looks good :)
Comment #38
daffie CreditAttribution: daffie commentedWas before failed retest RTBC. After retest is it all green again, So back to RTBC.
Comment #41
daffie CreditAttribution: daffie commentedBack to RTBC.
Comment #42
tadityar CreditAttribution: tadityar commentedComment #43
alexpottCommitted 37c5acf and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.