doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.68k stars 389 forks source link

Phar release #1189

Open bdsl opened 3 years ago

bdsl commented 3 years ago

Feature Request

Q A
New Feature yes
BC Break no

Summary

It would be great to be able to download and run this as a standalone phar file. I see references to a phar file in old documentation, but it doesn't seem to be currently available - there's no phar linked from https://github.com/doctrine/migrations/releases/tag/2.3.4 for instance.

I installed the tool today in a PHP app, and because the app uses some very old Symfony component versions composer forced me to use a very old version of doctrine/migrations. I think it would make sense to avoid that issue by installing it as a phar (maybe through phive or just by downloading from here) instead.

I don't think the migrations tool will always need to be integrated into the app that uses the database.

greg0ire commented 3 years ago

Looks like it was the case in the past! https://github.com/doctrine/migrations/releases/tag/v2.1.0 and all prior releases have it

@goetas @jwage , do you know how it used to work ?

bdsl commented 3 years ago

@greg0ire - thanks. I've just added doctrine migrations 1 to a project with composer, might replace it with 2.1.0 via the phar download. Happy to help if I can with getting the phar automatically built and published for future releases.

greg0ire commented 3 years ago

Good to know! Maybe the old process was manual? I think we could automate it by building something similar to https://github.com/marketplace/actions/box-packager-for-phar or reusing it.

bdsl commented 3 years ago

Actually the ideal option for me would be a release in phar format but distributed via composer - in the manner of psalm/phar. This would give the loose coupling benefit of phar without requiring projects that already use composer to add a second way of obtaining dependancies.

greg0ire commented 3 years ago

So… we would have an extra repository just for the phar, right? That sound much more involving…

bdsl commented 3 years ago

@greg0ire Yep. You can see how Psalm does it at https://github.com/vimeo/psalm/blob/master/.github/workflows/build-phar.yml , https://github.com/vimeo/psalm/blob/master/bin/build-phar.sh and https://github.com/vimeo/psalm/blob/master/bin/github-deploy-phar.sh