These are chat archives for ppi/framework

6th
Nov 2015
Paul Dragoonis
@dragoonis
Nov 06 2015 10:27
@noisebleed hey! So @dannym87 is looking to help with PSR-7 symfony bridge for ppi/framework#136
Any suggestions on how to approach this ?
Roman Tsiupa
@dracony
Nov 06 2015 10:38
golf version:
$a = 'root_dir';
$b = lcfirst(implode(array_map('ucfirst', explode('_', $a))));
Paul Dragoonis
@dragoonis
Nov 06 2015 10:39
I’ve no idea what you’re talking about @dracony :)
golf ?
Roman Tsiupa
@dracony
Nov 06 2015 10:39
never heard of code golf?
"find a solution in the least amount of characters"
=)
'root_dir' -> 'rootDir'
Paul Dragoonis
@dragoonis
Nov 06 2015 10:40
Interesting :)
Roman Tsiupa
@dracony
Nov 06 2015 10:40
for the #135
Paul Dragoonis
@dragoonis
Nov 06 2015 10:41
Would you like to PR the fix for it ?
Roman Tsiupa
@dracony
Nov 06 2015 10:41
That version would probbaly not be very readable))
Vítor Brandão
@noisebleed
Nov 06 2015 10:41
@dragoonis so the service locator is providing an empty Response?
Roman Tsiupa
@dracony
Nov 06 2015 10:41
although sure =)
Paul Dragoonis
@dragoonis
Nov 06 2015 10:42
@dracony if it works, it works :) - better than /e anyway!
Roman Tsiupa
@dracony
Nov 06 2015 10:42
well the /e has less characters))
Paul Dragoonis
@dragoonis
Nov 06 2015 10:42
size != quality
Roman Tsiupa
@dracony
Nov 06 2015 10:42
))
Vítor Brandão
@noisebleed
Nov 06 2015 10:42
whatever performs better :)
Roman Tsiupa
@dracony
Nov 06 2015 10:43
I should bench
Paul Dragoonis
@dragoonis
Nov 06 2015 10:43
do you bench, bro?

@noisebleed for #136 - at the moment the system gives you an empty Response object.

The ResponseFactory will give an empty PSR-7 Response object to the dispatcher, which will pass this to controller upon invoke :)

Roman Tsiupa
@dracony
Nov 06 2015 10:45
1 second for 100000 calls
I cant bench the /e cause my php is throwing an exception that its deprecated)))
performance wise probably this is better:
Paul Dragoonis
@dragoonis
Nov 06 2015 10:49
it is.
/e == eval, which is slow, deprecated and insecure

@dracony would be nice for you to create a METHOD on App.php to perform such translation. Then it can be easily unit tested.

The larger picture here is to clean up App.php as we go and gradually make App.php into a series of smaller and more testable classes.

Are you okay with this ?

Roman Tsiupa
@dracony
Nov 06 2015 10:51
is a 'METHOD' smth special?
or you mean just a normal method?
like a Command or smth?
kk)
il send a pr todays)
ironically don't have git on this PC at all))
thank you windows)
Paul Dragoonis
@dragoonis
Nov 06 2015 10:54
normal method on the class. just emphasising a method, instead of inline-code
Roman Tsiupa
@dracony
Nov 06 2015 10:57
kk=)
Roman Tsiupa
@dracony
Nov 06 2015 13:46
Paul Dragoonis
@dragoonis
Nov 06 2015 13:47
@dracony yes. Agreed.
Roman Tsiupa
@dracony
Nov 06 2015 13:48
I actually have a library for that =)
will show you later if you like)
Paul Dragoonis
@dragoonis
Nov 06 2015 13:50
@dracony cool! :)
Cant wait
The /e fix is priority for PHP7 coming out in few days time
Roman Tsiupa
@dracony
Nov 06 2015 13:52
Im aready switched th server to running the latest RC
no problems so far =)
but I most of my sites are fairly recent
and half is ruby anyway))
but 7 really gives hope to the future of PHP)
Paul Dragoonis
@dragoonis
Nov 06 2015 13:58
Yep.
Paul Dragoonis
@dragoonis
Nov 06 2015 14:23
@dannym87 hey! any more thoughts on adding bridge? ;-) I think @noisebleed is on board with the idea too!
dannym87
@dannym87
Nov 06 2015 14:24
nah not had time to think about it today yet. will see if i can do something in the morning