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

migration CI #1216

Open
jhdxr opened this issue Jan 2, 2021 · 16 comments
Open

migration CI #1216

jhdxr opened this issue Jan 2, 2021 · 16 comments
Assignees
Labels
CI Continuous integration Test Suite

Comments

@jhdxr
Copy link
Member

jhdxr commented Jan 2, 2021

travis-ci.org will be shutting down in several weeks, are we going to move to travis-ci.com as suggested on its website, or maybe other CI services, e.g. Github Actions?

@morozov
Copy link
Contributor

morozov commented Jan 25, 2021

Github Actions would make more sense IMO. All other open-source projects I'm involved in moved there.

@jhdxr
Copy link
Member Author

jhdxr commented Jan 25, 2021

Github Actions would make more sense IMO. All other open-source projects I'm involved in moved there.

Same here actually. The reason I proposed travis.com is it won't require us to update/rewrite the configuration file. I have to admit it's not a pleasant task to make the CI can work from 5.3 to the latest. Maybe time to ask the same question again, should we bump the min version requirement? Even Composer is dropping old versions.

@morozov
Copy link
Contributor

morozov commented Jan 25, 2021

AFAIK composer still supports PHP 5.3. Although I'm fine with bumping the minimal requirement to say 7.2:

phpbrew/bin/phpbrew

Lines 4 to 8 in ad346ae

if (PHP_VERSION_ID < 70200 && function_exists('posix_isatty') && posix_isatty(STDOUT)) {
fwrite(STDOUT, "\033[33mWarning! The usage of PHP older than 7.2.0 as the interpreter is deprecated.\n");
fwrite(STDOUT, "Please set the system interpreter using \033[0m'phpbrew system <version>'\033[33m.\n");
fwrite(STDOUT, "See https://github.com/phpbrew/phpbrew/wiki/System-Interpreter for details.\033[0m\n");
}

Or even 7.3 given that 7.2 is no longer supported.

Using the system interpreter, it should be possible to build the older versions w/o having them used by PHPBrew as runtime. This would also create an opportunity for replacing the unmaintained dependencies like CurlKit with something more standard like Guzzle, etc.

@jhdxr
Copy link
Member Author

jhdxr commented Jan 25, 2021

AFAIK composer still supports PHP 5.3

Yes you are right. My bad. Composer is going to drop php older than 7.1 as of v2.2. (https://blog.packagist.com/composer-2-0-is-now-available/)

Using the system interpreter, it should be possible to build the older versions w/o having them used by PHPBrew as runtime.

I have a question. For phar, is it possible to show an error message and exit when we use some features/syntax only available in new versions?

I know it's possible for normal application, we can have a bootup file to check the version, and include(not require) the actual business logical later. The interpreter won't compile those file until it reach the include. But as phar is one single file, I'm not sure if it's still the case.

@jhdxr
Copy link
Member Author

jhdxr commented Jan 25, 2021

For phar, is it possible to show an error message and exit when we use some features/syntax only available in new versions?

I did a simple test and it also works. (tested on php7.2)

Then I'm totally fine to drop support for old php. Just add an error meesage in our entry file to let the user know. Does it sound good?

@morozov
Copy link
Contributor

morozov commented Jan 25, 2021

I have a question. For phar, is it possible to show an error message and exit when we use some features/syntax only available in new versions?

There's also a feature in Box that allows to enforce the requirements specified in composer.json. We can try using it. This way, we can make sure that not only the PHP version matches but all needed extensions like XML, JSON, etc. are available at runtime.

Then I'm totally fine to drop support for old php. Just add an error meesage in our entry file to let the user know. Does it sound good?

Sounds good to me. It would be also nice (now or later) to integrate this check into the upgrade process. I.e. instead of rewriting the binary right after downloading, execute something like /path/to/the/new/phpbrew --version and only move the file if the command succeeded.

@morozov
Copy link
Contributor

morozov commented Jan 29, 2021

@jhdxr see #1218 which implements the new version validation during the upgrade.

@morozov
Copy link
Contributor

morozov commented Feb 3, 2021

@jhdxr I think at this point we can tag a new release which will contain the logic implemented in #1218. After that, we can drop the support for PHP 7.2 and older and migrate to another CI. Once the next release is tagged, the binary of the previous release won't let the upgrade happen if the old PHP is used. Sounds good?

@jhdxr
Copy link
Member Author

jhdxr commented Feb 4, 2021

@morozov Sounds great. Just one comment: can we also added an option for selfupdate to let user to force choose the version they want. Just like Composer's --1 and --2.

@morozov
Copy link
Contributor

morozov commented Feb 4, 2021

This seems to be more than trivial to implement. Composer has a few release channels between which --1 and --2 can switch. PHPBrew simply relies on the latest release alias provided by GitHub. I don't think I'll have the bandwidth to implement this in foreseeable future. Do you?

@peter279k peter279k self-assigned this Jun 18, 2022
peter279k added a commit to peter279k/phpbrew that referenced this issue Jun 18, 2022
@peter279k peter279k added the CI Continuous integration label Jun 18, 2022
c9s added a commit that referenced this issue Aug 13, 2022
@peter279k
Copy link
Member

I've migrated some part of works from Travis CI to GitHub actions in the PR #1268.

And now we've following three works to consider migrating from Travis CI to GitHub actions:

  • After running the PHPUnit successfully, it will download the coveralls to upload the code coverage report.
    • This migration should be completed by repository owner because I don't have the coveralls credential key.
  • Uploading the phpbrew Phar binary to the Amazon S3.
    • This migration should be completed by repository owner because I don't have the current Amazon S3 key.
  • After PHPBrew uploading is successful, using the webhook send the notification to the Gitter.
    • This migration should be completed by repository owner because I don't have the current Gitter credentials.

@c9s, could you evaluate above works that need to migrate from Travis CI to GitHub actions? Or I miss some works in the Travis CI setting?

Thanks 😃.

@jhdxr
Copy link
Member Author

jhdxr commented Dec 7, 2022

* Uploading the phpbrew Phar binary to the Amazon S3.
  
  * This migration should be completed by repository owner because I don't have the current Amazon S3 key.

I think we can just remove/ignore this actually. The self-update command is using github (https://github.com/phpbrew/phpbrew/releases/latest/download/phpbrew.phar) as source.

@c9s
Copy link
Member

c9s commented Dec 7, 2022

Sounds good to me, but does Amazon provide free S3 service?

@peter279k
Copy link
Member

peter279k commented Dec 8, 2022

Sounds good to me, but does Amazon provide free S3 service?

@c9s, here are the AWS Free tier descriptions, I'm not sure it's good enough for us:

AWS Free Tier
As part of the AWS Free Tier, you can get started with Amazon S3 for free. Upon sign-up, new AWS customers receive 5GB of Amazon S3 storage in the S3 Standard storage class; 20,000 GET Requests; 2,000 PUT, COPY, POST, or LIST Requests; and 100 GB of Data Transfer Out each month.

Your usage for the free tier is calculated each month across all AWS Regions except the AWS GovCloud Region and automatically applied to your bill; unused monthly usage will not roll over. Restrictions apply; see offer terms for more details.

@c9s
Copy link
Member

c9s commented Dec 8, 2022 via email

@peter279k
Copy link
Member

peter279k commented Dec 8, 2022

I agree with @c9s. Using the GitHub releases I think is great for us to release upcoming Phar file :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration Test Suite
Projects
None yet
Development

No branches or pull requests

4 participants