mobileatom, to php
@mobileatom@flipboard.com avatar

How to add visibility to 338 Class Constants in 25 seconds.

https://tomasvotruba.com/blog/how-to-add-visbility-to-338-class-constants-in-25-seconds?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

michael, to Laravel
@michael@thms.uk avatar

Been playing around with Laravel Livewire a bit today, and it’s quite cool actually.

Really a powerful way to quickly get an app with interactivity going, if you can’t or don’t want to use a JS framework.

luceos,
@luceos@fosstodon.org avatar

@michael wait until you meet filamentphp :air_quote:

michael,
@michael@thms.uk avatar

@luceos yeah, that seems pretty cool. One step at a time though

mobileatom, to Symfony
@mobileatom@me.dm avatar

Explore today's @SymfonyStation Communiqué of Symfony, Drupal, PHP, Fediverse, and Cybersecurity news. https://symfonystation.mobileatom.net/Symfony-Station-Communique-31-May-2024 🇺🇦

mobileatom, to Symfony
@mobileatom@flipboard.com avatar

Explore today's SymfonyStation Communiqué of Symfony, Drupal, PHP, Fediverse, and Cybersecurity news. 🇺🇦

https://symfonystation.mobileatom.net/Symfony-Station-Communique-31-May-2024?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

symfonystation, to Symfony
@symfonystation@newsletter.mobileatom.net avatar
jclermont, to php
@jclermont@phpc.social avatar

How do you test code you don't understand? We deal with this when joining legacy projects, but I recently found a novel solution involving fuzz testing. Super useful! https://masteringlaravel.io/daily/2024-05-31-how-do-you-test-code-you-dont-understand

sarah, to php
@sarah@phpc.social avatar

Looking for work? Make sure you check out my latest project, PHP For Hire (https://phpforhire.com). It's a directory of PHP talent available for hire!

joachim, to programming
@joachim@drupal.community avatar

I've just seen a #programming pattern in #PHP where a method could return two lists of things. Instead of doing that, it takes as a parameter a callable, and passes the two lists to the callable. Instead of:

[$a, $b] = getLists($param);
// Act on both lists.

we have:

$callable = function($a, $b) {
// Act on both lists
}
actOnLists($param, $callable);

Is that a #FunctionalProgramming pattern?

das_g,
@das_g@chaos.social avatar

@joachim Imposing a higher-order function where it just complicates things without any gain would (if at all) be an anti-pattern.

But it might be that the implementation of actOnLists is lazy w.r.t. the lists, which would improve performance in an otherwise strict (= eager) language in case not the whole lists are needed.

(Assuming getLists isn't a mere lookup but would have to actually produce (build / compute) the lists and their content.)

joachim,
@joachim@drupal.community avatar

@das_g Thanks for the analysis! actOnLists() isn't lazy, but it does need to make queries. Further complexity is that it actually retrieves more than one pair of lists. I imagine the higher-order function pattern was written here to avoid returning an array of arrays, or writing a value object class for just this one purpose. I'm not sure how much of a gain I consider that though, as I find the current pattern hard to get my head round.

mobileatom, to php
@mobileatom@flipboard.com avatar
beausimensen, to php
@beausimensen@phpc.social avatar

I'm looking for a #rector or php-cs-fixer rule that will enforce Modifier Keywords Order as defined in PER.

I would be fine with a PER-specific solution but happy to configure something generic w/ PER rules.

#php

alessandrolai,
@alessandrolai@phpc.social avatar

@beausimensen @Girgias maybe there's another dedicated rule? Because I see that they support the readonly token since a long time ago: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/5968

beausimensen,
@beausimensen@phpc.social avatar

@alessandrolai @Girgias If there is I haven't found it, yet. @Girgias suggested rule sense like where it belongs. What I meant to say is THAT RULE doesn't seem to care what order readonly comes.

davidbisset, to php
@davidbisset@phpc.social avatar

FrankinPHP is a "Modern App Server, written in ".

Native support for HTTP/1.1, HTTP/2 and HTTP/3, automatic HTTPS, OPcache and XDebug natively supported.

Native support for and more.

Interesting (and a cute logo).

https://frankenphp.dev/

robert, to php
@robert@flownative.social avatar

Now @dseguy talks about PHP types, all the way down to its implementation in the PHP engine.

#neoscon24 #php

symfonystation, to Symfony
@symfonystation@newsletter.mobileatom.net avatar
nyamsprod, to php
@nyamsprod@phpc.social avatar

I have a question regarding dependencies and semver for maintainers. let's say I have package B which depends on package A.

If I move a class from package A to package B does this constitute a BC break for A and B or only for A ?

alessandrolai,
@alessandrolai@phpc.social avatar

@nyamsprod as other have said, definitely a BC for A due to class removal. And due to the inverse relation, you don't even have an easy migration path (like with a plain class_alias or an extension)... 😔

nyamsprod,
@nyamsprod@phpc.social avatar

@alessandrolai I have an easy way out I can bump package A to the next major and keep B in it's current version and move the class there effectively embracing the BC break BUT it makes my monorepo ugly to work with until I bump package B to the same version as package A and I need in the meantime fin a good git-split tool able to handle 2 majors release ... that's the complex part

pilhuhn, to php
@pilhuhn@mastodon.social avatar

seems to have some fan-boys out there ;-)

Or a big vulnerability…

heiglandreas,
@heiglandreas@phpc.social avatar

@michael Yeah. Looms lime the server needs some more resources...🙈

Didn't expect so many people to be interested in my ramblings on a sunday.... 🤣

michael,
@michael@thms.uk avatar

@heiglandreas the joys of posting links on the fediverse 😬

  • 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