logs archiveIRC Archive / Freenode / #php / 2015 / August / 20 / 1
HShar
delboy1978uk: Is that for me?
delboy1978uk
honest you can get a full setup in 20 mins
yeah
its a config file with 2 vhosts and databases as an example
HShar
cool beans! So what do I do with the yaml file? don't I need a vagrantconfig file?
caffinated
20 minutes of just waiting on the download too - it's not like it needs your interaction once it's started
delboy1978uk
drag it into the puphpet.com browser window
HShar
ooooooooooooooooooh magic!
Alphos
HShar damn easy, innit ? :)
delboy1978uk
then change the site root from my folder
Alphos
it's literally "click a VM"
         

delboy1978uk
and replace the 2 vhosts and databases
with tour own
HShar
thanks for your help i'll do the setup now and let you know!
delboy1978uk
once configured through the site create archive, unzip, and drop the vagrantfile and puphpet folder wherever you want them and vagrant up
thebuccaneersden
|TheWolf| : https://github.com/phpbrew/phpbrew
Alphos
cheers HShar
delboy1978uk
awesome, let us know if you have any hassle (you shouldnt)
thebuccaneersden
Probably better to use something like this to manage multiple versions of php rather than what you are doing
delboy1978uk
while were on about it, whos guilty of using xampp or mamp?
!+xampp
php-bot
Dont use XAMPP or WAMP. Use a real dev server on a VM. Install VirtualBox and Vagrant, then head over to http://www.puphpet.com
thebuccaneersden
lol, not these days no
|TheWolf|
thebuccaneersden : thanks, I'll check that out too. I'll have to see how that works with the hosting software I'm currently running, though.
delboy1978uk
believe me there are still people
and phpmyadmin too
thebuccaneersden
I have no problem with phpmyadmin, just so long as you dont expose it to the public web
delboy1978uk
its crap
you just like it cos it has a ship logo, and you re a buccaneer
thebuccaneersden
arrr& you saw right through my ploy, you land lubber'
delboy1978uk
i aint no land lubber
im el capitan
Alphos
thebuccaneersden soooo, same as with mysql-client and mysql workbench, except without useful features ? :p
thebuccaneersden
phpmyadmin does some things really nice tho. ie. constraints
delboy1978uk
thebuccaneersden
mysql workbench is really unstable on os x
have to use sequel pro
so...
         

delboy1978uk
use sequel pro on osx
Alphos
thebuccaneersden had a similar problem a few years back on ubuntu, it's stable for an hour, which is more than enough to reproduce the whole schema you have drawn on paper
NoiseEee
navicat is also pretty sweet but $$
Alphos
really weirded me out to see it stable on windows -_-"
thebuccaneersden
ya, navicat nice but $$
im a stingy mofo with some things
NoiseEee
holy cow when did they start charging that much!!! $149USD
caffinated
I used to use that stuff, but then I found it was easier to just use the commandline
AcousticDan
It'd be nice if when you mess up a git command, when it asks "Did you mean...", if you could say "YES THAT'S WHAT I MEANT!"
that was horrible sentence structure. My apologies
NoiseEee
i hear you caffinated. even my IDE has a decent enough DB interface these days
profsimm
Question: what techniques are available for scaling up dependency injection. Scaling up in terms of codebase. At some point, a larger module will have 20 or 30 dependencies and listing them all in a constructor argument list won't work great.
Bittarman
profsimm, that makes no sense.
thebuccaneersden
profsimm : try using pimple for dep inj
Bittarman
unless by module you mean a single class, in which case the answer is to pay attention to SOLID, and actually use dependency injection
profsimm
Bittarman: well no matter what I pay attention to, 20 dependencies in an argument list don't look good.
Bittarman
if 1 class is needing 30 dependencies, theres a very very good chance its doing too much.
profsimm, thats a situation which should not happen.
NoiseEee
what Bittarman said about too much
profsimm
Bittarman: it's basic math.
caffinated
injecting a dependency doesn't necessarily mean it has to be done in the constructor either. it could be an object that is assigned to a property.
Bittarman
profsimm, its basic oop.
|TheWolf|
thebuccaneersden : have you used phpbrew before?
profsimm
Bittarman: let's say you have objects A, B, C, each needs three dependencies.
NoiseEee
indeed a setter can let you hint the class as well
Bittarman
profsimm, that does not mean class D needs A B and C.
NoiseEee
function setMyObject(\className $theObject) { $this->myObject = $theObject; }
Bittarman
or that your 'module' should have an instance of all of those.
profsimm
Bittarman: since it's my example, heck it can mean that :P
caffinated
you could namespace in a dependency registry.
Bittarman
profsimm, it just sounds to me like you have entirely the wrong idea about dependency injection.
caffinated
a registry service doesn't necessarily have to be global
profsimm
Bittarman: it means you pass objects to the object that uses them. Via arguments.
Bittarman: it's hard to have a wrong idea about this
Bittarman
profsimm, sounds like you do, as you have a 'module' which needs 30 dependencies.
which, if you follow SOLID, is very unlikely to be the case.
perhaps defining what you mean by module will help though
profsimm
Bittarman: how would you factor and inject into a reusable content management system
Bittarman
profsimm, with di generally..
profsimm
Bittarman: take any CMS, and think if it's that hard for it to have 20 settings.
Bittarman
profsimm, suddenly you need a constructor argument for every setting?
profsimm
Bittarman: I don't, but what else is there.
That's the question, right :)
I came to ask this :)
Bittarman
profsimm, take any CMS, and, you won't find 30 constructor arguments anywhere.
NoiseEee
using setters
profsimm
Well, using setters...
Bittarman
profsimm, not even using setters...
thebuccaneersden
|TheWolf| : just to play around with
NoiseEee
but still there's a bit of a smell about your class doing too much if its using 30 other classes
profsimm
Bittarman: that's because most CMS are not injected into.
Bittarman: they're monolithic libraries that read settings from files.
Bittarman: but it doesn't have to be this way
Bittarman
profsimm, mine are
and they don't have that
and drupal 8 is, and it doesn't have that.
thebuccaneersden
Bittarman
symfony cmf... that uses DI, and that doesn't have that.
|TheWolf|
thebuccaneersden : do you remember the difference between 'phpbrew install x.y.z +variant1+variant2' and 'phpbrew install x.y.z +variant1 +variant2' (with a space)? They use both ways and I can't find any explanation whether there's a difference...
profsimm
Bittarman: drupal 8 is an application, not a module you can use within an application
thebuccaneersden: Pimple doesn't do much of anything tbh
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 next »