@dantleech@fosstodon.org
@dantleech@fosstodon.org avatar

dantleech

@dantleech@fosstodon.org

Developing the Phpactor (https://phpc.social/@phpactor) language server, PHPBench, and other stuff. Working with #PHP, #Go, Typescript. Bad musician, not good at spelling. Learning #Rust painfully.

Contractor!

This profile is from a federated server and may be incomplete. Browse more on the original instance.

dantleech, to random
@dantleech@fosstodon.org avatar

grr. part of me really wants to cycle from the UK to WebSummerCamp in Croatia.

My initial mapping put it at around 1,400k, which is 2 weeks of cycling. But my mapping doesn't take into account roads not being perfectly straight and ... mountains, so probably 3-4 weeks, and then I need to get back home.

... or I could just fly, but then I need another summer cycling project.

decisions...

dantleech, (edited ) to random
@dantleech@fosstodon.org avatar

PHPs DOM API is dark and full of terrors (and no I'm not talking about the SimpleXML API because I've deleted that from my brain)

... saying that I don't mind it that much, but DOMXpath returning false|DOMNodeList is very painful in the age of static analysis.

The DOM parsing in Golang is certainly something I prefer to PHP.

dantleech, to random
@dantleech@fosstodon.org avatar

working on Symfony I feel like I really need to implement the long-missing autocomplete/generate overridden method feature in Phpactor (actually was/is there in the VIM plugin - it's probably the last refactoring that hasn't been migrated to LSP :P )

dantleech,
@dantleech@fosstodon.org avatar

@HerveRenault e.g. implementing the configure and execute methods in Symfony commands. I'm used to being able to generate abstract and interface methods, but in Symfony the API is often "passive"

dantleech,
@dantleech@fosstodon.org avatar

@HerveRenault either that or a code action to generate the methods, maybe both 🤷

dantleech,
@dantleech@fosstodon.org avatar

@wouterj @HerveRenault I think the AbstractExtension (DI) is another recent example that triggered my comment there, but yeah, probably not that many cases.

i didn't know it was possible to implement a console command without extending though?

dantleech,
@dantleech@fosstodon.org avatar

@wouterj @HerveRenault btw, I forgot about it but the ancient VIM plugin's context menu has "o[v]eride method" which does just this...

dantleech, to random
@dantleech@fosstodon.org avatar

soimetimes it's very hard to not stop whatever I'm meant to productively be doing and add a featurte to phpactor to make it slightly faster to do what i was doing productively.

dantleech, (edited ) to random
@dantleech@fosstodon.org avatar

urghh, whatever anybody says I still find Google better than DDG (and I don't find Google to be great), but they've just introduced AI results at the top of the page, and they're referencing other AI results 🤢

Schrank, to random German
@Schrank@phpc.social avatar

@packagist Awesome! composer req phpunit now adds phpunit to require-dev as default, without asking - I LIKE!

dantleech,
@dantleech@fosstodon.org avatar

@heiglandreas @naderman @Schrank @packagist in some cases test code is coupled to both to the tool and the production code (Phpunit being one example). I for one like the convenience of dev deps and the fact that my tooling is "guaranteed" to work after a composer install - I've rarely encountered problems. Saying that I'm otherwise happy to switch to the composer bin plugin.

cspray, to php
@cspray@phpc.social avatar

Couple weeks ago speaking with @ocramius about Annotated Container. He brought up something about Attributes I had heard a few times before. Something along the lines of:

"I don't want container wiring code littered throughout my codebase."

So, I wrote a blog article that talks about how Attributes aren't really the point of Annotated Container and how you can use the library with no Attributes or highly limit their spread through your code.

https://www.cspray.io/blog/annotated-container-without-attributes/

-container

dantleech,
@dantleech@fosstodon.org avatar

@edorian @cspray for me one DI config (preferably in PHP) per module (whatever that may be) preferably located in the module itself.

dantleech,
@dantleech@fosstodon.org avatar

@cspray @edorian I didn't mention the service locator pattern :)

dantleech,
@dantleech@fosstodon.org avatar

@cspray @edorian bit like SF bundles (but simpler damnit) or Phpactor's extensions.

dantleech,
@dantleech@fosstodon.org avatar

@cspray @edorian and reading your first reply now, yeah probably like that :D

dantleech,
@dantleech@fosstodon.org avatar

@cspray @edorian one stronger feeling I have at the moment is that I don't want my domain (or "good") code to be have symbols that couple it to a framework or DI container. So prefer orchestrating "externally" to the class. I.e. aiming for "closed for modification" even if it's modifying an attribute...

dantleech, to random
@dantleech@fosstodon.org avatar

my refactored code is slower than the original code and I have no idea why....

... and it's because I was instantiating a value object in the benchmarking loop.

dantleech, to random
@dantleech@fosstodon.org avatar

ah, those hallowed architectural rules that defy common sense and make the code less maintainable.

pierstoval, to random French
@pierstoval@mastodon.social avatar

Laravel folks will literally keep reinventing the wheel and adding glitter on it instead of going to therapy

dantleech,
@dantleech@fosstodon.org avatar

@pierstoval as opposed to the Symfony folks? https://symfony.com/doc/current/setup.html :D but share your frustration.

dantleech,
@dantleech@fosstodon.org avatar

@pierstoval to play devils advocate: with Symfony it's the primary installation method and the installer is a closed-source binary last time I checked. So I don't think Symfony have the "upper ground" here.

But also, tbh, as long as the composer option is there (and documented) I don't care very much 😛

dantleech,
@dantleech@fosstodon.org avatar

@pierstoval oh, didn't realise that!

kitchen, to random
@kitchen@simian.rodeo avatar

It should be legal to take someone’s cell phone and smash it on the ground if it makes noise.

dantleech,
@dantleech@fosstodon.org avatar

@kitchen yes, and people that listen to music on speaker on public transport should have their phone licences revoked on the first offence!

dantleech, to random
@dantleech@fosstodon.org avatar

I've made it to Milano (Bergamo) airport (which isn't in Milan but in Bergamo!!) after a great conference. Still a good 6 hours of travel ahead, but feeling pretty confident I'll make it out of Italia today. Had a great time!

dantleech,
@dantleech@fosstodon.org avatar

@thepanz haha, I didn't plan it at all,but got there in the end with time to spare. Let's chat next time :)

dantleech, to random
@dantleech@fosstodon.org avatar

spent a few hours introducing the BDD framework Godog to my pet Golang project today. Also switching from Chi to Gorilla/mux router (for URL generation).

so far so good, although Go is honestly a bit annoying and wonder if it's the best choice for this project, but whatever.

dantleech, (edited )
@dantleech@fosstodon.org avatar

... and seems I'm deciding to ditch my Golang project and restart it as a Symfony app.

Actually quite theraputic doing actual web development, as I am, I guess, a web developer... and applying all the crap I've learnt over the past X years on a greenfield project - and hopefully I can learn some new crap too.

... and I dare say I'm using autowiring .

dantleech,
@dantleech@fosstodon.org avatar

@jasonprogrammer only know Go from that list. Originally I wanted a self-contained binary, but after getting frustrated with Golang (another post), I realised the app may as well work at a larger scale, so back to PHP. I'm more productive and it's more satisfying.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines