Posts

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

cabbey, to php
@cabbey@phpc.social avatar

ok folks, you were right Rector is pretty cool. The learning curve is steep AF, and the docs are, well, let's just say they're written by engineers for engineers. But given the target audience for this tool, that's OK. I've not yet done the changes I was originally asking about with it, because the config for it is going to be a PITA to build. I've been starting small. But what I've done so far has been pretty cool! I've done some wild things with RenameClassConstFetchRector for example. 🧵

alessandrolai,
@alessandrolai@phpc.social avatar

@cabbey @shudder yeah sorry, that's how it works.. That config option has some arguments though, you may try to see if there's one to help you there.

cabbey,
@cabbey@phpc.social avatar

@alessandrolai @shudder yeah, played with them to not much improvement. Currently thinking I’ll do a two pass approach. First use the renaming rectors I’ve configured against the whole codebase, then got diff to get the list of changes files and run a separate rector on just those files with this option. Will experiment with that in the morning.

cabbey, to ubuntu
@cabbey@phpc.social avatar

Anyone know how long it usually is between a release going GA and do-release-upgrade seeing it? Seems odd that I could download and burn the iso and do an upgrade with that, but can't do it from within the system yet.

cabbey,
@cabbey@phpc.social avatar

@Crell yeah, just trying to get a feel for how long the stagger is. But also meh… it’s not a lot of data, and it’s CDN’d pretty hard.

Crell,
@Crell@phpc.social avatar

@cabbey The indexes aren't large, but the packages are non-small. Especially for an LTS, if you're coming from a previous LTS.

cabbey, to php
@cabbey@phpc.social avatar

ok brain trust.... say you wanted to automate some code changes. Simple stuff like "find all the instance methods that call self::staticFoo() and change them to call $this->foo() instead"... what static analysis tool would be the first one you would reach for to do that? Before anyone says "a grep and perl pies pipeline" note that static methods that call self::staticFoo() must remain as is. Next up would be "find all the places ->info['foo'] is read and replace it with ->getInfoFoo()."

j3j5,
@j3j5@hachyderm.io avatar

@cabbey without a doubt, rector is the tool for that

https://github.com/rectorphp/rector/

cabbey, to php
@cabbey@phpc.social avatar

Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this code? https://3v4l.org/fqCvv The goal is to have the default argument for bar trigger the default argument for foo, but they're different defaults (since one is nullable and the other isn't), and bar should not need to know what foo's default is. (obviously in my real code it's a much more complex signature, and separate classes.)

ramsey,
@ramsey@phpc.social avatar

@gmazzap @cabbey Your second example is what I was thinking, too.

cabbey,
@cabbey@phpc.social avatar

@ramsey @gmazzap yeah, as I discussed with crell in another branch of the thread the root issue was avoiding two calls to foo in a conditional with a long argument list. The solution I put into PR Friday assembles an argument array, conditionally adds the one discussed here then calls foo(…$args);

cabbey, to php
@cabbey@phpc.social avatar

Just discovered a fun little corner of with @kboyd at work that's not super clear in the docs, but you'll eventually find all the right info if you look in all the right places.
Say you have a trait that declares a property with a default value. And say you have a class that uses this trait and also (re)declared the same parameter. That's fine, because the two declarations are the same.
But what if you wanted to use a constructor promoted parameter? well.... 1/2

cabbey,
@cabbey@phpc.social avatar

If you move that declaration to a constructor promotion... it blows up. With an unclear error: "Bad and hasABus define the same property ($magic) in the composition of Bad. However, the definition differs and is considered incompatible." This is because the constructor promotion is just syntactic sugar, and the code the sugar is transformed into discards the default value in the declaration. (It becomes a line in the ctor instead.) https://3v4l.org/d1kV4#v8.3.6 2/2

kboyd,
@kboyd@phpc.social avatar

@cabbey yep. It became an issue because of the definition of Psr\Log\LoggerInterface $logger = null dropping the = null in the constructor property promotion desugaring step.

cabbey, to random
@cabbey@phpc.social avatar

ok, what's a decent platform for hosting a blog on these days... you know the long form of these micro-blogging platforms that are all the rage? Bonus points if I can import my old blogger export content, doubly so if it's a platform I can use without feeling dirty about using it. I really don't want to have to manage it and run the infrastructure... that's too close to day job work.

thomastospace,
@thomastospace@phpc.social avatar

@cabbey
Two options. One is Notion + Super.so. Notion is easy to use, and it's easy to publish as website with super.so. Not that cheap though.

What I do, grab some shared hosting like @ubernauten and install Wordpress. Updates are automated, so no managing there.
After I've set it up once, I've not done anything managing it.

Any hosted platform seems to be horrible. Owning your data yourself seems to be the way to go.

cabbey, to random
@cabbey@phpc.social avatar

Sad day in my mastodon usage. I finally broke down and figured out how to block an individual.

🤦 only to then find out it doesn’t do what I want and I also need to mute them?

🤬 only to then find out that because they are spamming several tags I follow I still see their inane crap.

derickr,
@derickr@phpc.social avatar

@cabbey Not on our instance though?

cabbey,
@cabbey@phpc.social avatar

@derickr correct. On a mainstream instance with thousands of users.

cabbey, to random
@cabbey@phpc.social avatar

What in the hell is this supposed to show?

kboyd,
@kboyd@phpc.social avatar
cabbey,
@cabbey@phpc.social avatar

@kboyd @maccath ugh. I assumed the chat feature in MAX was powered by farting cats, didn’t know they were using it elsewhere. That actually may explain some of the bizarre sentences we’ve been seeing.

cabbey, to portland
@cabbey@phpc.social avatar

Finally a bit of snow to be seen drifting down in CN85oh. Not sticking, so no accumulation… but some small whisps scampering around in the eddies of the wind contrasting on the damp black streets.

cabbey,
@cabbey@phpc.social avatar

@kevbob a more accurate question would be where is CN85oh. :) it’s a Maidenhead grid coordinate, a system the PDX Twitter Storm Team over here on masto seem to have adopted from the HAM community. I’m sure because of the overlap between the two. https://en.m.wikipedia.org/wiki/Maidenhead_Locator_System

cabbey, to random
@cabbey@phpc.social avatar

In 1994 I was an assistant help desk staffer for a short period. Part of the perks of that was that I was added to the lpadmin group and could control print queues and printers. Tonight I solved a home IT request by adding my son to the _lpadmin Open Directory group on his laptop so he can add a printer at school. 30 years. Nothing has changed.

cabbey,
@cabbey@phpc.social avatar

@kevbob not only did he not, he pulled a (stereotypical bad) manager and told me about it verbally late in the day late in the week before I took off for the holidays. Promptly failed to say anything through break, then as he was getting ready for bed the night before going back to school he asked if I was done with it yet. And of course his solution was to just give him full admin. Yeah... no.

cabbey, to 3DPrinting
@cabbey@phpc.social avatar

Ok, for those that have a , how hard/annoying is it to relocate one once it's setup? Thinking I may need to assemble mine in a temporary location for a shortish period of time, and debating just not taking it out of the box until I can get it to a final location.

cabbey, to mastodon
@cabbey@phpc.social avatar

Has anyone found an iOS client with controls for ignoring hashtags? There’s a couple I’d like to stop seeing.

cabbey, to random
@cabbey@phpc.social avatar

welcome to the 1700000000+ era my nerds.

kboyd,
@kboyd@phpc.social avatar

@cabbey did it break slack?

cabbey,
@cabbey@phpc.social avatar

@kboyd well, something has. For some users. Allegedly.

cabbey, to random
@cabbey@phpc.social avatar

As a 1Password Using Developer, I need 1Password to waste hours of my time debugging why the hell things stopped working_ because they thought it would be helpful to not pop up a prompt to unlock my ssh key as it might distract my workflow_.

kboyd,
@kboyd@phpc.social avatar

@cabbey I've encountered that twice in the past two weeks, if you're describing what I think you're describing. I'm accustomed to it now, and I know how to check for it. Definitely a bit annoying, though.

And it's also more frequent than SSH agent. Which I guess means it's safer?

cabbey, to random
@cabbey@phpc.social avatar

Long read, but worth every minute of it. https://pluralistic.net/2023/09/14/prop-22-never-again/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • mdbf
  • Youngstown
  • ngwrru68w68
  • ethstaker
  • slotface
  • PowerRangers
  • hgfsjryuu7
  • khanakhh
  • kavyap
  • tsrsr
  • InstantRegret
  • DreamBathrooms
  • tacticalgear
  • normalnudes
  • magazineikmin
  • rosin
  • GTA5RPClips
  • thenastyranch
  • Durango
  • osvaldo12
  • vwfavf
  • cubers
  • everett
  • modclub
  • cisconetworking
  • tester
  • anitta
  • All magazines