« first day (1653 days earlier)      last day (3288 days later) » 
00:00 - 21:0021:00 - 00:00

12:15 AM
@Worf you don't need a closure?
for asserts, I believe
oh… well you do.
 
assert(if($x){

});
i don't think i can do that
 
just not for the string-asserts which need to be eval()'ed
yep, you're right
 
with variadics, is there a way i can require at least two parameters?
function a($c, $c, ...$c){}
 
12:31 AM
function a($a, $b, ...$c) {} <--- requires at least two params
They just won't be all neatly packed into $c like you're probably hoping.
function a($a, $b, ...$c) { array_unshift($c, $b); array_unshift($c, $a); ... } <--- One way
function a(...$c){ if (func_num_args() < 2) { error_log(...); return null; } <--- another way
Or I guess count($c) is probably slightly better than func_num_args() there...
 
i will find an use case for variadics one day :P
 
12:55 AM
callable_equals() should be in core :P
 
 
2 hours later…
2:58 AM
 
 
2 hours later…
4:39 AM
@Worf Wow... no, it really shouldn't, actually.
 
5:34 AM
the room seems dead
 
no
I m here
can anyone help me in htacces?
@hakre :)
I just woke up since I was sleep last night
and m here still with my same problem :D
I have only my net for 11:59AM
so please , anyone respond :(
 
good mornings:)
 
its 10:41AM here
good moring
@hackre can you change php extension urls to extensionless?
just like localhost/dir/page.php to localhost/dir/page/
 
this depends on webserver configuration, it's possbile with mod_rewrite or mod_dir with apache
 
moin
 
5:48 AM
moin moin
 
moin moin moin
 
16
A: Remove .php extensions with .htaccess without breaking DirectoryIndex

Timothée GroleauI'm thinking you just need to verify that the file exists prior to doing the rewrite, that way you'll leave 404 and directoryindex behaviours intact: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [NC,L] (not tested)

 
how to write mode_rewrite @hakre
 
6:03 AM
6
Q: what is .htaccess file?

웃웃웃웃웃I am a beginner to zend frame work and want to know about .htaccess file and its uses.. can somebody help me.. thanks in advance. And i found some example like this. .htacess file AuthName "Member's Area Name" AuthUserFile /path/to/password/file/.htpasswd AuthType Basic require valid-u...

@JoeWatkins now closed.
 
well its not working @hakre
 
@hsn0331 then there must be a mistake otherwise, it would, right?
 
@hakre mjus?
have you tested?
not at all, no use :(
I just overwrite my all rules with your snippet
 
which webserver do you have?
@hsn0331 sounds like you're going on safari with a nuclear intercontinental rockets?
 
6:11 AM
no, apache
 
lol
morning
 
morning @NullPoiиteя
 
@hsn0331 good. now setup a new webroot from scratch that is empty and then try a minimal example to get it to work.
it perhaps helps you to understand how it works. you then can apply it later on with your more detailed scenario.
 
I already tested some rule on my this project
they are working well
http://stackoverflow.com/questions/29866564/htaccess-rewriterule-help-needed#
this is the my last question on it last night , he was helping me and he helped and solved my problem, but after that the new problem arise for me
 
what's the problem then? that @anubhava gives answers with no explanations leaving you alone with the next problem?
I bet he is pretty famous for code only answers.
So why not start reading the manual about each and every of the directives which are in that .htaccess file?
 
6:17 AM
yes that was solved and that is not a problem anymore, that soluction was like localhost/mysite/somepage.php?u=username
 
and the one you gave this morning is even similar if not simplier.
 
have no time for that, if i will it will take my most preceius time
 
@hsn0331 well obviously you don't have the time to not understand it.
 
now, I am looking for a solution for simple pages like localhost/mysite/page.php with that existing rule.
 
@hsn0331 which has been given to you more than a single one.
 
6:18 AM
I tried to understand and somethings I understood
 
you have the problem that you can't apply these solutions.
 
??? o.o
 
I can perfectly understand that this must bother you, but I have problems to find out where you hit the wall so that you can't go on.
 
last discussion between him and me chat.stackoverflow.com/rooms/76247/…
 
This is making it complicated for me to give an explanation to you how it works.
 
6:21 AM
he gave me this examples
and you need same set of redirect and rewrite rules for each .php
e.g. RewriteCond %{THE_REQUEST} /page\.php\?u=([^\s&]+) [NC]
RewriteRule ^ page/%1/? [R=302,L,NE]

but don't know how to apply this for non var urls like localhost/mysite/page.php
 
you leave the query-info part out
 
if i show u my whole htaccess ? will it works?
 
I have done very little mod_rewrite in .htaccess lately.
 
here it is
RewriteEngine On # Turn on the rewriting engine
Options -MultiViews
RewriteBase /social_media/

# settings page request
# all other simple url rules will goes on here


# user page request
RewriteCond %{THE_REQUEST} /user\.php\?u=([^\s&]+) [NC]
RewriteRule ^ user/%1/? [R=302,L,NE]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{THE_REQUEST} \s/+(.*?)[^/][?\s]
RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301]

RewriteRule ^user/([^/.]+)/$ user.php?u=$1 [L,QSA,NC]
IndexIgnore *
 
Like we were discussing yesterday night here in chat, you normally have a single rule in there nowadays and you do the URL parsing within PHP and not within the .htaccess file any longer.
 
6:25 AM
hun???? O.o
it is all single rule
RewriteCond %{THE_REQUEST} /user\.php\?u=([^\s&]+) [NC]
RewriteRule ^ user/%1/? [R=302,L,NE]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{THE_REQUEST} \s/+(.*?)[^/][?\s]
RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301]

RewriteRule ^user/([^/.]+)/$ user.php?u=$1 [L,QSA,NC]
this one is for user.php page
RewriteCond %{THE_REQUEST} /user\.php\?u=([^\s&]+) [NC]
RewriteRule ^ user/%1/? [R=302,L,NE]
and I think these are some settings

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{THE_REQUEST} \s/+(.*?)[^/][?\s]
RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301]

RewriteRule ^user/([^/.]+)/$ user.php?u=$1 [L,QSA,NC]
 
# user page request without query-info part in request
RewriteCond %{THE_REQUEST} /user\.php/? [NC]
RewriteRule ^ user/? [R=302,L,NE]
 
which query-info?
this url is working fine for me, like for
localhost/social_media/user/hsn0/
 
@hsn0331 the one of the URL. See URL specs tools.ietf.org/html/rfc3986#section-3.4
 
it is coverted from localhost//social_media/user.php?u=hsn0
 
@hsn0331 I would say: "it is rewritten into" so the other way round.
Anyway, have you spotted the cause of your problem?
 
6:30 AM
so how?
no :(
 
I don't see any line in your .htaccess that adresses what you're describing.
 
very complicated to understand and need too much time and some advance info
 
So it's not clear to me what you've tried so far so actually the part that "is not working" (which is a pretty bad error description btw.)
 
yes, after he wrote me for that rule , he doesn't describe anything
 
@hsn0331 yes, it's complicated. but I don't have magic power to make it less complicated.
 
6:31 AM
so u need specification to understand what I want?
so will u be able to figure out?
 
@hsn0331 well at least it helps if you understand what these directives in the .htaccess actually do so that you can use them in your favour.
It's also easier then to talk to others about it because others must have at least the understanding outlined in the documentation as this is the shared knowledge.
 
well yes, if there is some expert who is helping me then would obviously tell me what thing is for what and what that rule is doing
so tell me, have u understand, what that rule is doing and what for which one I showed u?
 
@hsn0331 you must have misunderstood that, it's not about expert or novice. Documentation first of all works by reading it and as you have a case you need to get working you can even immediately check if that what you read you have understood that much that you get your thing to work.
 
obviously that will help
but who have much time to read all documentation?
I have very limited internet
 
Yeah that's a problem. With limited internet I normally invite people over to my town and then we do sessions.
 
6:36 AM
and I am using someones wi-fi whom I even don't know
because my internet is broken since nov 10, 2014
 
That's quite some time.
 
but that only works sometimes, and now , I am using my mobile internet , which is going to off about 11:59AM
 
I suggest that you have the webserver installed on your local computer.
 
I have some minutes left to solve my problem :(
 
then also to download the documentation of it: httpd.apache.org/docs
then you can solve your problem offline.
 
6:39 AM
I am already doing this on my local computer , on xampp apache server
 
that's good! then grab the documentation of the apache webserver.
 
but for documentation , I have to find out that part of that documentation which on I am working on
 
it's called mod_rewrite
and the documentation lists every directive from A-Z.
It's easy to find.
 
ok, all the explanations are understoodable for noob?
 
I can't guarantee you that but when I started with writing .htaccess files and being a noob (and the documentation was not that good as it is today) I was able to figure out some pretty decent stuff with it.
 
6:42 AM
where do I can find my apache server verion?
 
I would prefer the apache docs many of the answers given about URL-rewriting on stack overflow actually.
 
I m unable to find mode_rewrite in docs
yes , thats correct
 
perhaps because it's mod_rewrite.
 
I have apache 2.4.9 :)
Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11
help me to findout download link :(
 
check the mirros for a country near you: apache.org/dyn/closer.cgi/httpd/docs
 
6:46 AM
Can a newbie like me ask questions here? Pls do not block me, I'm not sure.
 
@krish_cloudnow well if not, you would have already asked a question :) - but don't ask to ask, just ask, it's fine.
 
OMG :O
how??????
 
@hsn0331 the site suggests you one more prominent mirror on top.
 
that only gives me ,
http://mirror.symnds.com/software/Apache/
 
I'm using a new PIP framework that I found in github. I'm trying to pass the form submitted value to the model that I created. However the view not able to identify the methods present in system/Model.php
 
6:48 AM
where from I can download readable docs for apache?
 
@krish_cloudnow I don't know PIP framework, but perhaps the view does not support models only some variables containing data?
 
@hakre please simply give the docs download zip link
 
@hsn0331 scroll down to the version and language you like: mirror.symnds.com/software/Apache/httpd/docs
e.g. take at least the english one: mirror.symnds.com/software/Apache/httpd/docs/…
and I dunno which other languages you prefer, perhaps it exists and you can grab it, too.
 
feuwwwwwwwwwwww, thank youuuuuuuuuuuuu :!
@hakre, thank you v.much, now my net is going off
bye
 
cu
 
6:59 AM
i have a question on providing answers
 
and question is ?
 
is it bad form to answer with a git repository?
 
yes in case git repo got deleted answer will no longer helpful for future visitor
 
i won't be deleting it
 
but still it depends on repo
 
7:02 AM
my autocomplete function
when they ask about how to make one
some askers may say briliant
 
but but ... if I ask you how to make a pizza, would you give me a pizza ?
in asking the question they are not asking for a solution ...
to answer the question you explain the steps to create an auto-completer, you don't link to one ...
 
Anonymous
7:20 AM
what the hell is an autocomplete function?
 
@phpPluginMaster put a description and the relevant parts into the answers and then link at the end your git repo for the full code. But the relevant parts should be part of the answer. It's like with questions: You should expect them to be self-contained as well.
also what @JoeWatkins said.
 
 
2 hours later…
Bas
9:40 AM
Hey guys, what do I do with an question where the answer is given in the comments and not in an answert yet?
 
move on
 
9:59 AM
@JoeWatkins What's the state of github.com/php/php-src/pull/1118?
do you need help finishing that up?
 
10:15 AM
Hi there. How do you work with "three-state booleans"? Usually you do not write "true" or "false" but write the condition "if ($getPrivate)" . But what if you want null or true? "if($getPrivate==null || $getPrivate)" or "if($getPrivate==null || $getPrivate==true)"? While both should work, the first might be a bit confusing for others who have to maintain the code
 
10:36 AM
@OleAlbers You should use === instead of ==. Other than that change I don't think either is ambiguous / unclear.
 
11:11 AM
@OleAlbers you can always do it this way:
$getPrivateNullOrTrue = $getPrivate === null || $getPrivate === true;
if ($getPrivateNullOrTrue) { ...
The variable naming is a mess in that example but I think the picture is clear.
 
11:39 AM
@Sara why not? how do you compare callables then
 
11:49 AM
@Worf By dropping the 50 different ways in which you can write the same callable, ideally
 
lol
 
12:07 PM
@NikiC help would be great, I'm like two weeks behind on work, I dunno when I'm gonna have time for it ...
 
Mornings o/
 
mohaa
 
12:23 PM
Hey guys, I want to expand my skills but I can't decide between Node.js and Java
What should I go for?
 
haskell
 
@Sara btw, array_unshift($c, $a, $b) is also supported :)
 
@HassanAlthaf PHP :-)
 
@Kubo2 Oh come on, been with PHP for 2 years, want to use more languages as well. :p
 
@HassanAlthaf groovy
 
12:40 PM
@Worf I would create a normal form and then normalize all input, then compare.
 
@hakre thats what i did :D
 
@HassanAlthaf So what are your expectations of your next language? Native support for desktop applications? Better object-orientation? Higher performance? Or something else? If you wanna try something really different, I can suggest F# (I have never used it, but I read an amount of docs about it and it seems heavily different from PHP and really interesting).
 
@Worf Then I perhaps need to reload that page?!
 
i haven't tested it, in theory it works xD
maybe a function normalize_callable() would be better
so that you can use == and === directly
 
@Worf sure, it's also easier to test.
Because the sentence you have in the readme is not good advertising :D
 
12:45 PM
lol
i did it on 4 am, it wasn't the right time to start phpunit :D
 
let me file a pull request
 
> Could not apply 46f429f8e611ef85c22224cddb3ea0727dbb6bd4... We can't output absolute S and T values for the Diophantine solution here since it can vary based on the libgmp version we are linking against and in general there are almost always multiple valid solutions
 
@NikiC done
 
@Tyrael thanks
 
@Worf I wanna use a language which can be useful in the future for my work life
Oops meant to tag @Kubo2
@Worf what is Groovy
 
12:56 PM
@HassanAlthaf and how is groovy less useful than node.js
it's based on java, but dynamically typed
 
@Worf I meant what is groovy. first tag was for Kubo2
Uh well I know a bit of Java but meh, so many problems on it. Not a lot of application sources for java are available
 
have you heard of grails? it runs on groovy
also python is a good option tho
 
1:14 PM
@JoeWatkins okay, I'm on it
 
@Worf oh.. I see.
 
hey does anyone know how I can test if pdo is connect to mysql with ssl? I am declaring the PDO object with the 3 PDO::MYSQL_ATTR_SSL_* attributes, but if I point those attributes to a key file that doesn't exist, I am still able to connect to the DB
i want to make sure that I am only using ssl for database connections. any advice, or links to reading?
specifically, i am trying to use the client key files for aws rds
 
2:09 PM
Still need some safe way to generate the class name
Also I suspect dmitry won't like the way the binding is done
 
@NikiC Use what Java does.
 
@LeviMorrison what does it use?
 
Name of the class it extends/implements with an incrementing counter after a dollar.
Foo$1 is the first anon class that extends or is an inner class of Foo.
(I think that's correct; that's just off the top of my head)
 
@LeviMorrison Yes, the question is about the "counter"
Joe originally used the opline pointer (which is not safe)
A counter sounds reasonable, you just have to be careful where it starts counting
I.e. make sure that it does not badly interact with opcache
 
@NikiC how should that even influence opcache? opcache doesn't care about the name as long as there are no naming collisions?
 
2:23 PM
@bwoebi Yes, but how do you know there is no collision?
With different anon classes created by different php processes or something
Maybe opcache deals with that without further work, may not. No idea
 
hmm
 
how would opcache actually cache the created anonymous class?
 
2:41 PM
@ircmaxell as usual ^^ they're pretty much normal classes, just with autogenerated name
 
yeah, figuted that out :-/
 
but don't ask me how "as usual" works :D
 
2:56 PM
guys, is there a way to check if a string class name / global constant / ns constant has a valid syntax? don't want to check the existence, i just want to validate the string. would that be possible somehow?
 
@Worf there is no such thing as a valid constant name
and in first approximation also no such thing as a valid class name
 
const 3_INVALID_CONSTANT = 10;
const INT = 10; // also invalid?
 
@Worf define("\0", 42) valid
 
oh
didn't know that
 
Same with class_alias
 
2:59 PM
how about "Foo\int\Bar\SomeClass" // invalid because "int"
 
@Worf that's valid even without tricks
 
@Worf no, namespaces aren't affected by the reserved class names.
 
yes they are
 
iirc marcio reserved keywords to be used in namespaces
 
perhaps not
 
3:01 PM
@Worf Well, it works currently - 3v4l.org/f1aJR
 
uhm
 
3:37 PM
@Worf not yet, too much trouble asking for more BC break :D
but just be reasonable, if you cant have a class named as "string" then avoid creating a "string" namespace
 
Anonymous
3:49 PM
@tereško @MarcelBurkhard How is this one digitec.ch/en/s1/product/… ?
 
Anonymous
i need to know your views before I try to buy it
 
@samaYo ibm / lenovo
well or panasonic
 
Anonymous
Yeah, I like ibm but this one seems to be the best of 2015 according to pcmag and it's very thin and lightweight..
 
user895378
4:09 PM
@NikiC yes :) the inadequacies of zlib.deflate and zlib.inflate are why we needed the real functionality.
 
user895378
The filters just won't work in non-blocking contexts. There are plenty of other reasons those filters aren't good enough, though ...
 
user895378
Userland needs specific control over the flush parameter passed to zlib and the stream filters don't allow this. For example, if you want to write an SSH client/server (which is now totally possible because of the ext/openssl improvements) you're required to use the Z_PARTIAL_FLUSH method as per the SSH protocol outlined in RFC 4523.
 
user895378
Similarly, the PPP protocol specified in RFC 1979 requires the use of the Z_BLOCK flush method for deflation.
 
user895378
For my personal HTTP client/server use-cases the stream filters are also terrifically inadequate because you always have to couple them with http chunking filters and on this front the existing filter abstraction completely breaks down.
 
user895378
Also, if you don't have specific userland functions available for incremental inflate/deflate you prevent the use of incremental compression with anything other than standard library streams. Things like ext/sockets and php-uv couldn't use the existing stream filters even if they were good enough.
 
user895378
4:10 PM
And:
 
user895378
Jan 29 at 19:23, by Sara Golemon
Steam Filters are an abomination and should be stricken from PHP
 
user895378
So yeah, this wasn't a fly-by-night decision. We tried for a while to hack together a working solution with what currently existed and it just wasn't possible.
 
@NikiC thanks, maybe wait to see what dmitry says about name and binding ...
 
At the risk of asking a question I don't want to know the answer to; why is the caching header generation tied into the session functionality ? i.e. php.net/manual/en/function.session-cache-limiter.php
 
user895378
Because if you're working with a session you generally don't want intermediaries to cache what you're sending.
 
user895378
4:21 PM
Because if another user who isn't logged in (for example) requests the same resource they'll get something different.
 
user895378
The very existence of the session usually implies you don't want the resources served up using the session to be cached by proxies. And that's why the session deals with cache control headers and very few people writing php web applications will understand this. We do a lot of stuff to make things "just work" without people having to know anything about HTTP :)
 
user895378
But it's still kind of messy.
 
Oh that reminds mind of back in the days. When so much was cached. You were hammering headers out just to prevent your scripts getting cached at all because they were dynamic!
 
I guess it has to be somewhere....it's just weird to have the functionality tied to sessions, rather than be a more generic function.
 
with sessions it's really most likely not to be cached, somewhat makes sense.
 
user895378
4:24 PM
@Danack I agree ... that's exactly the type of thing that drove me to work on my own server.
 
user895378
Of course, you could also just set a Vary: Set-Cookie header and be done with it.
 
user895378
PHP's great triumph was always allowing people to write usable web applications without knowing anything at all about HTTP :)
 
@rdlowrey The subject of the verb in that sentence is deliberately vague? ;-)
 
user895378
hehehe, not intentional ... but funny :)
 
user895378
I really dislike ext/session because it's an enormous hack, but it's usefulness is hard to argue against.
 
user895378
4:30 PM
I just want to state for the record that I'm really excited about PHP7 ...
9
 
user895378
With the improved speed, yield from, SO_REUSEPORT availability, incremental inflate/deflate and improved TLS server-support it's the first release that has everything I need to write non-blocking servers in userland that are as good or better than node.js
 
\o/
 
Anonymous
\o/
 
long live php \o/
 
5:29 PM
hehe.
 
6:27 PM
@samaYo it's a laptop for some type of managers. Too small to be useful but with specs to impress
unless you do most of your work on the move, you do not need it
 
6:46 PM
@rdlowrey Are you sure it's useful? It's a mere comfortability replacement for more powerful tools.
 
How would you go about finding out where in your code a certain PHP function gets called, if at all? I'm using aptana with Xdebug, but I haven't found such functionality
 
@Kensing Put a breakpoint inside the function, and then run the debugger?
 
@samaYo good if you don't intend to game on it
 
morning
 
7:05 PM
@samaYo It should be nice; what do you want to know?
 
7:16 PM
@samaYo in general laptops have a worse price/performance ratio than desktop pcs and should only be considered if you need the mobility
 
@PeeHaa Tables: Plural. Entities: Singular. Imho :-)
 
I go singular all the way
 
findUsers() // does a SELECT * FROM users and returns User[]
That just makes sense contextually
 
@Jimbo big part of the SELECT is singular SELECT * FROM user WHERE user.name = 'Baz' AND user.surname = 'Foo' AND user.age > 30
wanna really meet this Mr. Baz Foo
 
7:31 PM
@Jimbo you could say each row in Table User represents a User and you can select more than one
 
SELECT * FROM users u WHERE u.name = 'Baz // Can be aliased ;-)
 
@Jimbo the same why that the entity User represents a single User
but I don't think it really matters, just agree on smth with your team
 
Of course, we're just doing the tabs vs spaces thing again :P consistency is king (but of course it's spaces, because we're not idiots...)
 
The real question is: do you capitalize or not?
 
But still, when naming the table, I say what it contains. It doesn't contain user, it contains users
@LeviMorrison table_name, now we're onto underscores or not :P
 
7:34 PM
@Jimbo but again, your entity class will be instantiated with more than one user
 
@LeviMorrison fooBarBaz
 
@MarcelBurkhard How? I'm using an ORM. users table, User entity
 
because it's what i'd use in php arrays $rs[0]['fooBarBaz']
 
@Jimbo that's not what I meant
@Jimbo what ORM would you recommend ?
 
@MarcelBurkhard I've used two. Propel, which uses active record (and sucks), and Doctrine, which uses Data Mapper. I know a lot more about Doctrine so I'm biased, but I would recommend it. Even if you only have a small project, it just provides good SoC with Entity/Repository and makes maintenance easier
 
7:37 PM
@Jimbo oh I've used doctrine a lot, with symfony2
but It was quite the pain to setup with auryn injector ^^
 
@MarcelBurkhard Yeah me too. I set it up with Silex, and then Auryn Injector. Why was it a pain for you to set up?
 
+1 `SELECT * FROM user JOIN user_category ON ... JOIN category ON ...`
-1 `SELECT * FROM users JOIN users_categories ON ... JOIN categories ON ...` ???
-1 `SELECT * FROM users JOIN user_categories ON ... JOIN categories ON ...` ???
-1 `SELECT * FROM users JOIN category_users ON ... JOIN categories ON ...` ???
 
@Jimbo I had to use delegate (because it doesn't use a constructor but a factory) and a configuration object of some sort. And I was/am new to auryn so it was quite tricky to figure it out (of course rdlowrey helped me out :) )
 
@MarcelBurkhard Yeah, I had to delegate as well... bloody static factory
 
@Jimbo it felt kinda wrong (as in bloated) using doctrine so I'm currently trying to build my own simple orm
 
7:44 PM
@MarcelBurkhard Why bloated? Once you keep it set up, you add a new entity, add a new repository, and you can typehint for that Repository and use it anywhere. That's all you need to do really form then onward
 
I'm quite sure I wont finish it and go with doctrine or something but that's part of the learning process :P
@Jimbo it speeds up development yes, but I currently strive for testable, s.o.l.i.d code
@Jimbo for example I don't want to have a repository, I want a "UserRetriever" and a "UserSaver" and a "UserUpdater". The UserRetriever will fetch to the entity using plain pdo, for the saving/updating I need some sort of property->column mapping which I'm working on now
 
@MarcelBurkhard Agreed, so you would DI your UserProvider / UserManager or whatever (don't like Retriever / Saver for some reason), which in turn use the Repository / Create the entity, right?
Your 'saver' would use the EntityManager
 
yes and the user retriever wouldn't need the mapping
hence requests that don't change anything in the persistence layer won't have to load the mappings
 
So you can still use Doctrine, just have a UserRetriever with __construct(UserRepository $r)
?
 
@Jimbo I could use doctrine for sure. I just experiment how far I get without it ^^
 
7:50 PM
Sure. If you're worried about overhead, and you're currently using Apache, don't worry about it. Switch to nginx and keep using Doctrine, it'll balance out ;) I need to do this actually...
 
I'm not even really worried about overhead, just trying to make "perfect" tdd sample project for my own future reference
and I like Separation of concerns ^^
 
Yeah, then your service layer abstraction sounds good - means you can just either return your User or throw an exception or false or something... easy to mock out
 
@NikiC I suppose in requests A and B you could have a different $1
Unsure how that would affect opcache.
 
Am I allowed to post the link to a question in here and ask for help?
 
8:00 PM
@Jimbo do you run integration tests? With something like sqlite?
actually that is a question to everybody, how do you test against mysql? do you write fixtures and set up a local mysql server on each workstation?
Hmm I could setup a mysql server on the server with jenkins on it
nevermind
 
say you have a "path" object that is only about string manipulation (not related to filesystem), how'd you name the methods for to "open" a sub element or for to "open" the parent element?
 
hola
 
$path->append($x); $path->super(); are reasonable?
@taco i'm hungry now
 
yum
 
8:23 PM
dnf
 
8:59 PM
@tereško I kinda second that when it comes to designing domain logic - SQL is just a nice reporting tool, useful for complex searches and very annoying for simple operations (listing/fetching/traversing). Been doing raw SQL for too long time to endorse it for "productivity".
 
00:00 - 21:0021:00 - 00:00

« first day (1653 days earlier)      last day (3288 days later) »