-
Notifications
You must be signed in to change notification settings - Fork 39
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 phar build flow #31
base: master
Are you sure you want to change the base?
Conversation
714174a
to
aedc4d1
Compare
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we tag a prerelease tag instead of a stable one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to discuss how to handle those, I didn't find any pre-releases in this package.
Rethinking this, we need to release every time prophecy itself is released.
This would mean that we need to connect the projects more tightly. Of course this can be automated some in some way. But before we spend to much time on this I would like to know your opinion about is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the releasing of the phar needs to depend on releasing both prophecy and prophecy-phpunit, it should not be managed in the releases of the prophecy-phpunit repository itself, as that would mess things up. We should either have separate phars for each package or a separate repo managing the combined phar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, when you would release a bugfix for prophecy
people using prophecy-phpunit
would need to get that patch. Seen the amount of code in this repo I don't expect too many changes. With composer this problem doesn't exist, when shipping a phar this problem does exist since all dependencies are included. I don't think phpunit can load multiple phars for a single plugin. We could investigate that. It would mean that we would deliver a prophecy
phar which includes a manifest
file and a prophecy-phpunit
for the integration of the packages.
But maybe you are right, and a separate repo is better since it would have it's own releases.
Since this is kind of an edge case I don't want to take too much of your time. So maybe it is better to create a separate project first. And move it under the phpspec flag later if we are going to share maintenance.
That was also the mean reason for me to open an issue first before creating this PR.
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<phar xmlns="https://phar.io/xml/manifest/1.0"> | |||
<contains name="prophecy/prophecy-phpunit" version="1.0" type="extension"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardcoding the version as 1.0 here looks wrong to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version here should be equal to the version of the package. When we have a release strategy for the phar releases I can have a look at how to implement this properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, isn't this PR precisely about implementing that strategy ?
b3b946c
to
326da3a
Compare
@@ -0,0 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<phive xmlns="https://phar.io/phive"> | |||
<phar name="phpab" version="^1.26.0" installed="1.26.0" location="./tools/phpab" copy="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't tools
be added in .gitignore
?
Phar releases are needed to be able to use prophecy in projects that are dependencies of prophecy.
Phar releases are needed to be able to use prophecy in projects that are dependencies of prophecy.
As described in #30.
Because phpunit includes prophecy right now we cannot include prophecy in the phar right now. So we need to change that when phpunit 10 is released.
For now, the phar can be installed next to the phpunit.phar in
tools/phpunit.d
The configuration below shows how
The included github action automates the phar creation and adds it to the created release.