PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Nov 24, 2015 13:28
I just ended up writing what I needed myself. no faffing around
Nov 24, 2015 13:18
seems like it's not been implemented yet in php-cs-fixer: github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1438
Nov 24, 2015 13:17
@Gordon I need it in a PHP script, not an IDE
Nov 24, 2015 13:12
does anybody know a good code formatter/beautifer lib that can handle array indentation? php-cs-fixer doesn't seem to modify arrays very well
Apr 16, 2015 15:08
is there a convention for defining option array keys in phpdoc annotations?
Apr 16, 2015 11:37
@Danack yep, I just got that to work. I was putting the type in the wrong place :)
Apr 16, 2015 11:33
@Danack Parent is referencing FooInterface. The child has ConcreteFoo injected into it. I want to access the methods of ConcreteFoo rather than FooInterface. Now that I think about it, I shouldn't even have an interface if the concrete versions are mostly different. I need to group them somehow though...
Apr 16, 2015 11:29
does anybody know whether you can override @property or @param annotations in child classes without redefining the parent property? for example, Child extends Parent. the constructor for Parent takes an interface and sets it as a protected property. I'd like to my IDE to pick up type hints for that property in Child -- but the parent's protected property only references the interface, not the concrete class.
Jan 9, 2015 14:01
@DaveRandom hmm. The trick is to find where refs are still active for the unset instances. Do you have any advice or tooling recommendations for tracking these types of memory leaks? I guess the obvious choice is xdebug
Jan 9, 2015 13:53
@DaveRandom so if you do have stragglers still referencing these instances, there's no real way to remove them until the request/script execution ends?
Jan 9, 2015 13:46
@DaveRandom thanks - somebody is trying to unset a bunch of objects and doing a memory_get_usage afterwards, which is still showing allocated memory. Is there any way to trigger the GC to release it?
Jan 9, 2015 13:41
if you unset a variable, does it release it from memory or just decrease the refcount?
Jul 29, 2014 11:10
does anybody know of a PHP lib that can generate RST content? specifically, aligned tables
Jul 4, 2014 09:40
is there a way to see the size of a stream without loading the contents into memory as a string?
Jun 18, 2014 11:47
I've laid out all the technical reasons in the mailing list, and they're still not getting it - so probably worth reaching some kind of compromise (protected visibility)
Jun 18, 2014 11:46
@DaveRandom so tough love basically :P
Jun 18, 2014 11:16
@RonniSkansing I want to introduce private visibility and perhaps even final keywords into a project. I firmly believe in strong encapsulation and that inheritance is often an anti-pattern. But some contributors are uncertain, so I'm trying to anticipate counter-arguments
Jun 18, 2014 11:09
@RonniSkansing if you're using private visibility extensively, you are enforcing strict encapsulation; i.e. preventing child classes from accessing properties from classes they inherit. That is a deliberate restriction - how is that not a matter of flexibility?
Jun 18, 2014 11:04
I guess my question is this: is purity/correctness more important that flexibility (no matter how incorrect)?
Jun 18, 2014 11:04
@DaveRandom again, exactly right - but it boils down to this, how strongly should you enforce these OO principles on a public project where the majority of consumers just want things to work
Jun 18, 2014 11:02
@DaveRandom exactly, but that's not an opinion shared by others. They think using private visibility is an unnecessary restriction placed on end-users not being able to override the class.
Jun 18, 2014 10:39
should public OSS libraries be free to use private properties in classes (and thereby restrict inheritance)?
Jun 11, 2014 08:19
screw it, switching back to PhpStorm :)
Jun 11, 2014 08:19
class completion, namespace imports, syntax formatting, docblock generation
Jun 11, 2014 07:38
he's a good speaker
Jun 11, 2014 07:38
"whyyyy the loop?!"
Jun 11, 2014 07:30
@SecondRikudo speed and power - in the sense that you can combine functionality very succinctly. I really like this: medium.com/programming-ideas-tutorial-and-experience/…
Jun 11, 2014 07:26
does anyone prefer using vi over IDEs? trying to use vi only today :)
Jun 10, 2014 14:59
@ircmaxell a while back you said that objects should either maintain state (like a value-object) or perform behavioural concepts (do-ers). Why is that important? How can you apply that to decomposition etc.
Jun 4, 2014 10:21
does anybody know of any codebases using behat?
May 29, 2014 12:10
basically wondering whether static factory methods like ::fromArray() is an anti-pattern
May 29, 2014 12:07
if you have a bunch of models which are almost always populated by arrays - is it better to accept an array in the constructor; or use a static factory method for the array, and populate constructor with property arguments
May 21, 2014 14:54
@ircmaxell I agree with your definition of OO, but it's also about the communication of messages (Alan Kay)
May 21, 2014 14:47
@ircmaxell I know, but IMO encapsulating responsibility is. I just find arbitrary procedural calls which modify a resource a bit chaotic
May 21, 2014 14:42
@tereško no worries!
May 21, 2014 14:34
I have to go to the docs and spend 2 minutes finding the right procedural call
May 21, 2014 14:33
I can't easily retrieve state from a resource
May 21, 2014 14:33
that's what I'm doing - I just wish there was some kind of SPL alternative to invoking procedural calls
May 21, 2014 14:32
procedural functions for streams are so annoying
May 21, 2014 14:32
Why do we not have some form of OO IO implementation?
May 21, 2014 12:43
How could you implement stream_truncate for a stream wrapper?
May 19, 2014 21:23
@Fabien 1st season of pimp my ride?
May 19, 2014 21:22
I agree
May 19, 2014 21:14
still, one silly idea doesn't invalidate the whole process of discussion
May 19, 2014 21:14
IDK who proposed that, but luckily it got shot down
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Aug 6, 2014 08:32
it's just a hosted provider called Read the Docs - I'm in the process of writing new content for my OSS project :)
Aug 6, 2014 08:32
@mikedidthis amazing - thank you
Aug 6, 2014 08:29
it overflows and I want it to wrap. I'm crap at CSS :/
Aug 6, 2014 08:28
could somebody help me figure out why this table cell width is not responding to any kind of CSS property? php-opencloudopenstack.readthedocs.org/en/latest/…