mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #1926] Rename Monolog\DateTimeImmutable to something else, e.g. JsonSerializableDateTimeImmutable #828
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#828
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ruudk on GitHub (Nov 21, 2024).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1926
First of all, thanks for this amazing package 💙
So this is something that I'm bothered by for a long time. Every time I want to import
DateTimeImmutable, PHPStorm asks me which one I want to import:Even though the version of Monolog is namespaced, it's still annoying to think which one to pick.
I want to propose the following:
Monolog\DateTimeImmutableto something different, for example:Monolog\JsonSerializableDateTimeImmutableMonolog\DateTimeImmutableas an alias forMonolog\JsonSerializableDateTimeImmutable, and mark it as deprecated.Monolog\DateTimeImmutableOr if there is a better way to do this, I'm all ears. I would be happy to create the PR.
/cc @Seldaek
@Seldaek commented on GitHub (Nov 21, 2024):
Yeah i wonder if marking it internal would help? Can you try that locally maybe? There's a minor use case of passing it directly to addRecord but i dont think many people do that..
Renaming would be cleaner but a longer term solution.
Not sure what else is possible.
@ruudk commented on GitHub (Nov 21, 2024):
Marking it as internal won't do anything for PHPStorm.
@Seldaek commented on GitHub (Nov 21, 2024):
And did you try if an alias helps? Because I'm guessing it would also still suggest the alias, if so that'd only be fixed in 4.0
@ruudk commented on GitHub (Nov 21, 2024):
The alias won't hide it :(
So it will be a long time before I can enjoy it, but I still think it's good to prepare this for 4.0, so I created the PR: