Skip to content

u/celtric

In this archive from Jan 2010 to Nov 2016

20
posts
257
comments
3
media
1.1k
score

How to implement third-party integrations in DDD?

Imagine a use-case where a store owner wants to request a new subscription, but that subscription depends on an external gateway (PayPal in this example). The path I've been following involves the StoreOwner to request things to a SubscriptionService. Is that the correct way to go? How do you handle...

0 points7 comments
Open on Reddit

Exceptions thrown by interfaces ignored by PhpStorm's @throw inspection w/ "Analyze immediate calls"?

I can't get it to work and have not found a single comment on Google or Jetbrain's bugtracker about this. Before creating a ticket, have you found this same problem? Or do I have something misconfigured? Example: <?php interface Gateway { / @param mixed $userId @return UserStatus @throws FailedGatew...

6 points7 comments
Open on Reddit

Thinking about moving to Java

I've always been a big defender of the simplicity of PHP vs the overly-verbose Java approach. Lately though, as I write more packages for backend which don't allow margin of error (payments handling, etc.), I find myself writing lots of tests and writing the same verbose code that I hated from Java,...

17 points43 comments
Open on Reddit

State of named parameters RFC?

I haven't been able to find information about it in the last months, although it's one of the most demanded features in PHP. The last messages regarding this RFC point out that existing native functions should be updated one by one (some of them don't match the official documentation apparently), wi...

16 points5 comments
Open on Reddit

Too much verbosity?

I don't know who will be developing this code, and I'm getting paranoid about the requirements. Is this too much? Foo/Bar/Enum/States.php <?php namespace Foo\Bar\Enum; class States { const ACTIVE = 'active'; const COMPLETED = 'completed'; const CANCELLED = 'cancelled'; } Foo/Bar/Model/StateInterface...

3 points11 comments
Open on Reddit

Type hinting in `foreach` loops?

I've been checking the current RFCs but haven't seen anything. Does anyone know if has this been proposed in the past, or will not be implemented for x reason? Eg.: foreach ($sets as array $set) { ... } foreach ($sets as MyClass $set) { ... }

0 points7 comments
Open on Reddit

How do you remember a user login?

If a user marks the option "Remember me", I generate a md5 identifier and store it in his/her account and in a cookie. Problem is, only one browser can be remembered at a time as I generate the identifier on the fly. If the same user wants to be remembered on another browser or computer, should I gi...

13 points10 comments
Open on Reddit

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.