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
Phar only package / shim #5998
Comments
Hi and thanks for proposing this, Is this different than the current https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.1.0/doc/installation.rst#locally
|
Yes, it's different because version (and installation) of phar is then managed by composer. As far as I can tell it is just a separate repository with the phar file published. For example, phpstan's development is made in https://github.com/phpstan/phpstan-src but installation is made from https://github.com/phpstan/phpstan where only the phar is published. Same things with psalm, development is made in https://github.com/vimeo/psalm but there is separate phar only repo: https://github.com/psalm/phar |
I've created a repository to show what I mean. You can test it out by running |
To be honest it's on my TODO list, sth like |
I'm not sure if we should make main composer repo to be the shim (=phar) , as some folks are downloading the tool for custom fixers purpose. we also have a mess of |
I understand, on the other hand having a new org would be a chance to clear up the stale issues and PRs :) If you need any help with it please let me know. |
take a look at generator branch of our website: https://github.com/php-cs-fixer/php-cs-fixer.github.io i can imagine sth similar for shim - generator branch triggers job daily and create new shim tags for any new (and >=3.0) tags of main repo. would you be willing to propose such automation? if so, I can create a dummy repo in our namespace, where you can raise the PR proposal ;) |
OK, I will take a look at how to create a Github Action that runs daily, runs self-update on the phar and if the updated phar is newer tags a commit. I can play with it in my own brunch until I make it work, once I am done you can create a dummy repo. |
@gjuric Have you made any progress on this? I would be willing to lend a hand if needed. Having a We have been using irstea/php-cs-fixer-shim up until now, but sadly, it doesn't appear to be maintained anymore. |
If you have the time to take a go at it go ahead, I am in the process of moving offices so my time is limited at the moment. |
You can see my PoC in https://github.com/gjuric/PHP-CS-Fixer-phar/blob/6c43975202a3c4751fce417a1db564f648cf03b7/build.sh but I am having issues making Github run this action on schedule. |
@keradus I've managed to make it work, although there are couple of issues:
You can see an example of a successful build and an "empty" build. How would you like to proceed? |
I love you picked it up!
I believe we need to find how we want to handle it. Maybe .gitattributes to not expose the generation part to shim releases? also, pls link the docs for that limitation, I would love to get familiar.
let's make it for v3.0.0 + only indeed
if you read source data from friendsofphp/php-cs-fixer, you can actually read composer.json data and apply to php-cs-fixer/shim composer.json.
Also, shortly took a look at your proposal. We have a tendency to release multiple versions same hour, eg we did it with just 2 new versions of 3.2.0 and 3.2.1.
Please, raise a PR at https://github.com/PHP-CS-Fixer/shim and let's continue the discussion on PR level. |
@gjuric , would you like to continue on this topic ? |
hey folks, would you like to try out https://github.com/PHP-CS-Fixer/shim and share your experience with it? |
Looks good. Thanks @keradus |
I've been using it for a while and it works great, there is only one small issue. It would be nice if the file was called If you want to keep the |
I've been running the shim release for almost a year now and it works great, so I will close this issue and open a new one regarding my last comment. |
Feature request
It would be nice to have a phar only composer package, the same way phpstan/phpstan is installed (previously phpstan/phpstan-shim) or psalm (via psalm/phar). That would skip the need to have a separate composer file in
tools/php-cs-fixer
as advised in the installation instructions.The text was updated successfully, but these errors were encountered: