phpstan / extension-installer

Composer plugin for automatic installation of PHPStan extensions.
MIT License
399 stars 27 forks source link

Evaluate drupol/composer-packages - A Composer helper classes for finding installed packages/types/installation directories #12

Closed drupol closed 5 years ago

drupol commented 5 years ago

Hi,

Recently I published a package that will help you find all the installed packages in your projects.

The README file has examples on how to use it and more explanations on how it works.

The use case of this library is that I was looking for a way to retrieve all the installed packages directories. At first I was using symfony/finder, but it was heavy and very slow. Then, I had the idea to "cache" those data through a Composer plugin, this is how I had the idea of this package.

On top of adding functionalities to get the package directories, I did the same kind of stuff for the package types and for the packages themselves.

In this particular use case, you can use it to directly get packages of type 'phpstan-extension' just by using:

Types::phpstanExtension(); or Types::get('phpstan-extension');

Feel free to test it, if you are going to use it in your project and let me know how it goes, feedback is appreciated.

Examples of class that this package will generate:

Thanks!

ondrejmirtes commented 5 years ago

Hi, how is this related to this package? I’m sorry, but you should never do this. Write a blogpost, ask for feedback on Twitter and Reddit. That’s how I’ve been doing it for years.

drupol commented 5 years ago

Hi Ondrej,

Could you explain why this is not advised ? You're doing the same in this package, I just improved it so it can work for anyone.

FYI, the idea comes from this package https://github.com/Ocramius/PackageVersions

ondrejmirtes commented 5 years ago

You open an issue if you have a problem or an idea for improvement with this specific package. Not if you want advice or feedback with your unrelated work. If there’s something I didn’t see, please clarify as I don’t see any actionable info for myself.

drupol commented 5 years ago

Thanks, very helpful.

drupol commented 4 years ago

Hi,

For the record, we had a chat during the EU Fossa hackathon and I got the explanation.

Basically the idea is to lower the dependencies to the maximum for PHPStan and it's side packages.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.