Klabauterjan

4 Followers
46 Following
66 Posts
PHP Dev, Project Manager & Boardgame Enjoyer
HelloWorld

RE: https://gruene.social/@Gerbsen/116052492129846084

Money transfer from the German Federal Administration to Microsoft:

2023: 274.091.361,75 Euro
2024: 347.665.579,71 Euro
2025: 481.369.660,77 Euro

(Source: German Parliament 21/4006 page 96 https://dserver.bundestag.de/btd/21/040/2104006.pdf )

Daniel asks what #FreeSoftware #OpenSource could have been procured and developed with such sums and how you feel about when you see those numbers. He also fears this trend will continue.

I had a great time at my first #SymfonyCon in #Amsterdam celebrating 20 years of #Symfony!

And thank you so much @packagist for the ticket. Without you I would not have been able to afford the visit!

@packagist, tough decision but it's probably the `#[\NoDiscard]` attribute

2025: oh no, we deskilled our factory labor force and now we can't produce anything in our own country!

also 2025: here's a great idea: nobody needs to learn how to program for real because we now have these great AI systems! why waste years in computer science degrees?

2045: oh no...

@OndrejMirtes 2/2
Running PHPStan on the Google Analytics plugin results in "class not found errors" in a CI run. Therefore we added the error to the baseline.
On a developers machine the cookie plugin may be installed and thus no error is produced.
If the developer regenerates the baseline on his machine, the ignore entry is removed from baseline and causes CI to fail again.

Is there any workaround for such a case?
We can't require the cookie plugin in the Google Analytics "composer.json".

@OndrejMirtes we're facing a similar, yet different "problem": We're running PHPStan on plugins for a CMS.
A quick example:
The cookie plugin displays a cookie banner and thus provides a Cookie class.
The Google Analytics plugin extends the cookie class to register its cookies.
As the Google Analytics plugin can be used without the cookie banner plugin, it does not require it in it's composer.json
1/2

Had a great day with very interesting talks at my 2nd @FrOSCon / #FrOSCon

Looking forward to more awesome topics tomorrow.

The only thing I'm missing this year is the #PHP sub-conference

@codemonkeymike, you should probably also check if the response code is 2xx instead of 404. The server could return code 403 or 500 for example. The image is inaccessible then but your function would return that everything is fine.

@codemonkeymike, you could try these options to just send a HEAD request:

```
curl_setopt( $c, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $c, CURLOPT_CUSTOMREQUEST, 'HEAD' );
curl_setopt( $c, CURLOPT_HEADER, 1 );
curl_setopt( $c, CURLOPT_NOBODY, true );
```

Taken from https://schlitt.info/blog/0606_sending_head_requests_with_extcurl.html
You can find more information on the options there

Sending HEAD requests with ext/curl | Tobias Schlitt

ext/curl is the common tool of choice, if one needs to perform more advanced HTTP requests from a PHP script (for simple ones, use a stream!). I recently wanted to perform a HEAD request to a file, after which I wanted to perform some more advanced HTTP interaction, so CURL was also the tool of choice here.

@jackhusky, mit Konstanten und statischen Eigenschaften funktioniert es: https://3v4l.org/NRJvj
NRJvj - created on 3v4l.org

View the output of this script on 3v4l.org: the online PHP shell with 250+ PHP versions