Let's take this situation, I have my own library MyLib that is expected to support PHP 7.4 and 8+ in the same time.
Meanwhile the coollib package I depend on releases its v2 where it changes interface of the same function to incompatible one:
Client #2 already migrated PHP 8.1 and wants to install coollib 2.0 while
Client #1 is using PHP 7.4 and can't move to coollib 2.0
As MyLib author I can either drop Client #1 and make a major release not because I introduced some breaking changes but because I bumped dep
Now imagine what happens if coollib has also dependencies... Getting out of confict is pain.
I don't understand why
doStuff(mixed $val)
and
doStuff($val)
are conflicting with each other as they are basically the same function! But they are different for PHP engine.
So here are two problems:
🎃 All PHP classes and functions are loaded globally.
🎃 New PHP types are not backwards compatible.
If either of this won't be a thing we would not get into dependency hell.
Problem #1 was solved in In #NodeJS.
If you require a module it will stay only in the current context and won't affect the whole application.
So in NodeJS context different versions of the same library with different method signatures can live together.
Problem #2 could be solved on engine level but probably it was not predicted from the start. You can never know how ecosystem reacts to new features.
Library embraced more and more type changes breaking compatibility in interfaces in every year
Banning types could be an option
So here we are!
While PHP still keeps ugly array_* str* functions from 90s, it breaks compatibility in the ecosystem with every new release.
So it's neither a modern language nor a stable one.
(sorry, #PHP,. you know I love you but I must have said this)
While you can think that everyone can do upgrades every year, it can be automated via @rectorphp and so on...
Well, you can't run Rector on all your dependencies and bump new versions without maintainer permission.
So you get stuck with PHP version of a dependency you don't own
@rectorphp That's how some big project are still on PHP 7.2..7.4 and can't get to PHP 8.1.
Upgrading has its cost.
While making a mid-sized framework-based project can be fine to upgrade, large enterprise codebases with custom core and dozen of dependencies are painfully hard to upgrade
So let's get back to me, a library author who has a library that just works.
Client #2 (mid-size) upgraded their app and wants me to upgrade my code as well
Client #1 (enterprise size) could not get an upgrade yet and wants to use MyLib
Should I drop enterprise client?
And as an author of general purpose library I will need to maintain a library with versions for all currently used PHPs. You see, that's sucks!
Otherwise:
I say: my lib is PHP 8.1 compatible!
Client says: ok, we are not going to use your lib, as we won't upgrade just to use it
I really appreciate all the work of all developers from @laravelphp and @symfony ecosystems as you make PHP modern and cool.
But I the dependency hell problem won't allow PHP projects to grow big yet keep up with all upgrades unless split into microservices.
/THREAD
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Ok, let's try something different. Useful technical/business thread for #web#makers from me.
🔌 How to build @atlassian Jira App (in #React) and business around it and why you should actually think of it!
Thread: 🧵
@Atlassian 2/12 We started @testomatio (test management system for #qa) as a classical #SaaS app but at some point, we built a Jira plugin as a complimentary interface.
The feedback from clients surprised us. Some clients preferred to use @testomatio only via Jira plugin
Why? 👇
3/12 Jira is still the source of truth for many companies in the world. And if you want to win small & big you should adjust to business needs. And business works primarily on Jira.
One unobvious conclusion:
Business doesn't want to have another app or even leave Jira
To promote this I will tell you how we rided 3 cars to East. I started my driving lessons only year ago, with no car experience in past. Last week I drove 130-150 km/h on a dirty road following the heading car.
🛞 you never get stopped exceeding the speed limit (as there are none)
🛞 you never show your documents on outputs control (you are with the right guys)
🛞 you can travel by closed roads and bridges
The only what could stop us is concrete fence. It doesn't know that you have a brave volunteering mission.
So when I saw a very sudden turn, and I could not get into it I lowered speed from 130km/h to nearly stop at the fance and driven reverse to get into the turn. Extreme!
Наебаги: баги, которые ты ищешь весь день, а оказывается, что их на самом деле нет - просто кто-то не отключил впн, не в ту вкладку посмотрел, не тот проект открыл, был пьяным всё сломалось, помогите, кря.
Заебаги: они постоянно приходят тебе в уведомлениях от sentry, но тебя они уже настолько заебажили, что ты даже не обращаешь на них внимания. А ЗРЯ!
Нагибаги: ложат стейджинг, продакшн, все тесты, а также все твои планы и личную жизнь. Не позволяй нагибагам заходить слишком глубоко!
It may seem simple as you may have some data in tables (hello, MySQL) and you want them on a web page (hi, <table>). But you start joining data from other tables and you end up displaying a tree in a table. How? You never know how to do it until you try to use that. UX!
(2/6)
But if you have tree-data, tree-database (hello, Mongo), and tree components on website, you still need tables to present the data of similar structure. It's all 2D and are brains are trained to get information presented as combination of 2 axes. Hello, tables!