« first day (878 days earlier)      last day (4284 days later) » 

22:00
Same issue is still present No Metadata Classes to process.
@Eugene well, code plz? :)
For cli?
@crypticツ because I'm a newby with the chat system I think...
@Eugene yes, your current bootstrap stuff :) in a gist if possible
@Ocramius *boostrap
22:01
@Ocramius here you are gist.github.com/jeserkin/5147489
@PeeHaa Not as easy as you thought? :P
I checked. Both directories Entity, EntityProxy exist.
@Eugene no metadata driver there?
I can freely modify the HTML though, if it helps you.
@Ocramius Oops. Driver inside Em setup
One sec
22:04
@NikiC ? O_o
@MadaraUchiha Neh. It's okey. I'm jqueryfying it :D
Anything you guys wanted to ask balpha? Because he's hanging in chat @PeeHaa
@dave's issue somehow magically resolved itself. Just like the one on meta
22:12
@Ocramius as I saw in some Q at SO, the driver for mysql should be pdo_mysql
@Eugene this is happening before the connection is initialized
@Eugene can you check the realpath of $this->modelsDirectory?
@Ocramius checked. It is shown as it is ment to be.
As well as both Entity and Entity/EntityProxy
and your entity classes are in there? What does a single entity class look like?
(proxies should not be under lib, since they are generated code that shouldn't be committed)
jquery to the max @MadaraUchiha jsfiddle.net/HkGgL/4
@PeeHaa Nice!
22:19
:-)
I hate my gift that I always seem to rape designs I get by tweaking it :(
Can someone explain why I am getting the error: Fatal error: Class 'XMLElementIterator' not found in iterator.php, when trying to follow this example?

http://stackoverflow.com/a/15351723/1129107
@Ocramius No, there is non at themoment.
@Eugene ah, so that's why :P
I was running in circles thinking why that is so ^_^''
@Ocramius I thought, that first of all I must do this step and then create my Entity classes.
Now I see.
@user1129107 Because you haven't a class called XMLElementIterator
22:24
Then what do proxy classes represent? Are they something like Twig cached templates?
Are there any examples?
Good evening, my name is Chris and I am a PHPaholic
Now I'll go to the neighbor to see wheter there is some beer left over there
Hi Chris
@Eugene no. Proxies are access interceptors. Whenever you access a method/property of an object that is not yet initialized, they load it from DB
@DaveRandom Good evening Chris :D
22:26
@PeeHaa I don't understand what the class needs to be - was trying to follow the example as is - not too familiar w/ php... can you help?
Wow nice one, @Gordon made mod, congratz :-)
@user1129107 Not sure if @hakre is online atm. It's his answer :)
Now I really need beer. brb (I think)
hi
@user1129107 oh yes, the iterator is missing. I'll put it online, mom
Hey @hakre we have received a customer complaint about one of your answers
:P
@hakre
@hakre @peehaa not a complain! It's actually spot on!
22:29
@DaveRandom thanks :)
Ooh he's blue and everything
^ require the file in there and the example should run just right.
Alright - one moment plz
@Ocramius probably need to try to understand it.
Oh hey @Gordon won. Congrats! I voted for you. :)
22:32
@Mysticial thank you :)
@Eugene basically, each time you call $parent = $child->getParent() on a $child that has an associated "Parent" entity, an empty proxy object is returned. That proxy is in "uninitialized" status. The first time you call any method on $parent (for example $parent->getName(), the proxy will get initialized and load data from the DB.
@Eugene that allows you to do $child->getParent()->getName(); (and happily break demeter's law as much as you want) without ever being aware of the DB layer
Okay. I see now.
@hakre "Parse error: syntax error, unexpected ':' in /xmlreader-iterators.php on line 248"
-5
Q: If *this* then *that*

DanI'm a novice and hoping someone can kindly assist. I have a custom build CMS which a developer built for me a while back. Currently, news updates on the system refer to the logged in author by way of username. I now want to include Google Authorship to each username. So, the existing code is as...

^^ Did that guy seriously suggest w3schools? Or is that an intentional troll?
22:36
@Ocramius, should class properties have same names as columns in db or everything is set through annotations? If so, then howcome on slide #25 content property doesn't have column name to what it is linked.
@user1129107 which PHP version do you use?
@Eugene the column name is optional. The ORM can generate it from the property name through a so-called "naming strategy" (configurable).
@user1129107 That code requires PHP 5.3 no clue if it can be ported to 5.2
try return $this->string ? $this->string : $this->reader->value; instead
22:38
@Ocramius, but in your example how one is linked to another?
class Greeting
How id and content are linked to some table in db? I assume that in your case table is greeting and it has two columns at least - id and content
@hakre I think it's 5.2. I changed to your suggestion, now it's saying: Fatal error: Class 'HeadendIterator' not found
@user1129107 That class is part of the answer.
@Eugene not sure I get the question
each entity definition usually means there's a corresponding table for it
@user1129107 first code-block in stackoverflow.com/a/15351723/367456
22:41
@Ocramius in this case. Since you haven't marked table name and didn't link properties to columns, I assume, that in your case table is greeting and it has two columns at least - id and content. Am I right?
@Mysticial aaaaand its gone
@Eugene ah, yes
it's basically table Greeting with columns id (PK) and content
@Mysticial some users still suggest w3fools. I know it's sad. You can leave a comment if you like.
@Ocramius so if I don't want to create aliases in comments I need to name everything acording to db structure, right?
@Eugene you usually start from the entities first, then generate the DB
@Eugene but yes, you can do fine-tuning with all the available annotations (or xml or yaml)
22:43
@Ocramius can I make an exception? :)
@NikiC Wasn't @Gordon supposed to do it unilaterally? I voted for him to help you guys shut up about all the crap in PHP. :)
@user1129107 you got it to work?
@Ocramius with doctrine 1.2 I created DB and models where generated from it.
@hakre trying now
@Ocramius So db is present
22:45
@Eugene you can reverse-engineer the DB for the first run if you want. The ORM can generate mappings and then entities eventually, but I wouldn't suggest it. You should focus on your object graph, not on the db structure
@PeeHaa Are you busy?
@Ocramius object graph? what would you mean by that?
@Eugene relations between your entities
@Ocramius you mean like fk in db?
@Eugene you don't think of a "User table linked to a Role table", you think of a "User that has Roles"
22:46
@Ocramius ou. So in OOP way how they are linked.
@hakre where do I need to add the first block? To the xmlreader-iterators.php? And then just include xmlreader-iterators.php ?
focus on what you need at application level, not on the db structure. Think as if you didn't have the DB at all
effff, Travis, Y U FAIL?!
@Ocramius I see. Okay.
@Ocramius yeah. Saw that too. If you are talking about doctrine master branch
@user1129107 full example:
bleh, failed because of my push -f ._.
@DaveRandom Not any more
Yay multiping
@Eugene btw, if you look for more support, the #doctrine channel on freenode has always people lurking around and willing to answer :)
aaaand, bbiab
@hakre giving me an Internal Server Error now
@user1129107 hmm, maybe again a syntax error problem because of PHP version? I use php 5.4 here.
22:52
@Ocramius okay. Thank you.
how large is each of those <headend> elements?
@Ocramius one more thing. Are there interfaces in this version like in 1.2? For example 1.2 had option to do $this->actAs( 'Timestampable' );
@hakre let me check
@user1129107 and check error log of webserver what the 500 internal server error is for
@Eugene there are behavioral extensions, but we moved away from that because they tend to add too much logic to the persistence layer, where the persistence layer should just persist
22:57
@hakre roughly 1500 lines
@user1129107 what does the server error log say for the 500 error?
@hakre trying to find that for you
@user1129107 well it's more for you if you want to get it to run. anyway it's time for me to go to bed.
gn8 folks
@Ocramius have you made any other approach to easy live of developer, other that "moved away from that"? :)
@hakre thanks for your help - I will try running it on php 5.3
23:02
@Eugene you mean a migration from D1 to D2?
@user1129107 or even PHP 5.4. It works very good.
@hakre alright, I'll try that - thanks again!
@user1129107 btw here it's just running on a 1.9 gigabyte XML file just fine ...
@hakre that's good to know, because my file isn't quite that big
23:06
@hakre any idea how long it should take to get thru a file that big, or half?
I hope this chatroom doesn't become too crowded now
@user1129107 through the whole file? this 1.9 gig file will run overnight here, I think it will take 3 hours just for the iteration (not doing any output).
@hakre well I'll keep workin - thanks again for your help. actually gotta run too
@user1129107 500000 elements took 16.38128 seconds - have fun!
@hakre I have a killer loop that goes through about 3.7 million items in total. i got RAM usage down from 12GB to 78MB, and time taken down from 40 minutes to 130sec. but i still need it to be faster :<
23:13
@Hiroto XML parsing as well?
can you async write a file in PHP elegantly? i don't want to use the hackery that is PHP threads
@Hiroto you can just write into the file and flush later
@hakre: nope, mostly string manipulation and working on resources, then writing CSV files in chunks of 1 million (each entry gives 500 CSV lines) and compressing it by like 80% in a 7zip
the last developer shoved everything into one big array and relied on the 32GB of RAM the server has
checkout compression wrappers, they might be useful to compress / decompress on the fly: php.net/wrappers.compression.php
it's not as strong as 7zip but for textfiles it works very well, too.
yeah, one big array into memory. until the machine makes crazy sounds.
also, i am genuinely being paid to manage a minecraft server for my boss' son
added bonus: I get the server below it in the rack (2U, dual xeons, 24GB RAM, space for 4 HDDs)
23:22
@Ocramius yeah, something like that. Looked at what you suggested, seems usable.
@Eugene there's a convert mappings tool from D1 to D2 eventually
only problem is that the drives are SCSI :<
and the RAM is DDR2
it's not maintained, so it may crash horribly, but you can give it a shot
@hakre i had a really paiful bug with the script on the dev server the other day
i checked when to split with an iteration count and if $i % 1000000 === 0, but never increased $i when i split
so within 10 minutes i had a few hundred million one-line files in the webroot
oha
don't try to get the directory listing. ^^
23:26
i wish i knew about the rsync trick to empty a directory at the time. i found out at lunch the next day
@Hiroto how does it work?
find's delete function is slow as hell in comparison
you rsync to an empty directory
it cleans the directory so hilariously fast
about 200 times faster than rm
@Hiroto but how does rsync do it?
23:30
@hakre magic.
anyway, I gotta go to bed now finally. gn8.
@Ocramius where you talking about tool or first link with extensions?
@Eugene a command line tool
Okay.
@Eugene the one I linked you is about behavioural extensions
23:36
@Ocramius by the way is there some certain naming conv. for type or same as in mysql?
@Eugene that's up to you. I suggest lower_case_underscore_separated and avoiding SQL keywords for the columns :)
@Ocramius i.e. * @ORM\Column(type="DateTime")?
for the properties, I'd go camelCase
CamelCase*
mixedCase, CamelCase, lower_with_underscores, utter_Stupidity, Lol_Magento_Class_Names
camelCase
UpperCamelCase
23:40
fUcKsAnItYcAsE
2
lol
@Lusitanian there was a nice CS =D
Ah, yes
Also I follow PEP8 for pretty much any language. PSR1 is out of the window at all times, dangling from the 58th storey.
@Ocramius I've been talking about annotations. If column type in database is datetime, then I also should describe as datetime, right? Not as something else, like date, right?
btw, there's a reason behind that, and it is because of all the tools that blindly use getters/setters based on property names :\
23:42
@Ocramius knew it was a troll at 5-space indentation
@Eugene yes, it must be an instance of DateTime
@Hiroto someone actually wrote code compliant with that: github.com/richardjh/phpstyleguide/blob/master/…
my sides
night~
Later all
anyone good with magento?
23:50
night
@Ocramius thank you for your help.
nn :)
@Hiroto You have a customer ^^
NOOOOOPE
Magento is genuinely awful, lol
but, alas, enterprise
23:53
Haha it indeed has it's flaws
also magento CE has 0 good documentation
magento thinks you're genuinely awful
but at least it's enterprisey
Yeah the issue is the lack of documentation
you need to work out what something really does by reading the source code
If it doesn't use boostrap it's not enterprise
23:54
Well I'm gonna post this to see if anyone has any solutions
0
Q: Magento - Grouping products in one category by other categories

tecshaunI'm working on a magento site for a clothes designer and she wants products categorized in "collections". She also wants them categorized in clothing types such as shirts, dresses, pants, etc. I've created a category called "Everything" with the collections as subcategories ("Spring 2012", "Fal...

the high-rep users are core magento devs
Oh wow I didn't even realize they had that
thanks for the link
no problem; the beta is lagging behind a bit
@DaveRandom boostrap.php is the only guaranteed solution to make software enterprisey
damn straight

« first day (878 days earlier)      last day (4284 days later) »