Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a PHAR build for composer #956

Open
1ed opened this issue Jan 7, 2020 · 6 comments
Open

Create a PHAR build for composer #956

1ed opened this issue Jan 7, 2020 · 6 comments

Comments

@1ed
Copy link

1ed commented Jan 7, 2020

Hello!

As the preferred installation is the phar version maybe a composer installable phar build would be beneficial. Other projects like phpstan https://github.com/phpstan/phpstan and psalm https://github.com/psalm/phar do that as well nowadays.

@maks-rafalko
Copy link
Member

From https://github.com/psalm/phar

This allows you to install Psalm without worrying about composer conflicts.

Can someone explain me why using a PHAR through composer is better than just using prefixed standalone PHAR or using Phive.

After reading the RFC of PHPStan I'm still miss the point.

Let's accumulate the pros and cons of this feature request.

@1ed in your particular case, what are the advantages of composer based prefixed PHAR? Can't you just use the existing PHAR distribution? Phive? Any inconveniences?

@theofidry
Copy link
Member

Can someone explain me why using a PHAR through composer is better than just using prefixed standalone PHAR or using Phive.

Personally: I find annoying to have to use yet another tool to manage my PHARs. I also don't remember if you can save PHARs on a project basis either

@sanmai
Copy link
Member

sanmai commented Jan 9, 2020

Pros:

  • Uses composer to install and manage a standard .phar without a need to install it independently, or use anything else to manage it. (PHIVE what?... Don't even need to learn it!)
  • No need to manage and install any of the Infection's dependencies. Phar it is. No conflicts, no problems.
  • Smooth and easy upgrades. Just run the usual composer update command, and there you have a new version.

Cons:

I think it is a great idea if done the way Psalm did it, as with another package.

@1ed
Copy link
Author

1ed commented Jan 9, 2020

As others said before, for me the main benefit is convince too. No need to install and maintain and learn just another tool and configuration file just to manage dependencies, which composer already does.

The con would be to more work on the maintainer side (but it can be automatic). I can understand that you do not want to support just another release medium. Another con that phars are not first class citizens in composer so no support on that side, but maybe it can change over time. As Ocramius said in the phpstan RFC fully scoped phars should work well. Infection is fully scoped, right?

@maks-rafalko
Copy link
Member

Infection is fully scoped, right?

Right

@martinssipenko
Copy link
Contributor

Maybe we can revive the conversation about this topic? @maks-rafalko what's your take on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants