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

Reproducible installation method with PHAR files? #3815

Closed
chrissound opened this issue May 2, 2023 · 2 comments
Closed

Reproducible installation method with PHAR files? #3815

chrissound opened this issue May 2, 2023 · 2 comments

Comments

@chrissound
Copy link

Describe the bug

Not really a bug... Installation methods do not provide a reproducible installation. I am also not sure how to build the PHAR files - which would also be a possible solution.

Basically about this:

# Or download using wget
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar

These files would likely point to the latest version which could potentially breaking something in future.

I've tried to clone down the repo and run the bin/phpcs file however that requires the whole project present:

~/.local/docker-cicd-build-env/bin/phpcs
PHP Warning:  include_once(PHP/CodeSniffer/autoload.php): failed to open stream: No such file or directory in /root/.local/docker-cicd-build-env/bin/phpcs on line 14

Is there a way I can download or build a PHAR with a specific version?

@jrfnl
Copy link
Contributor

jrfnl commented May 2, 2023

Installation methods do not provide a reproducible installation.

Well, that depends on which installation method you use, but the most common method of installation - via Composer - will allow you to "lock" to a specific version, so that should probably be your first choice.

Having said that....

Does that answer your question ?

@chrissound
Copy link
Author

Thank you, that works great!

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

2 participants