Hacker News new | past | comments | ask | show | jobs | submit login

> Composer, the package distribution system

a package distribution system.

Composer suffers some of the same issues NPM does, IMO: it encourages stuff like 'install dependencies at deployment' and "why write it when you can blindly trust someone else's code".

Not everyone who uses PHP uses Composer.




The vast majority of people using a package manager in the PHP ecosystem are using composer. It makes sense to call it "the" package manager.


I’d argue that the only “the” is one that’s distributed with it, which is PEAR. I’m not saying PEAR is used more or that it’s better, just that it’s the only one close to “default” with the language distributions.


PEAR hasn't been distributed with PHP in well over a decade, and the last commit to the PEAR "modernization" project was in 2011.

PEAR is an abandoned tool used by no one. Arguing for it to be considered "the" package manager is a really weird fight to pick.


I don't like that PEAR by default needs administrator privileges and installs packages into system directories. That's inconvenient because you might have many PHP applications, and each needs different versions of dependencies. What did PEAR developers think? That I will be working on a single app for whole life?

Installing libraries globally is inconvenient for developers. Sadly, most Linux package managers have same problem and do not allow you to install several versions of PHP or Node.


PEAR installation will be disabled by default in PHP 7.4, see https://externals.io/message/103977. It was a good tool, once, but the community has moved on.


pear/pecl are more for installing extensions TO php in my experience, where composer is for installing packages built IN php, so composer is more the defacto community package manager, pear/pecl are useful though when you need to install gmp, gdi, intl, etc on your local dev environment. I don't know anyone who uses pear to install carbon or guzzle, or any other php package though.


I literally know no one who uses PEAR.


I do. I was using it back in 2003... pear/DB. I still have some code from that era that uses it.


Would you use a pear dependency in a new project if you weren't pulling bits in from an older one?

Personally, I wouldn't... I worked with pear and pecl and composer is just far more pleasant to interact with.


I agree... No, I would not. That code is old enough to drive at this point...


actively maintained pear packages can be installed also with composer


Which is literally irrelevant to my point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: