ok #php 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@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.
Anyone know how long it usually is between a release going GA and do-release-upgrade seeing it? #ubuntu 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.
ok #php 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()."
Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this #php 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@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);
Just discovered a fun little corner of #php 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
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#php 2/2
@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.
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.
@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.
@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.
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. #pdxtst
@kevbob a more accurate question would be where is CN85oh. :) it’s a Maidenhead grid coordinate, a system the PDX Twitter Storm Team #pdxtst 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
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.
@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.
Ok, for those that have a #prusaXL, 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. #3dprinting
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_. #shitUserStories
@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?