last day (20 days later) » 

10:03 AM
Hey.
 
j0k
hello
 
So, what are your suggestions?
 
j0k
well, I first wanted to know why symfony and symfony-2.0 tag can't belong together?
 
Because symfony is used for 1.x questions historically.
I think it'd be better to eventually rename symfony to symfony1 — or just keep it like that.
 
j0k
I'm not sure this is a good idea
 
10:11 AM
What is your suggestion then?
 
j0k
if we take a look at the php tag for example, it still exists as it is and we have php4 for this version. People still use php5, but we all know that if you use the tag php now it sure means you are using php5.
I'm not too familiar with sf2, but I think there some difference between 2.0 and 2.1?
Well maybe php wasn't the right choice since there are lot of version. And symfony won't have a 3.0 until 2017 :)
What if, in the future, people ask for a question on symfony 2.4, which tag will be apply? [symfony2] [symfony-2.4] ?
I'll summarize what I think:
- we rename all [tag:symfony] to [tag:symfony1].
- we have to find a way to break the alias on [tag:symfony2] -> [tag:symfony-2.0] to have all sf2 related question tagged with [tag:symfony2]
- we let the minor version exists for sf1 and sf2, like [tag:symfony-1.4] & [tag:symfony-2.1] because I think it's important to have the real version, to the major one (for sf1 it's crucial to have this information and I think it will be the same with sf2 when we will have more than 2 versions released).
 
10:45 AM
Sorry, was AFK.
Well, php5 questions are still php questions, while symfony2 questions are not symfony1 questions.
That's the difference. Symfony2 is nothing like symfony 1.x.
For example, I don't know symfony 1.x at all.
And there are people who know 1.x but don't know Symfony2 at all.
There is just no sense in having one tag for them.
 
j0k
11:10 AM
yep, that's why I finally agree with this point in my sumarize :)
 
Why not rename the tag itself?
Instead of retagging all the questions, I mean.
Or is this what you're suggesting?
 
j0k
if we can rename it, let's do it, there will be less work
but I think we will need the help of a mod to do that
 
j0k
11:35 AM
so what do we decide?
 
12:13 PM
Yea, we will need help of a moderator.
Well, first, I want to remove [symfony] from all the Symfony2 questions.
Then we could ask a moderator to rename [symfony] to [symfony1].
Also I hope a moderator will make [symfony2] a main tag for Symfony2 and [symfony-2.0] and [symfony-2.1] will be its aliases.
Do you agree on this?
 
j0k
I don't think an alias will be interesting
well, I don't really know the difference between 2.0 and 2.1
 
Aliases could be used to flag a specific version, no?
 
j0k
does [symfony-2.2] will become an alias too?
 
The differences are not huge.
Yea, that would be an alias as well.
 
j0k
oh ok
 
12:17 PM
Unless I'm getting something wrong.
 
j0k
I see
 
Hey, @CarlosGranados.
 
Can we tag a question with a tag and its synonym at once?
 
j0k
when you say Alias, it's just an other tag, not something like, you write the tag [symfony-2.0] and it will be convert to [symfony2], right ?
hi @CarlosGranados
 
12:17 PM
If it's not possible, we should have version tags as separate tags — not aliases.
Let me try it.
 
j0k
I think it's important to have real tag for minor version, as I said in my sumarize
 
I had a similar proposal to change symfony2 to point to symfony2.1 but your proposal makes more sense
 
j0k
*we let the minor version exists for sf1 and sf2, like & because I think it's important to have the real version, to the major one (for sf1 it's crucial to have this information and I think it will be the same with sf2 when we will have more than 2 versions released). *
 
Okay, seems like it's not possible to use a synonym to tag a question.
Or, at least, the synonyms are not in the suggested tags.
Okay, we could have separate version tags then.
But the main one has to be [symfony2].
 
I agree
 
12:20 PM
Not [symfony-2.0] as it currently stands.
I'll update my answer on meta then.
 
j0k
I agree too
 
So, if I understand correctly, we want people to use "symfony2" to tag all symfony2 questions. If a question is specific to one minor version then they would use "symfony-2.0" "symfony-2.1" as well. Is that right?
 
j0k
[symfony-2.0] as to become an alias of [symfony2], so when people tag [symfony-2.0] it will become [symfony2]
@CarlosGranados yep
 
What is the next step?
 
j0k
remove tag [symfony] from all questions tagged [symfony]+[symfony-2.0] or [symfony]+[symfony-2.1]
~800 questions
 
12:26 PM
Does this have to be done manually or is there any tool for that?
 
j0k
manually :)
 
Yes. [symfony2] for all Symfony2 questions.
 
OK, and once this is done?
 
I've removed [symfony] from about 50 Symfony2 questions today.
So, it's doable.
 
I´ll help with this
 
j0k
12:28 PM
once this is done, we will ask a mod to rename [symfony] to [symfony1]
 
Cool.
Yep.
 
j0k
Hi @user1668168 !
 
We need to flag this question: meta.stackoverflow.com/questions/137230/…
For moderators to come.
 
I tried and removed about 6 tags in less than a minute so it can be done
Does it need to be flagged by many people or just by one?
 
j0k
@elnur could you summarize what we said about [symfony] tag etc in your answer?
 
12:32 PM
Make sure not to remove [symfony] from questions that involve both symfony 1.x and Symfony2.
 
j0k
@CarlosGranados yep, more we flag, more it will go on top of the list for moderator review
 
Can I link to the transcript? chat.stackoverflow.com/transcript/16862
 
j0k
well hum, it will be more easy for mods to have a summarize instead of read all the chat log ..
but you still can let a link to the transcipt, of course
 
Okay. I'll summarize.
I've updated the answer itself.
Several minutes ago.
I'll just point to the transcript anyway.
 
j0k
ok
 
12:39 PM
Was nice to chat with you, guys.
BTW, you can always find me at #symfony on freenode.
 
j0k
I don't usually use freenode, but could be great to add this information on your SO profile, I was looking to contact you since morning and find no other way than post a comment on an answer
 
j0k
1:03 PM
I think we need to add a link to the meta quesiton when we retag question, to allow OP to understand what we do
 
1:27 PM
0
Q: Array indexOf in Internet Explorer

johnI have defined prototype for Array indexOf ( to support array indexOf in Internet Explorer ) if(!Array.prototype.indexOf){ Array.prototype.indexOf = function(obj){ for(var i=0; i<this.length; i++){ if(this[i]==obj){ return i; } } ...

 
j0k
@RegisteredUser yes and?
 
 
1 hour later…
2:36 PM
is there anybody there?
 
j0k
yup
 
Hi j0k
 
j0k
Hello :)
 
can i steal a bit of your time?
 
j0k
if your question is related to sf1.x yes, otherwise I won't be able to answer, I don't really know sf2
 
2:39 PM
ouch, my question is about services and session into SF
but maybe there is a difference between those concepts into 1.x and 2
 
j0k
into sf 2.x?
 
symfony2
 
j0k
you still can ask but I'm not sure I will be able to answer
 
ok, I'll make a try :=
:)
my situation was: had a controller with some actions. Those actions had too much code
since i'm new to symfony and MVC in general
so start to refactor them
 
j0k
good idea
 
2:43 PM
I notice that I need entity manager inside my controller (call it manager)
sorry not controller
model
:)
so, I need E.M. inside a model (call it manager)
and the best way for do that is through D.I.
am I right?
 
j0k
right
 
ok
so start to move code away
 
j0k
I know the best way is to use DI for that
after, I've no idea how to use DI inside your model :-/
 
declare my manager as a service (if I want to use DI have to do)
(nevermind, I know how to use it :P)
however declare it as a service
and use, inside my controller
that service
$this->get('myServiceName');
in that way I move away all implementative details and hide them into that service
my Business Logic isn't anymore inside controller and they are now slim
is great, isn't? :P
 
j0k
yeah :)
 
2:50 PM
ok
 
j0k
someone says that controller shouldn't be more than 10 lines :)
 
very nice, mine are even less :P
 
j0k
:)
 
however, I read this about services
As an added bonus, the Mailer service is only created once and the same instance is returned each time you ask for the service. This is almost always the behavior you'll need (it's more flexible and powerful), but we'll learn later how you can configure a service that has multiple instances.
from SF official site
and now comes the pain, are you ready?
 
j0k
:)
yep
 
2:52 PM
ok, here we go :)
if I have a manager, defined as a service, that is used for - let's say - entity A business logic
and I have
a user that could have multiple of that A entity (not multiple services, but multiple entity connected to that manager)
in a specific moment, my user could only "select" as active one of that entity A
so it starts with default selection
and can change it with a specific page wich made ajax calls and so on
(sorry for my english and all this mess, are you follow me?)
*do you follow me
:P
 
j0k
well, you says "yes" about default selection and the choice of a specific page
but I don't know how to do that :)
 
default selection is done by fetching DB and extract only the default record that user has choosen during registration :P
the choice is made by call a controller
but this is the point
have I to store that information
(that is "currently selected item")
into my manager property
or have to stick it into session (that, as far I know, is a "special" service ... where "special" is say because it have a lifetime and so on....)
?
 
j0k
is it important that this "current selected item" remain in the future?
 
no, obviously not
it never have to be persisted onto db
 
j0k
so, use session then
 
3:02 PM
but ....
isn't the same ?
doesn't my service "dies" after user log out or session stale?
 
j0k
I don't know ..
 
Ok, nevermind... But apart from that
if I call into an action of a controller
$myService->setAProperty(10); where 10 isn't the "default" value
and into another action I recall
$myService->getAProperty();
haven't I to have returned
10 as value?
 
j0k
this going to specify on symfony 2 and I'm not sure how to well answer
I would like to say, it will return 10
 
(A is the name of class member, so getAProperty is for retrieve the value of "A" ... getXProperty for "X" value)
 
j0k
so, yes you will get 10 then
 
3:14 PM
this is the strange thing
beacuse i didn't get it ! :(
 
j0k
you get an empty value instead?
 
I do pretty much like that
$sm = $this->get('struttura_manager');
if(!$sm->getCurrentLodging()) { /* so my service isn't created yet */
$currentLodging = $sm->retrieveUserDefaultLodging($usrId);
$sm->setCurrentLodging($currentLodging);
}
else
$currentLodging = $sm->getCurrentLodging();
and into another action of this controller
I will call
$sm->setCurrentLodging($someValue);
with the value selected from user
so I expect that when i return onto previous action (that is the home page and the entry point of my application)
first "if"
fails
and $currentLodging have to be setted with user's choice value
 
j0k
you arrive on your homepage, you set the value? I'm lost in the process :)
 
when i log in
i arrive onto homepage
so the first part of code that i pasted is executed
my "struttura_manager" service
doesn't exist
so currentLodging isn't setted
(when i log in it doesn't exists)
 
j0k
ok
 
3:24 PM
ok, so when I leave home page and use the page for change my current Lodging
i call
$sm->setCurrentLodging($someValue);
that have to change object member value
 
j0k
ok
 
and when i return onto homepage, my service have to be alredy istantiate... So he simply have to get out that value
 
j0k
here your struttura_manager exists, right?
 
i suppose .... reading into docs
As an added bonus, the Mailer service is only created once and the same instance is returned each time you ask for the service. This is almost always the behavior you'll need (it's more flexible and powerful), but we'll learn later how you can configure a service that has multiple instances.
(talking about services)
so I suppose that it exists
 
j0k
I suppose too
 
3:30 PM
Strange thing is
if I comment all if else and so on
ah took only value as it is
this doesn't work again
so isn't a problem of my conditional statements
 
j0k
I'm a bit lost 'cause I don't really know how service/manager works in symfony 2
 
Don't worry.. Probably me too :P
I can store them into session
and don't worry about this behaviour
but since I like to understand
things
I want know the same, because this is happening
Thank you for your time and your opinions... I consider you a good user and a good IT boy :P
 
j0k
thanks :)
by the way, you can still ask a question about that point on SO ;)
 
Alredy done ;)
"See" you soon ;)
have a nice day !
 
j0k
same to you ;)
 
 
2 hours later…
5:46 PM
Hi all
Can anyone help me please with a FOSFacebookBundle issue ?
 
j0k
Hi, sorry I didn't knew it
 
I am struggling with an issue for days
If anyone can say even a word than could help
I will much appreciate it
 
j0k
What is your question?
 
it's complicated
If you wish to help, could you check the question on stack exchange please ?
Symfony authenticates users through the custom user bundle
and everything works ok
FOSFacebook connects to facebook
but does not authenticate back to symfony
 
6:13 PM
sorry
0
Q: Can't get FOSFacebookBundle to work with custom user provider (not FOSUserBundle)

Roberto DelgazzoOne of the first things I always dreamed to do with web programming was to learn how to connect my application with facebook connect. I have been thinking of it as a mountain and absolutely impossible to accomplish. But here I am, I thought "wtf? I am going to do this!". Sorry for the long intro...

this is the right onw
 

  last day (20 days later) »