ollieread,
@ollieread@phpc.social avatar

I need to remember that Mastodon exists! I’m currently writing a bunch of content to do with PHP and this would be the perfect place to talk about that.

I’m currently trying to decide whether is an interesting enough topic that people may like an in-depth course/series on it. It seems to be something a lot of people are vaguely aware of, but don’t really know the details.

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@ollieread My default answer to questions about this sort of thing is “absolutely you should write about this.” I asked this question back in 2008 about testing code and the answer was “get to it” and it built my entire career.

ollieread,
@ollieread@phpc.social avatar

@grmpyprogrammer well it definitely seems to be something people are interested in, and doesn't seem to be covered anywhere else. Not to any decent degree either, so maybe I will.

ollieread,
@ollieread@phpc.social avatar

I’ve also been trying to put together some content that’s more beginner friendly, by researching frequently searched queries on Google.

These are the ones I have so far.

ollieread,
@ollieread@phpc.social avatar

In fact, this is my first draft of the article on covariance and contravariance as concepts but also related to .

I've tried to go for simple, without too many details, but I think this contains the fewest number of details I'm capable of writing 😂

https://gist.github.com/ollieread/273cf344503533ee4c497ab4c62929bf

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread it's refreshing to read some PHP related content that gives recent language version for granted 😂

BTW, this article would be an ideal springboard to talk about generics; otherwise, to talk about this PHP-FIG bylaw: https://www.php-fig.org/bylaws/psr-evolution/

I wrote that, and it totally revolves around variance, since I had to devise a way around that to create a smooth migration path for PHP-FIG new typed interfaces...

ollieread,
@ollieread@phpc.social avatar

@alessandrolai thanks.

It's interesting that you should mention modern PHP and PSRs, as I've long held that some of those could do with being updated, as I think they're bit a limiting at present. (also I think some of them could be improved) 😅

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread well, the PSR scope is intentionally reduced to avoid over-standardization. And those are actively being used by multiple current frameworks and libraries right now.

Still, there are a couple of cases where we would like to do improvements, and the service registration for container is one currently being discussed in the mailing list.

ollieread,
@ollieread@phpc.social avatar

@alessandrolai interestingly, the container PSR is the one that I think is the most limiting, or needs improvement. Honestly, I'd probably create a dependency injection PSR that utilises it but adds some base indication for more advanced features, as well as some attributes for utilisation.

I think attributes are the future of PSRs as they'll let you hook into WAY more systems without making those systems adhere to specific contracts.

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread that's surely an interesting approach, but IMHO you're venturing outside of the scope of PHP-FIG and onto the implementation space...

ollieread,
@ollieread@phpc.social avatar

@alessandrolai I think it could be achieved without venturing into implementation.

It's super rough (I threw it together in the last 5–10 minutes), but here's a write-up that hopefully explains enough of it. It's concept I was going to explore anyway.

https://gist.github.com/ollieread/144840c92e6829e07134c17b28878510

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