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

10:00 PM
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
10:01 PM
@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
10:04 PM
@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
10:12 PM
@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!
10:19 PM
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?

@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
10:24 PM
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
10:26 PM
@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)
@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
@hakre @peehaa not a complain! It's actually spot on!
10:29 PM
@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. :)
10:32 PM
@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"
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?
10:36 PM
@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
10:38 PM
@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
10:41 PM
@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)
10:43 PM
@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
10:45 PM
@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"
10:46 PM
@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.
10:52 PM
@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
10:57 PM
@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
11:02 PM
@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
11:06 PM
@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 :<
11:13 PM
@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)
11:22 PM
@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
don't try to get the directory listing. ^^
11:26 PM
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?
11:30 PM
@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
@Eugene the one I linked you is about behavioural extensions
11:36 PM
@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
mixedCase, CamelCase, lower_with_underscores, utter_Stupidity, Lol_Magento_Class_Names
11:40 PM
@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 :\
11:42 PM
@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
Later all
anyone good with magento?
11:50 PM
@Ocramius thank you for your help.
nn :)
@Hiroto You have a customer ^^
Magento is genuinely awful, lol
but, alas, enterprise
11:53 PM
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
11:54 PM
Well I'm gonna post this to see if anyone has any solutions
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
