Fix a minor capitalization error - #9660
Closed
Oldiesmann wants to merge 3 commits into
Closed
Oldiesmann wants to merge 3 commits into
Oldiesmann wants to merge 3 commits into
Conversation
Signed-off-by: oldiesmann <oldiesmann@gmail.com>
jdarwood007
reviewed
Sep 7, 2026
| ], | ||
| [ | ||
| [ | ||
| 'SMF\\Tasks\\UpdateSpoofDetectorNames', |
Member
There was a problem hiding this comment.
Suggested change
| SMF\Tasks\UpdateSpoofDetectorNames:class, |
Member
There was a problem hiding this comment.
Don't know if the suggestion will work.
Contributor
Author
There was a problem hiding this comment.
I'm confused as to why the addition of "::class" is necessary here. The code should know what to call based on the class name. This just changes the upgrade to store the class name in the correct case.
Member
There was a problem hiding this comment.
Static Analysis tools (such as those on IDEs) will see its missing and know it should exist. Before, it was a string and just a valid string.
Member
There was a problem hiding this comment.
Suggestion has a typo. Needs to be ::, not just :.
Also needs a leading backslash so that the class is resolved against root instead of SMF\Tasks.
Co-authored-by: Jeremy D <jdarwood007@users.noreply.github.com>
Sesquipedalian
pushed a commit
that referenced
this pull request
Sep 8, 2026
A class name in a string is not a name PHP ever checks. Every one that names a class SMF ships is now written as a ::class resolver, so the compiler resolves it against the file's imports and a misspelling stops being invisible. Where the value is a callable or a name that other code parses, the class half becomes a resolver and the rest stays a string, so every value is byte for byte what it was. The upgrader's FetchSMfiles is the exception: writing it as a resolver spells it the only way it can be spelled, which is the fix in #9660. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Member
|
Superseded by #9665. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: oldiesmann oldiesmann@gmail.com
Description
This fixes a minor capitalization error in Upgrade.php. We want to run the FetchSMFiles task after upgrading but the class name gets inserted into the DB as "SMF\Tasks\FetchSMfiles", causing an error since PHP is case sensitive for class names