ramsey, If you voted against the Interface Default Methods RFC for #PHP, please take a moment to read some of the most recent mailing list replies, starting with @Crell’s here: https://externals.io/message/120725#120798
I agree this feature goes against a lot of what I’ve learned as “best practices,” but I did a lot of introspection on this and decided that this feature is good for the future of the PHP language. It unlocks a lot of potential.
ramsey, Let’s get all controversial up in this #PHP
joepferguson, @ramsey PHP Needs a code of conduct
MelvilleSpence,
Crell, (edited ) I'm noodling with a data storage layer library in #PHP. #Postgresql specific. There's 2 options:
- Auto-generate SQL tables/views/queries off of PHP data types (with attributes)
- Auto-generate PHP classes off of SQL tables/views/queries.
Which would you prefer? The goal is fully typed interaction in PHP space, but I'm not sure which side should be canonical.
Which would you rather work with, and why? Assuming a "good" DX in either case.
Answer why in replies, boost for reach, etc.
awoodsnet, @Crell what I like about the dumb data holder approach, is that that the details are abstracted away. It’s easy to change the data layer.
i get your point though , and see the value in ti. There is a lot of power in databases. We could do more to take advantage of their capabilities. I think some people worry about getting to dependent on a particular database, so they avoid the DB-specific features.
Crell, @awoodsnet Yeah, and DB portability has always been a lame reason. I say that as the person who wrote Drupal's DBAL, which was multi-db.
A project almost never changed its DB. But a product may want to slot in to different companies' standard tooling. That's why it exists, it for frameworks.
Of course, that forces a lowest common denominator approach, which is mysql 3.
Talix_Dreamer, French 🇬🇧 I have tried PHP. I find this programming language more embedding in html. They completely get so much. I can code in live html. 🤯
Hence my question, why continue to code in JavaScript if php can do the same things?🔴😅⚠️
🇨🇵 J'ai essayé PHP. Je trouve ce langage de programmation plus incorporant dans le html. Ils se complètement tellement. Je peux coder dans le html en direct. 🤯
D'où ma question, pourquoi continuer à coder en JavaScript si php peut faire les même choses ?🔴😅⚠️
tshirtman, French @Talix_Dreamer @Aedius ah, et c'est pour plus tard, mais tu voudra probablement ajouter SQL à cette liste, pour pouvoir stocker des données pour ton application. Mais bon, ton application actuelle n'en a pas besoin, alors je dirais de juste le noter pour plus tard, et de pas trop te laisser distraire :).
Talix_Dreamer, French
ramsey, (edited ) Today, I was cut in layoffs. I’m so gutted because I loved this company, & my team was the best; I’ll miss my team most.
Now, as I look ahead, I’m searching for a staff/principal role where I can help other developers level-up through mentoring, tooling/infra, architecture, & improving DX. I’d love to work with a company contributing to open source & even to the #PHP programming language itself.
Update (27 Feb 2024): Thanks, everyone! I’ve accepted an offer. Please see update in thread below.
maccath, @ramsey you are one of the greatest engineers I've ever had the pleasure to work with and I too will miss our team the most. Together, you, I and the rest of platform were the GOAT.
If anyone is able to hire both myself and Ben we absolutely promise to you that we will bring your team to unfathomable heights. 🙇♀️
ramsey, I know others are not so fortunate, and many have been out of work far longer than I was. I cannot imagine how I would have kept it together much longer.
Give everyone a healthy measure of grace. It’s rough out there.
If I can be of help to anyone (e.g., networking/contacts, advice for resumes/interviews/job offers, referrals, etc.), feel free to ask. I will try to help where I can. (2/2)
dantleech,
dantleech, ported the chart widget today, tomorrow I'll tackle the list/table widget...
dantleech, I've tagged a 0.0.2 of #php TUI - lots of bug fixes, linear gradient and the gauge, image, and barchart widgets, DX improvements for styling, inline and fixed viewports and more and a slightly pimped up README:
syntaxseed, Hey... #coding question...
Say you have a function that has to return 1 of 3 states. Yes, no or N/A.
What's the recommended way to do this?
-Return an int flag?
-True/false/null?
-Return a value object?
syntaxseed, Related:
Say you have a method that generates a true/false result for success/fail along with a string message of various statuses describing what was done or not done... how do you return these?
Create a general-purpose Result value object that contains the success/fail & related message?
Return json or an array?
Return the bool but store the $lastMessage as a property of the method's class object?
Other?
🤔
syntaxseed, @livingcoder Hmm... I never work with enums but it might be time to start!
Crell, (edited ) Hey #PHP devs. I'm curious. When using a global class like SplFileInfo, Exception, Attribute, etc, do you say
\Exception
inline in the code, or do youuse
it at the top of the file and then use it asException
inline?
derickr, use Exception as e;
use InvalidArgumentException as iae;
heiglandreas, German
grmpyprogrammer, To the #php folks lurking out here — hit me up with your questions and struggles with getting some kind of automated testing working
sephster, (edited ) @cabbey @grmpyprogrammer @kboyd I maintain the oauth2 server for the league. I will speak to someone about this to see if Phil needs a hand. Cheers
grmpyprogrammer, @krinkle @phpandcigars Thanks for your comments — a lot of what you talk about is in my books ;)
codito, Polish
derickr, @ramsey @lewiscowles1986 now I've that ffing song in my head. THANKS BEN.
ramsey, @derickr @lewiscowles1986 You’re welcome! 😍
ramsey, Most folks don’t seem to realize how gravely under-resourced and under-funded the #PHP project is.
For a technology that powers 77% of the web and has very little corporate backing, it's a wonder the project makes any headway at all.
At times, it almost feels like the industry is doing this on purpose to choke out the language.
ViejoViajero, @ramsey Maybe many people do not know about https://opencollective.com/phpfoundation - might be because it is not linked on php.net?
derickr, @ramsey @Crell Don't take this the wrong way, but I'm fairly happy it's mostly EU based administrated. Or at least that's a feeling, with so many other foundations being (mostly) weighted towards the US.
The PHP CC people had also been planning a similar organisation for the best part of a decade. But sometimes it just falls into place due to external factors, such as Nikita leaving Jetbrains.
fredbrooker, Czech if you want to learn PHP, the best way to do is 1) install phpstan and phpcs 2) analyze your code and bump the level up to 9
Raccoon, @fredbrooker @janantos
In all seriousness, suddenly wondering if anyone has made a web browser in Doom, and thinking about how the ability to navigate an HTML interface might actually make for some really cool moments in a GZDoom game. Like, I'd like to play some sort of cyberpunk game where you sit down and have to use websites for something...
fredbrooker,
Crell, And of course, this site features a half dozen languages and their package system... But forgets about #PHP.
Even if you don't use PHP yourself, ignoring one of the largest and best designed package systems (#Composer/#Packagist) is just dumb.
Crell, @mwop My strongest argument about PHP being a good language is how popular and successful it is, despite the long, detailed list of organizational own-goals that PHP manages to pull off. Internals mainly, but user space a bit as well.
mwop, @Crell I do market research yearly, and there's this really weird dichotomy of "PHP is everywhere, powers the vast majority of the web, and has a disproportionate number of developers worldwide" and "PHP is an antiquated language that nobody uses for new projects, nobody teaches, and there aren't enough developers". The truth is likely somewhere in the middle, but it's hugely flabbergasting.
1/x
jaapio, Dutch Scary thought... Did you know that a large number of #php infrastructure projects are maintained by 1 single person, some 2 or 3... But the original maintainer has been doing that for more than 20 years+ what would happen if they step down?!
They will retire at some point... Who will take over? Shouldn't we invest in the future and start education on how to maintain a opensource project with millions of users?
ramsey, @jaapio Awesome! Keep me posted!
jaapio, @ramsey just had my meeting, we discussed that most important is that we should make people aware about the pain. So let's start being loud about this. And start talking to people..
Not just here, but also at conferences, meetups and wherever people want to hear us.
SuitedUpDev, (edited ) For any #PHP #developer in the room, please don't do this...
As an outsider is reading this, I have NO clue if the "handleUpdate", "handleCreate" or "handleDelete" methods are actually being used.
Edit: grammar do be hard yo.
Aedius, That's "useful" to transform entities to model, handle some multi heritance before the traits or to call a private method for a similar object in a dependency.
Bonus point when error are not handled
eurosat7, German @SuitedUpDev at least a method_exists() ... But this was rushed code for sure. Maybe even some fire and forget mentally of a freelancer on fixed budget. Trying to be smart and cutting some corners...
But that always will cost more in the end.
Crell, Looking for #PHP feedback.
I have a lib build for PHP 7 that has 3 methods:
addFoo($id, $priority)
addFooBefore($id, $before)
addFooAfter($id, $after)($before/$after refer to some other $id.)
For PHP 8, I am strongly considering just assuming named args and changing it to:
addFoo($id, $priority, $before, $after);
Specify only one of priority/before/after, by name. Multiple is an error.
Is this a good idea/bad idea, and why?
Crell, @gmazzap Ilija and I want to work on it and have a decent amount of design already done for it. No promise on timeline, but the rfc text for it and for pattern matching (which will be required) are already written. (The former needs some updates, of course.)
gmazzap, @Crell that would great. Thanks!
ramsey, When you receive my replies to the #PHP internals mailing list, do they look empty to you? I just noticed that my messages on both news.php.net and externals.io appear empty.
outofcontrol, @ramsey @heiglandreas Using mailmate on macos, which is plaintext markdown only. Would love to have that on iOS as well. But no.
ramsey, @outofcontrol @heiglandreas I want to keep using Apple Mail. It’s my preferred client. :-)
ocramius, Looked again at a #PHP codebase written/maintained in PHP 5.5, where new code is designed and added on the existing app.
Made me realize that the only thing I miss from newer PHP versions is strict type checks, which came with PHP 7.0.
Everything else was provided by @psalm or @phpstan
From my PoV (person that reads internals, follows/votes on RFCs, etc.), there are almost zero feature additions that make newer PHP versions interesting.
Not justifying staying back: just noticed this.
saramg,
ocramius, @saramg more like: "upgrading is hard because nobody writes automated software verification (tests)"
ramsey, A friend was telling me about guidelines for developing and deploying new services in their company, and one of the guidelines is “new services must not use #PHP.”
I’m not making this up, and this isn’t hyperbole. They actually have this listed on their company documentation.
zimzat, @ramsey Yeah 😞 Companies do one thing, very poorly, in a language early on and then decide to throw out the entire stack instead of addressing the elephant in the room.
It's like the only way they can justify putting effort into something is if they can make the case it's not worth the effort necessary to fix it incrementally.
danjones000, This is why I decided to learn go last year. Not because I enjoy learning new programming languages (I do, it's just not the reason), but because I can make more with a year or two of go than nearly twenty years of PHP.
alexanderschnitzler, German Hier haben doch letzte ein paar #TYPO3 Leute über verschiedene Localization-Tools gesprochen, innerhalb und außerhalb der IDE. Wer war das und was waren die Tools?
alexanderschnitzler, German @koehnlein @ErHaWeb 🙈🙈🙈
Nun, mit etwas Zeit und einem klaren Kopf muss ich zustimmen. Und ich denke was mich gestern verarscht hat ist ein ViewHelper hier im Projekt, der die Übersetzungen nicht escaped, anders als f:translate. So war ich der festen Überzeugung, dass es mein CDATA war, was zu interpretierbaren HTML-Tags führte, ist aber nicht der Fall.
Mea culpa!
koehnlein, German @alexanderschnitzler @ErHaWeb You’re natürlich ebenfalls welcome. 😄
SenseException, German #PHP talks 10 years ago: "Use value objects instead of arrays."
PHP talks nowadays: "Use value objects instead of arrays."
klabauterjan, @SenseException Everyone around me: still uses arrays instead of value objects 🥲
Crell, German @SenseException I blame popular libraries and frameworks that are still array-based. (#Laravel and AWS-SDK at the top of that list. #Drupal, less than it used to be but still.) And people who cut their teeth on CodeIgnighter et al and never grew past that.
One of the many reasons I detest Laravel.
phpc, Reply to this thread with the #PHP folks to follow on the Fediverse! #FollowFriday
heiglandreas,
Skoop, (edited ) @heiglandreas @phpc I would add to that list: @afilina , @OndrejMirtes , @rskuipers , @ieatkillerbees , @ramsey , @lornajane . And so many more. Hard to list them all
packagist, 👋 We're hiring a Senior Software Engineer in Berlin or remote! 💻 Build high-quality supply chain tools for thousands of devs in the PHP ecosystem 🐘 with the makers of Composer.
We're a small experienced remote team, deeply caring about our customers and the quality of our product. 🧑🤝🧑 Help us maintain and improve key infrastructure for hundreds of businesses! 🎉
https://packagist.com/about/careers/senior-software-engineer-1
naderman, @MarkBaker @Skoop @packagist We already have someone working with us in the UK, and had someone in the Netherlands, I imagine in principle there'd be a way to still make this work via e.g. an EOR company in the respective location, so that shouldn't stop you!
derickr, @MarkBaker @Skoop I've no excuse to own one, or wear one. :-(
ChristosArgyrop, I think I am 50% done finding a quadrafecta : a simultaneous hit piece against #Perl #clang #fortran & #rstats.
This one only manages to trash talk #perl and #rstats, so it has some ways to go.
https://stefanoborini.com/why-r-is-the-new-perl/
PS 1Gotta admit that the point about the object systems in R is somewhat spot on
PS 2 #php gets a dishonorable mention
PS3 I will continue to find ways to continue using all 4 of the aforementioned languages, as they are all performant and deliver in complementary ways.
BobOHara, @ChristosArgyrop trash talking PERL is easy - even Larry Wall did it
ChristosArgyrop, @Edwardsmoon @mjgardner @BobOHara @bduncan sed and awk are now being taught as a cool skill for bioinformatics, which is kind of nuts because in the 90s #perl was the cool kid.
rubenaarts, Yesterday @jrf_nl gives a great talk about PHP_CodeSniffer ( @phpcs ) at #010php
She told us the importance of funding opensource projects and there is is not enough spoken about this. It was a critical warning that there are just a few people in the community where the hole #PHP community is depending on.
So lets talk more about how to support these great opensource projects.
itsjoshbruce, @jaapio @ProvenPudding: Got it. Cheers!
ProvenPudding, @itsjoshbruce @jaapio Meeting rescheduled as agreed. CU!