6 ms·
I stopped using PHP. The language itself is fine, but PHP doesn't include a package manager. People will shout "but composer!", That is not PHP. That is a third
by svnpenn 5y ago
I stopped using PHP. The language itself is fine, but PHP doesn't include a package manager. People will shout "but composer!", That is not PHP. That is a third party tool. What Rust understands, what Go understands, what Ruby understands, is how important the package manager is to the language.
No one is an island, and "batteries included" only gets you so far. In my mind, PHP is in line with C, with the mindset of "figure it out yourself" in regards to packaging. That's not acceptable.
- gmfawcett 5y agoNitpick, but Go the language doesn't have package management. The 'go' tool -- an implementation detail of the most popular implementation -- has features for fetching packages, etc., but the language spec does not require these features or constrain how they work.
- voidfunc 5y agoHow is it any different than Python (pip) and Java (maven, gradle)?
- svnpenn 5y ago> Java (maven, gradle)? Its not, I dont use Java either, same reason. > Python (pip) Python comes with Pip, at least the one I use anyway: https://nuget.org/packages/python https://nuget.org/packages/python
- voidfunc 5y agoYou are logically inconsistent then with regards to Python. Your distro might bundle it out of convenience but its not a first party component.
- svnpenn 5y agoOK, does PHP do that?
- ByteJockey 5y agoDoes PHP control nuget packages? No. No they do not. Neither does Python (the python package you linked to is managed by a Microsoft employee).
- mmcnl 5y agoSeems petty to me. Who cares if it's not first party? It's widely used and is the defacto standard package manager. Is that not enough?
- francislavoie 5y agoEveryone has standardized on Composer. It's a better package manager than NPM, doesn't have many of the security problems that plague NPM. The PHP internals maintainers don't have the time to maintain a tool like Composer alongside the rest of the language. And if it was bundled with PHP, it would be stuck in lock-step with PHP version releases, which means improvement can only be made once a year, basically. That's not acceptable. Composer wouldn't be what it is if it had to release so slowly.
- svnpenn 5y agoI dont care. Plenty of other languages manage it, so for those who dont, its just excuses.
- civilized 5y agoIt seems like you have an unexamined presumption that bundling a package manager with a language is a superior practice, and you "don't care" about any argument that might challenge that.
- jonwinstanley 5y agoThe PHP community gets on fine with Composer, no need to bundle it in the language IMO
- skissane 5y ago> And if it was bundled with PHP, it would be stuck in lock-step with PHP version releases, which means improvement can only be made once a year, basically. That's not acceptable. Composer wouldn't be what it is if it had to release so slowly. CPAN is bundled with Perl, but CPAN can update itself to a newer version (try `cpan CPAN`). Similarly, NPM is bundled with node.js, but NPM can upgrade itself to a newer version (on Linux/Unix/macOS by running `npm install -g npm@latest`; unfortunately doesn't work on Windows for whatever reason.) Why couldn't Composer use the same model? Composer supports updating itself (when installed as a PHAR) via "composer self-update". So bundle the PHAR with PHP, and then when you run it, can check for a newer version and print a warning if there is a newer version available, and in response to that warning you can run "composer self-update".
- n42 5y agowhat a strange hill to choose to die on. what would be different if composer came bundled with the PHP runtime?
- svnpenn 5y agoI wouldn't have to install it...
- yaseer 5y agoThis sounds like an objection based on a personal principle. I think if you tried explaining your design choices like that in a technical interview, or to a teammate, they may not be persuaded.
- PetahNZ 5y agoIf thats your only argument, FWIW Pear and Pecl typically were both bundled with PHP.
- deleted 5y ago[deleted]
- lillesvin 5y agoIs Ruby Gems a first party thing now? I remember, back in the day, being tangentially involved with creating a Ruby package manager before Gems had become the de facto standard.
- mekster 5y agoWhat a small reason to decide on what language to use. There are far bigger reasons to choose a language but it's your choice.
- mhitza 5y agoI think Pear was the equivalent of Python's pip way back. Haven't really looked back since composer dropped.