@timwolla@phpc.social avatar

timwolla

@timwolla@phpc.social

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

Girgias, to php
@Girgias@phpc.social avatar

Welcome, my name is Gina, my profession Engine Janitor, finding obscure bugs while cleaning up code and creating new and better engine APIs.

timwolla,
@timwolla@phpc.social avatar

@Girgias Hello Gina.

ramsey, to random
@ramsey@phpc.social avatar

Why do IDEs always default the terminal to the bottom of the screen? I’m always—always—going to move it to right side of the screen. No matter what. Am I the only one who does this?

timwolla,
@timwolla@phpc.social avatar

@josh @ramsey I use git on the command line. The integrated terminal is my git IDE integration 😁 (and also my task runner)

Also terminal at the bottom for me. I need the horizontal space. It's easy enough to fullscreen the terminal in VS Code if I also need the vertical space.

Crell, (edited ) to php
@Crell@phpc.social avatar

Hey . When you use union and intersection types, do you include spaces?

(RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)

timwolla,
@timwolla@phpc.social avatar

@edorian @Crell @phpfig

> having spaces is such an accessible thing for me, allowing me to parse the blob of symbols

For me it's the other way around: No spaces, please.

Without spaces the type visually appears as a single token and when seeing the space I know the variable name comes next. For me the variable name is the most important piece of information.

timwolla,
@timwolla@phpc.social avatar

@edorian @Crell @phpfig

> But (ClassNameWithSomeLength|(Foo|Bar))&Baz type constructions are quite hard for me to parse visually.

That is incorrect syntax, because that's not in DNF 😃 (only & may appear within the parentheses). Parentheses may also not be nested.

Thus the only legal variants are:

  • A|B|C
  • A&B&C
  • (A&B)|C|D
Girgias, (edited ) to random
@Girgias@phpc.social avatar

So we completely forgot about adding support for marking parameters with attributes in the PHP documentation.

But this is now done and some functions now show that their password parameters are annotated with the #[\SensitiveParameter] attribute!

timwolla,
@timwolla@phpc.social avatar

@Girgias #[\Attribute] attribute for attributes next?

timwolla,
@timwolla@phpc.social avatar
heiglandreas, to random
@heiglandreas@phpc.social avatar

That's a new one: Unable to create an Email from an instance of "Symfony\Component\Mime\Message" as the body is too complex.

🙈 😱

timwolla,
@timwolla@phpc.social avatar

@heiglandreas @symfony I don't use Symfony’s mailer, but:

> The transport mechanism should not have anything to do with that!

Some transport mechanisms require doing special stuff. I encountered that myself with PHP’s mail function, which will parse the recipient headers from the RFC 5322 message for use in the envelope, instead of allowing an explicit specification.

This makes it impossible to send a multi-recipient email that is customized for each recipient (e.g. to use different headers).

beberlei, to random
@beberlei@phpc.social avatar

Together with my new co-author @timwolla we are restarting the discussion on the #[\Deprecated] attribute RFC.

See https://wiki.php.net/rfc/deprecated_attribute and thread on internals ML.

timwolla,
@timwolla@phpc.social avatar

@alessandrolai @beberlei

Personally I prefer such questions being asked on the mailing list, so that all the relevant information can be collected in a centralized location for everyone to see.

As for the question itself: It would probably be possible, but semantics would likely be pretty questionable: What should ReflectionFunctionAbstract::isDeprecated() return? How should static analysis tools interpret the attribute? Would they need to execute arbitrary complex code?

zeriyoshi, to random Japanese
@zeriyoshi@phpc.social avatar

My back pain for some time was due to ossification of the posterior longitudinal ligament (OPLL). I am having surgery the day after tomorrow. I may not be able to respond for a while.

timwolla,
@timwolla@phpc.social avatar

@zeriyoshi Best of luck that the surgery helps! 🤞

heiglandreas, to random
@heiglandreas@phpc.social avatar

TIL: It is a stupid idea to name a docker network "host". Especially when it is using the "host" driver....

🤦‍♂️

If you are curious now: DO NOT TRY THIS AT HOME!

failed to create network project_host: Error response from daemon: only one instance of "host" network is allowed

But also

"Error response from daemon: host is a pre-defined network and cannot be removed

I might have to reinstall docker now...

🙈

timwolla,
@timwolla@phpc.social avatar

@heiglandreas Doesn't the first error message say that you attempted to call it project_host? 🤔

timwolla,
@timwolla@phpc.social avatar

@heiglandreas Docker uses the name you give it. Do you mean Docker Compose?

beberlei, to random
@beberlei@phpc.social avatar

How can I achieve a 94% performance boost? In this particular case, by an optimization in the DOM extension. Thanks @nielsdos
Read more about this performance fix in my latest blog post.

https://tideways.com/profiler/blog/measuring-the-dom-namespace-reconciliation-performance-fix?utm_medium=social&utm_source=twitter&utm_campaign=measuring-the-dom-namespace-reconciliation-performance-fix

timwolla,
@timwolla@phpc.social avatar

@Crell @nielsdos @beberlei No. Looking at the code it's a single-linked list. To insert at the end you need to traverse it in full. Effectively:

$item = $listStart;
while ($item->next !== null) {
$item = $item->next;
}
assert($item->next === null);
$item->next = $newItem;

Reindexing is not a thing for linked lists, because they don't have an index.

timwolla,
@timwolla@phpc.social avatar

@Crell @nielsdos @beberlei With the fix roughly doing:

$item = $listStart;
$newItem->next = $item->next;
$item->next = $newItem;

avoiding the loop.

pwaring, to php
@pwaring@fosstodon.org avatar

Was pondering how to write a C implementation of a PHP function (explode - converts a string into an array of strings based on a separator string). It took a while before I remembered that PHP itself is written in C, therefore a C implementation exists of all PHP standard library functions.

(I will still write my own, because it's a useful learning experience)

#php #c

timwolla,
@timwolla@phpc.social avatar

@ramsey @pwaring Pointer arithmetic is not something special for a C algorithm and most certainly doesn’t deserve an explicit mention. It’s like saying a plumber uses a wrench to fix your sink 😜

heiglandreas, to random
@heiglandreas@phpc.social avatar

I am having fun creating an office 365 account.... 🤣

At least in Safari I get further than in Firefox... 🤦‍♂️

A screenshot just saying "Konto erstellen". Nothing else. It looks like the system and firefox do not get along very well....

timwolla,
@timwolla@phpc.social avatar

@heiglandreas Microsoft / Outlook is notoriously bad with regard to the blocklisting and unblocking.

I had good success with Hetzner's tutorial: https://docs.hetzner.com/de/robot/dedicated-server/troubleshooting/microsoft-blacklist/.

timwolla,
@timwolla@phpc.social avatar

@heiglandreas Local IP address as in your home IP address? That's likely on quite a few policy blocklists, unless you have a business contract (and possibly even then).

Crell, to php
@Crell@phpc.social avatar

Let's be controversial: In modern , you should never type-hint an array.

https://peakd.com/php/@crell/php-never-type-hint-on-arrays

timwolla,
@timwolla@phpc.social avatar

@Crell You also shouldn't call it “hint”, no matter if it's an array or something else 😜 (unless you're dealing with PHPDoc, i.e. lies).

Girgias, to php
@Girgias@phpc.social avatar

So trying out my custom domain to send emails to the #PHP internals list and it falls in the spam folder in GMail, which is confusing :|

Anyway, new RFC: https://wiki.php.net/rfc/http-last-response-headers

timwolla,
@timwolla@phpc.social avatar

@Girgias You've configured a DMARC record with a quarantine policy. The list breaks any DKIM signatures (due to the Subject and Body modification) and without listing the ML server in a SPF record the emails won't be authenticated and thus quarantined according to the stated preferences.

I believe that the ML performs DMARC mangling for p=reject, alternatively use p=none as your DMARC policy.

timwolla,
@timwolla@phpc.social avatar

@Girgias @saki Yes. The list should stop modifying the email contents and then the original DKIM signature would remain valid. Alternatively it would need to perform DMARC mangling for p=quarantine, but that's the worse solution.

timwolla,
@timwolla@phpc.social avatar

@saki @Girgias That's what the list-id header that the list adds is for. It's a much more reliable solution for automatically filtering the emails.

timwolla,
@timwolla@phpc.social avatar

@heiglandreas @Girgias @saki Yeah qmail and ezmlm is not exactly what I would consider “modern” 😀

timwolla,
@timwolla@phpc.social avatar

@heiglandreas (dropping the cc list) Huh, since when is the list DKIM signing the mails? And why is there no matching DNS record for the signing key:

dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=php.net header.i=@php.net header.b="eSVy3AwZ";

timwolla,
@timwolla@phpc.social avatar

@heiglandreas It's adding the footer and mangles the Subject for all emails. For senders with a p=reject policy it will perform DMARC mangling (meaning it will replace the From header by internals@lists.php.net with a name of "Foo Bar via internals").

timwolla,
@timwolla@phpc.social avatar

@heiglandreas For non-DMARC p=reject domains the From header will be the original one. That's why Gina's email was marked as spam, as DMARC mangling was not performed for it (due to p=quarantine).

nyamsprod, to php French
@nyamsprod@phpc.social avatar

I wish #PHP had two things and none of them involve generics... I wish it had type aliases and a native base32 encoding/decoding mechanism (in a class or a pair of functions I do not care)

timwolla,
@timwolla@phpc.social avatar

@nyamsprod Agreed with regard to base32. Though my use cases so far have all been security-sensitive (TOTP secrets), thus needing to use https://github.com/paragonie/constant_time_encoding anyway.

  • 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