Improve php cs fixer rules #823
No reviewers
Labels
No Label
a11y
ActivityPub
admin
API
backend
bug
community
conflicting
contribution welcome
deployment
documentation
duplicate
enhancement
frontend
good first issue
help wanted
high priority
instance config
low priority
mobile
moderation
more infomation needed
needs feedback
pr pending
project setup
question
search
security
translation
translations update needed
UI/UX
upstream
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kbin/kbin-core#823
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "cooperaj/kbin-core:symfony-ruleset-not-strict-enough"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Quite frankly the idea that the @Symfony ruleset does not include strictness checks horrifies me.
Please allow risky in config file instead, run the fixer and verify nothing can break in fixed files
Improve php cs fixer rulesto WIP: Improve php cs fixer rulesWIP: Improve php cs fixer rulesto Improve php cs fixer rulesWhy remove my todo comment?
oh, mostly cause i didn't consider it to apply anymore? cs fixer is a linter, it just runs in fix mode by default.
i can add it back but should probably have a ticket created to track it. numberless todos in code bases rarely get fixed and are mostly forgotten without a ticket.
if you run the fixer right now on the /src directory what output are you getting?
we spoke about running this tool in my ticket here: #802 (comment)
In that case it removed the '?' on the properties of the class. if this is the expected case then that's fine.
I've tried running this for my PR and it still
it looks like this is an explicitly configured rule under the @Symfony preset.
5c7e753a49
to165817cd19
165817cd19
to118522ac3f
118522ac3f
to4b06c7efe7
4b06c7efe7
to6d172f0500
6d172f0500
tof00800eeb6
Yea OK agreed. PHP-CS-Fixer is both a linter and a formatter.
f00800eeb6
tofcdc69cadf
fcdc69cadf
toab26a3b5a8
ab26a3b5a8
tod278c1b4e3
@cooperaj Let's fix the failed job again. And merge?
d278c1b4e3
to953473ce2f
Great. done.
Unfortunately, adding strict_types everywhere caused a few methods to start throwing exceptions. KbinQueryAdapter::getNbResults apparently serializes its values to json to create a cache key, and if that json serialization fails, it previously did not throw an exception. The json serialization failures occurred when serializing User entities, so adding JsonSerializable to the User entity should fix the issue.
I'll be creating a PR adding those fixes soon.