thomastospace, to random
@thomastospace@phpc.social avatar

I just started a plain typescript project, and was too lazy for a docker setup so I just installed Node with apt and went on my way.

I installed Typescript, that went fine, but when trying to use it it gave a vague error.

Quick search fixed it, but... I'm amazed by the cause: Typescript didn't support the version of Node I had installed, which sure.. That's okay. But why didn't NPM tell me this? NPM does not have node version constraints?!?

🤯

jaapio,
@jaapio@phpc.social avatar

@thomastospace every time I try another language, I feel blessed that I'm able to work with the most powerful and reliable package manager of the world. Nothing beats #composer

#php

lukasrotermund,

@jaapio While composer is useful, it's not always the bee's knees, especially during major updates involving multiple packages.

Some of the error messages are completely useless and I have spent hours trying to find the problem. I have often wished I could switch to another language because I was stuck in composer update hell.

For example, I have fewer problems with Go modules and rust dependencies via rusts cargo. Both update more smoothly.

#php #rustlang #golang

flavioheleno, to php
@flavioheleno@phpc.social avatar

would you like to run your for all available Releases but forgets to update it whenever new versions are available? Try my latest action to improve your build matrix: https://github.com/flavioheleno/php-active-releases-action

selwynpolit, to drupal

I’m starting a new job on Monday and I’ve had lots of time to update my free online book: Drupal at your Fingertips. Please share it with your network. https://selwynpolit.github.io/d9book/ #DrupalBook #Drupal #PHP #Development #Drush #DDEV

wyri, to php
@wyri@haxim.us avatar

Wrote a fancy one-liner because I didn't want to toss in the mix and go all in on . Actions response to it: 🖕 🖕 🖕

The first image is the full one liner, but it already 💩 out on the right image

Image of the following code: echo "${$(cat ${{ inputs.dockerfile }} | grep FROM | tail -n 1)}"

orchidpink, to php

Would you be surprised if I told you the array key gets converted to an integer?

Well, it does. In PHP array keys that are numeric strings are converted to integers.

#php #webdev #programming

doefom, to Laravel
@doefom@mastodon.social avatar

I think in English when you write formal text you spell the numbers until 10. From there on you just write the number. #Laravel can help with that using the 'Number::spell' helper.

#php #webdev

doefom, to Laravel
@doefom@mastodon.social avatar

TIL that ships with the 'isCpRoute()' function, which allowed me to make my code a little more compact. The function will check if the current route is a control panel route or not. Here's the old and new code. Feels refreshing 😁

ultimike, to php
@ultimike@drupal.community avatar

Deep technical dive into creating a new, custom Rector rule by @joachim:

http://www.noreiko.com/blog/refactoring-rector

I really like this blog post, as it really explained Joachim’s thought process as he worked towards a solution.

wyri, to php
@wyri@haxim.us avatar

The things I write in my (#PHP) package documentation: And, well, not ship a package without being fully functional 😅.

sarah, to php
@sarah@phpc.social avatar

One of the things I've learned over the last twenty years is there's plenty of work in #php.

But something else I've learned is that you need a network to find the work.

Building that network should happen in the good times. You never know when you'll need it in the lean times. Plus, having a network means having a community to support you and to be a part of - and that's never a bad thing!

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! #php #laravel https://masteringlaravel.io/daily/2024-05-31-how-do-you-test-code-you-dont-understand

simonhamp, to Laravel
@simonhamp@phpc.social avatar

Here's a little #Laravel #PHP tool I built as my New Tab page

It lists all my projects based on the filesystem, giving me an overview of their state at a glance and quick access to various tools

It also lets me add custom details, search and more

It's built on Laravel Volt, which was really fun to use!

Will open source at some point

video/mp4

mobileatom, to php
@mobileatom@flipboard.com avatar
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.

mobileatom, to php
@mobileatom@flipboard.com avatar

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

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

symfonystation, to Symfony
@symfonystation@newsletter.mobileatom.net avatar
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!

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 🇺🇦

maccath, to php
@maccath@phpc.social avatar

The life of a maintainer (and generally any back-end engineer) - if your existence is acknowledged, something's probably gone wrong! I feel you, @jrf_nl

Thank you to all of the package maintainers out there 💕

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

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?

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

I'm looking for a 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.

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 ?

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