« first day (1629 days earlier)      last day (3319 days later) » 

9:01 PM
Only if you have the magic script type thingy at the top of the script #/usr/bin/php or whatever to indicate how it should be run.
 
@LiamHardy Do you know what cronjobs are? :P
 
Not really..
 
Why not just set it to a few minutes time to test it?
 
@LiamHardy Look it up first ;)
 
also....yes, what is the exec doing there...
 
9:02 PM
This is just incorrectly making up stuff
 
9:16 PM
In DDD, which makes calls to the repository: 1) A domain entity 2) A domain service 3) An application service?
 
Yes.
 
LOL
@danack Question: Why did the indeterministic chicken cross the road? Answer: Because.
 
I really am not up on the terms 'the kids' are using these days for DDD, but I would say it would be weird for a domain entity to be aware of the repository. And domain entity shouldn't be aware of the application.....which leaves only a domain service?
 
@DaveRandom glad you liked it
 
An example of what brought up the question for me is, say I have Users (the aggregate root) and I do a call in some application service of $users->addProduct($product);, well, where do I put the "rules" that this needs to be saved afterwards?
 
9:23 PM
@DavidGraham Why is that in an application service?
The rules of what happens for when products get added to users sounds like it should be in some domain somewhere...
 
Well, someone has to trigger it somewhere? Where should it go?
Yeah, addProduct is a method in Users entity (the domain)
sorry, maybe I should say $users->purchaseProduct();, better?
 
clearer yes - @ocramius care to answer this ^^ ?
(I don't do DDD properly, so will shutup now...)
 
But again, we need some more rule that say "hey, the domain has done it's job, now this needs to be saved". This will require some "smartness" somewhere, in that (1) We need to save (2) We need to save products (not users)
 
@Danack you don't really need to be an expert to do DDD :P
 
I'm also not good at doing hand wavy bullshit....I say "I don't know" too much....
 
9:26 PM
@DavidGraham yes, it makes much more sense to express things in the terminology that the product owner uses: simpler to maintain as well
Doctrine ORM 2.5.0 is here! Over 450 issues solved, new caching layer, embeddables and much more! http://goo.gl/l4vuIS #doctrine2
 
@danack Maybe you just do D, but with a stutter? (joke)
 
2 years of development @_@
 
@Ocramius Installed 2.5.0 ... app broken :)
 
haha :D
 
@DavidGraham If I was forced to guess, I would say that the rules about what should happen when someone purchases something needs to be in it's own object/service. It wouldn't be right for it to be in either the users or products classes.
 
9:28 PM
@danack, regarding "hand wavy"....I'll quote George E. P. Box with "all models are wrong, but some are useful"
 
@FrankLiepert poke me if you find out what broke it. Went through the BC breaks?
 
Yeah, but regardless of DDD, you don't want the object handling it's own persistence?
someone has to make the call to the repository though
sometimes several calls? Logic/rules start to build up there
 
@Ocramius: Call to a member function add() on a non-object in D:[...]\Doctrine\ORM\PersistentCollection.php on line 163
 
o.O
@FrankLiepert can you gist the entity class?
 
I debugged into Doctrine\ORM\Internal\Hydration\ObjectHydrator, it passes an empty array on line 198
 
9:31 PM
yeah, that shouldn't be the case. Checking
 
@DavidGraham The code I write tends to be really simple. And so I don't find it a problem to do $object = $objRepo->getObjectToProcess(); fiddleWith($object); $objRepo->save($object); But that doesn't scale well to complex stuff, which is why someone else would give a different answer.
 
hmm, guess the default value for that property is an array
@FrankLiepert that looks like a bug, yes, I'll try writing a small test case now. Consider gisting which entity caused that
 
@Ocramius: class and xml definitions?
 
just the class
 
Evening everyone!
Guys, can anyone help with php building in ubuntu? I've installed all modules, but after calling ./configure, php -i shows still no support for PDO mysql :(
 
9:36 PM
Not anyone, only people who know the answer to your problem, which you haven't written can.
 
@FrankLiepert thanks a bunch!
 
@Ocramius For the record - you may wish to not use that phrase: urbandictionary.com/define.php?term=thanks%20a%20bunch
 
oh, I didn't know that :X
Then thanks a lot, @FrankLiepert :)
 
@Ocramius: Oh I found the problem ... had initialized the property with array() before
 
9:40 PM
@FrankLiepert where? Your codebase? :|
 
@danack yeah, DDD is not for every project. But I need something to help with rules piling up and unit tests don't protect from "forgetting rules"
@Ocramius I was thinking about using events and handlers. Certain domain methods will trigger events that repositories are listening too, to save on.
 
@Ocramius I update the gist ... see the default value for the property $participants. With 2.4.7 there was no problem, but 2.5.0 doesn't like that :)
 
The domain here is just "suggesting" things, not really caring 100% about persistance
 
@DavidGraham a bit magic unless you specifically use domain events and event sourcing
 
Holla :D, I'm here again sorry for bothering you guys, but I'm lost with Auryn :D
 
9:43 PM
oh, weird, that is supposed to work, @FrankLiepert - testing it
 
yeah, I would love to use event sourcing, I'm already using CQRS for reads
but I'm too far into this project for that
 
well, if you want to use events for updates, that is ES :P
 
yeah, that's the feeling I got also, it is a bit magic
 
but doing it half-way is just a mess
either all or nothing
 
@Ocramius <-- the only thing this guy is mediocre on is, mediocrity itself!
 
9:45 PM
@VeeeneX are you trying the "no-framework-tutorial"?
 
@Danack at the moment my problem is message configure: error: Cannot find OpenSSL's libraries, but as far the material goes, I've installed all packages, that are required
 
@MarcelBurkhard Ehm, something like that alias doesn't work
 
whaat?
 
@Eugene you have the "openssl-devel" installed?
 
I had tried alias with Interface, without
 
I mean this function
 
@Danack there is no such package. I'm installing on ubuntu server 14.04
 
@VeeeneX alright, so the answer to my question was yes?
 
Yes
 
@Eugene ok - how about libssl-dev ?
 
9:48 PM
I think I might have found missing part
 
:D
 
@Eugene openssl-dev
 
$injector = new \Auryn\Provider;

$injector->alias('Http\Response', 'Http\HttpResponse');
 
@FrankLiepert what operation are you performing that is causing the fatal? A find? A flush?
 
9:50 PM
@VeeeneX looks correct to me, error is probably not on those lines
 
@MarcelBurkhard That's just an example
 
Thanks everyone. Seems I got all components now.
 
@VeeeneX pls gist/pasty of error message and the Bootstrap.php, and why the hell dont you answer my question??
 
@MarcelBurkhard Sorry which question?
 
9:53 PM
@FrankLiepert is it an inheritance, by chance?
 
I need to update a column on three rows based on selection. (i have a selections id value, and based on that i can find 'name' column value, which is common in three rows i need to target and update )... Haw to ?
 
@FrankLiepert yeah, because I'm hitting the SimpleObjectHydrator here
 
@VeeeneX wow your so lazy, not going to help you anymore... you know about the concept of scrolling up a page?? -.-
 
this approach returns an error notepad.cc/jusomu56
all within one table ... Join or Bind or smth better?
 
9:56 PM
@MarcelBurkhard are you trying the "no-framework-tutorial"? -> response -> Ehm, something like that -> I had built my own
 
sry I read: [it says] something like that alias isn't working
@VeeeneX either way I used that tutorial few days ago and it works flawlessly, you must've missed something or made a typo
 
I'm trying to copy that FW on github
 
Framework
heh :D
 
ThW
@animaacija is the generated sql valid, your source looks like it is missing escaping
 
10:02 PM
@FrankLiepert reproduced
 
@VeeeneX so now you're not going to show code except for the flawless lines you posted that are the same like on the working tutorial and except someone to look into is magic cristal ball and help you or what? :D
expect*
 
o.O
 
nvm ...
 
well yeah escaping needed, I would add that later, when ive got the concept running. SQL isn't valid as it appears:[the message::] General error: 1093 You can't specify target table 'articles'
for update in FROM clause in
 
10:05 PM
@Ocramius Good ... I tested with 2.4.7 again, didn't even hit ObjectHydrator.php
 
@FrankLiepert the ObjectHydrator is actually hit when there are fetch-joins involved.
Here's the test, @FrankLiepert gist.github.com/Ocramius/6a22665779885e48d749
 
@ThW the sql":: UPDATE articles SET goto = 1 WHERE name IN (SELECT name FROM articles WHERE id= 62)
 
And those changed with 2.5.?
 
10:07 PM
@animaacija is it an integer column? because if not you need ....'".$value."' (single quotes)
 
Ping me, if you have some updates I have to go
 
@FrankLiepert the ORM starts adding some fetch-joins when it can optimize loading some associations. Anyway, this is a bad bug :P Fixing it now
 
@rdlowrey you there? Someone abusing Auryn spotted ^^
 
user895378
lol
 
user895378
This sounds like a job for @Ocramius's official SoZFG.
 
10:09 PM
Nope, I've already given 0 of them
 
user895378
Hehe ... 0 !== null I suppose :)
 
@rdlowrey $Container = new \Auryn\Injector; lol..
 
@Ocramius Alright. Maybe it's fixed changing $value === null to empty($value) :D
 
Yeah
I'm just trying to fit the test so that it isn't functional :)
functional tests = poo
 
yes that was needed. But still error the same :: You can't specify target table 'articles'
for update in FROM clause ::

im guessing it is smth with namespaces, there was this temp renaiming thing is SQL somehow. But MAYBE my approach is not good enough... maqbe someone sees how this is beter using JOIN ?
 
10:14 PM
@MarcelBurkhard That's not abusing :D
 
@VeeeneX that class from opis library doesnt implement the interface you specified
 
user895378
@VeeeneX Yeah, the only abuse in that code snippet is the assault on my eyes from reading your capitalized variable names ;)
 
But I have an alias
@rdlowrey I using $Capital as initiated objects
 
Is it Batman?
 
I don't know auryn that well, just seemed like an issue to me
@VeeeneX not PSR-2 compliant AFAIK
 
10:19 PM
But it's working with older version as in no-framework
@MarcelBurkhard What do you mean with PSR-2?
@Danack who?
 
@VeeeneX is google available in your country?
 
I hate Java
 
I don't like it that much either
 
@ircmaxell That might make a decent blog post. On the surface Java seems kind of nice. But everyone who is not insane seem to hate it.
And I've haven't seen a decent explanation for that effect yet....other than 'Kingdom of nouns'.
 
Hey @rdlowrey, Auryn question - is it intentional that delegates don't get passed the $args passed into make()?
 
10:32 PM
it's the little things that kill me
class Base {
    protected String type = "base";
    public String getType() { return type; }
}
class Foo extends Base {
    protected String type = "foo";
}

Base item = new Foo;
item.getType(); // base
 
@Danack I actually like the language, but I don't like the output (bytecode, memory hungry vm, ... ) and oracle deploying adware through java installer isnt helping it either
@ircmaxell didnt know that this applies to protected member variables, sigh!
it makes sense for functions though, in a way
 
"in a way"
 
:D
well there is reasons
 
isn't there a "super" construct that should exhibit that behavior.... that just seems broken to me
 
user895378
@Charles Just so we're on the same page, are you asking for something like the following?
 
user895378
10:40 PM
function make($className, ...$args) {
    // ...
    return $delegate($className, ...$args);
}
 
@rdlowrey Yes, which doesn't seem to be what it does now, if I'm reading it right.
 
user895378
@Charles Oh, I see what you mean. Yeah there's no particular reason why it's not passed. If you want them passed to delegates just PR it.
 
@rdlowrey Cool, may do that. Still trying to decide if I'm going to abuse things that badly :)
 
@ircmaxell if type was public, would the output have been "foo"?
 
user895378
I totally didn't realize uniform variable syntax in 7 allows ($foo->bar)() ... \o/
 
user895378
10:44 PM
No more $foo = $this->callableFoo; $foo($bar); for this guy.
 
I don't think so, you need to assign the object to a variable of type Foo to call the stuff from the child class
i might definetely be wrong
 
user895378
I'm talking about a callable stored in an object parameter here.
 
user895378
You can't do $obj->foo() where property_exists($obj, 'foo') because php doesn't know if foo is a property or a method in that case.
 
and im talking about java polymorphism
:-P
 
user895378
Oh I thought you were talking about the uniform variable syntax thing. Sorry :)
 
10:47 PM
np, im on my phone, cant reply to messages here
p
 
user895378
the mobile chat UI sucks hard :/
 
so true
 
class Base {
    protected $type = "base";
    public function getType() { return $this->type; }
}
class Foo extends Base {
    protected $type = "foo";
}

$item = new Foo;
echo $item->getType(); // foo  (but in Java: base??)
 
@DavidGraham allegedly so yes
 
That's scary, I was thinking of learning Java soon
 
10:50 PM
well it actually depends on the type of $item
ehh item
 
lol, I love my $$$$
 
Foo item = ... // foo
Base item = ... // base
 
You know php is bling with so much use of $
 
so much $$$ in php
 
sorry, took me a bit to design some more decent tests
 
10:52 PM
I like my languages in $, that's why I like php and jquery
 
and nobody gets confused on what's a variable
 
@Ocramius Sweet, thanks.
 
@DavidGraham #argh
$ is supposed to be used only for libraries in js
 
@DavidGraham well I never had an issue with confusing things for variables in Java... reserved keywords get highlighted in any decent ide/texteditor and the rest is all brackets or variables??
 
10:55 PM
you are not forced to do that, it's just a convention, but still
having $variables in js would drive me mad
 
but you are fine with them when using jQuery?
it's not that big of a leap, if you ask me
 
@DavidGraham you shouldnt prefix them when using jquery either..
imo
 
right lol
 
@DavidGraham i don't use jquery
 
var form = $("#form1");

now whats the benefit if you named it $form?
 
10:57 PM
that means you like to type a lot?
I just think it's easier on the eyes
 
@DavidGraham I have no idea
 
that means that i don't have to include a 90kb library to support dead browsers
 
you know what is reserved or functions, from variables
I also think it just makes your code look a little more $rich, don't you think?
 
idk, i'm €uropean
 
Yeah @Worf I do hear ya on that. I'm pretty ashamed of including jquery + bootstrap (pretty heavy, especially if you aren't using a cvn and it's not in client's cache)
 
11:01 PM
dollars are basically worthless nowadays
:-P
 
or even worse.....jquery + jqueryUI + bootstrap
lol @marcel
be nice
$bills = null;
 
I avoid using jqueyUI at all times, that thing is like really bloated...
 
who has jquery + jqueryUI + jqgrid + bootstrap going at the same time?
<--- this guy
 
I actually had to put two different jquery version on a site once... with noConflict
 
<--- who is waiting for the day I get a designer to fix that, or angular.js gets google/bot friendly
 
11:04 PM
some other old library wasnt working with the new version and a new lib visa-versa
 
Guys honestly, it's time to move on from jquery. DOM may look lengthy to write but it's not that bad, and you can do more things. Starting new projects in 2015 using jQuery is super wrong and frankly sad. jQuery had a reason to exist, the cross browser compatibility, and it was a valuable tool for many in the past years. But today it's not needed anymore, it's time to move on
 
what did you use for the other jquery? The € character?
 
nope, $ too
 
@worf Don't tell us developers that, tell the stakeholders and users
 
11:05 PM
HTML5 really should be the ultimate answer right?
 
it's your job convincing them that jquery is history now @DavidGraham
 
Why do we need 2 client side languages
@worf I suppose I can try to convince them up until my bank account is empty
 
cuz SRP
markup, looks, interactivity
 
SRP is Godwin's law applied to code reviews
 
as in HTML, CSS, JavaScriot
Script*
 
11:08 PM
I want to learn angular.js .....but I hate that I have to abandon it for the public side (not at all SEO friendly)
 
@DavidGraham not true anymore afaik
 
yeah, lets just update HTML, to do all that client side stuff and be done with it
 
@Worf jQuery will be with us forever for the same reason Wordpress will suck forever: plugins.
3
 
@marcel Are you referring to those "snapshot" services, where you pay to have some server do html-snapshots of your angular.js public site?
 
11:09 PM
@Charles for the same reason Java won't die
 
@DavidGraham it's actually indexable
But I'd suggest directly going for webcomponents.org ;-)
 
@DavidGraham I was about to say that most popular programming languages are immortal, but look at what happened to perl...
 
@Ocramius is it at the same level though? I mean, are you going to get like 40% indexing compared to other sites that don't use angular?
 
@DavidGraham depends on what URLs you generate, heh
you're also not forced to make a single page app. NG works just fine on multi-pages as well
 
hmmm..... I need another reference before I'm convinced
 
11:12 PM
@DavidGraham I guess you could still make a sitemap with links to sites (with like test.html#something) but I havent tried
 
that reference looked kind of weak, IMO
 
Yearofthemoo and prerender.io as alternatives
 
@DavidGraham official google source = weak reference?
 
@Charles luckily i don't have to touch either of them :D
it's funny anyway, since most of plugins of both wordpress and jquery suck
 
well google mentions a lot of things, this is like only 1 random page, not convinced
 
11:14 PM
you stick to jquery for crappy plugins, lol
 
@Worf 90% of everything is crap, especially if produced by a (jquery|wordpress) "developer"
 
@worf It's not like we love jquery unconditionally, but pragmatically speaking (and we're in the PHP room, so you know we are all about practical) it's what we have to use
 
a wordpress developer :D ^
 
@DavidGraham yes, last year. msie8 is dead, msie9 is nearly dead (which has btw decent dom2 support) msie10 was entirely replaced by msie11 already
why on earth would one use jquery today
 
11:17 PM
@worf so pure JS then?
you'll still want plugins
 
it's js in both cases. DOM i mean
 
I know I know, my bad
 
#pedantic
 
so pure DOM manipulation the old school way?
 
11:18 PM
old school lol
 
@Worf you referring dom-js (npm module) ?
 
:|
 
yeah, old school, when people in this chat room were saying the reverse "you should be using jquery"
lol
 
ok seriously, who is using angular.js and getting the same SEO that had as before?
 
11:20 PM
dom is what jquery uses internally to manipulate the html
 
@Worf I know what DOM is I just though you mean some sort of new thing
but it seems you are simply talking about VanillaJS :-P
 
you are a bit confused
JS is the language and VanillaJS is still the language
 
i know?
 
DOM is how you manipulate html with javascript
 
and there is no way around DOM either way
 
11:22 PM
and it's not part of javascript, it's a library
 
@worf are you tired of programmers who do that, you know, overly pedantic
 
lol
anyway @DavidGraham since angular.js is google it's highly possible that googlebot has something to crawl specifically angular.js sites
we discussed about this in the html room
 
yeah, I'm leaning towards it, just hesistant right now, still feels little too early
I personally have stopped this progressive enhancement stuff in all areas, except stuff that I need google to see (ie. datagrid....I have a progressive enhancement approach to using jqgrid)
it's dumb, IMO, to keep assuming there are users who don't have JS
maybe there's this one guy who surfs the web with no-script because he's always going to sketchy russian sites to download pirated dvds
I ajax all my forms, but i still put a form tag with a valid link for progressive enhancement reasons since I heard google might start processing forms (sometimes we don't want that of course)
BTW I quit calling them "forms" nowadays. Just "fields" or "inputs", because I can put them anywhere and submit however I like.
or "filters"
@animaacija I wouldn't touch wordpress with a 10ft. pole
Unfortunately I work with schools, they like to be the dinosaurs when it comes to browsers, ugh
 
11:58 PM
@DavidGraham why wouldnt you? Wordpress developer sounds so funny in a sence, not that developer who develops worpress, but one who develops and delivers web applications using wordpress. And all jquery is doing for me is just shortening my writing.. i know this all can be done and even i could do this all in pure javascript, but as my heart is into back-end development, and as i am the only employee in my company, i like to get thru front end as quick as possible. Thanx jquery.
@DavidGraham Thou at the begining i felt some pain for carrying extra universal-library with my wapps (i think jquery was like 30KB) now im sure its worth it, in my case.
 

« first day (1629 days earlier)      last day (3319 days later) »