yiisoft / yii2-docker

Official Docker images suitable for Yii 2.0
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
381 stars 202 forks source link

Adding PHP 8 to the documentation and to Docker image #123

Closed cgsmith closed 3 years ago

cgsmith commented 3 years ago

This also fixes the image magic install and updates composer.

schmunk42 commented 3 years ago

PHP8 support is nice, but I am still undecided about composer 2, since there's no fxp support, see https://github.com/fxpio/composer-asset-plugin/issues/334

Shall we drop fxp?

bizley commented 3 years ago

I would say so. I switched to asset packagist and never looked back.

samdark commented 3 years ago

Agree. I've switched long long time ago as well.

cebe commented 3 years ago

Is it possible to have old composer on old php version tags and new composer on the newer versions?

Otherwise rebuilding and existing tag would break a lot of setups.

I had some issues in the past where on one machine we had 7.4-apache on two machines but these were actually different images.

Moving to composer 2.0 and removing the plugin is a BC break that should not be pushed to the same tag.

schmunk42 commented 3 years ago

Actually we had additional suffixes like 7.4-apache-18.12.0 to build images with fixed tags, but there's an issue with Travis building them.

I'll try look into that first, before merging.

cgsmith commented 3 years ago

Actually we had additional suffixes like 7.4-apache-18.12.0 to build images with fixed tags, but there's an issue with Travis building them.

I'll try look into that first, before merging.

I was trying to find where this is done. Could you comment about this in the Readme or doc file if it isn't there? I'm curious about how I can assist on future cycles of the package.

schmunk42 commented 3 years ago

@cgsmith I was confused with old Travis builds. We have tagged images now (with a missing - though, but this will be fixed with above PR).

Looks like GH-actions are working fine and we can move on.

We also need to add PHP 8.0 here https://github.com/yiisoft/yii2-docker/blob/master/.github/workflows/docker-image.yml

cgsmith commented 3 years ago

@schmunk42 if I add PHP8 to the docker-image.yml file on my fork do you know if that will run on mine for testing?

schmunk42 commented 3 years ago

@cgsmith Don't know sorry (do you have enabled them?), I didn't work a lot with GH actions, maybe @bizley and @samdark can shed some light.

bizley commented 3 years ago

@cgsmith are you asking if Yii runs on php 8? Yes it does.

cgsmith commented 3 years ago

@bizley no. just curious how i can test the github actions on my fork of this repo.

bizley commented 3 years ago

Github runs what is inside workflows folder so you could for example fork it and make PR to your main fork branch.

schmunk42 commented 3 years ago

Github runs what is inside workflows folder so you could for example fork it and make PR to your main fork branch.

But why are there no builds/actions on the commits on this PR?

bizley commented 3 years ago

Oh, there were none? Weird...

bizley commented 3 years ago

I can see the workflow builds and pushes the docker image to the registry. We need something additional to only test the images.

bizley commented 3 years ago

I'm using this condition to build and push images when tagging the release with X.X.X semver schema.

on:
  push:
    tags:
      - '*.*.*'
schmunk42 commented 3 years ago

I can see the workflow builds and pushes the docker image to the registry. We need something additional to only test the images.

I don't quite understand, the workflows looked good to me?!

bizley commented 3 years ago

Oh, my bad, login and push to registry is conditional. So it's fine, maybe it could be separated to simplify the workflows. Anyway. I believe

on: [push, pull_request]

is missing.

cgsmith commented 3 years ago

@bizley gotcha i needed to enable actions on my end. sorry for the test commit. I forgot it came down in the PR. I'll revert that.

cgsmith commented 3 years ago

I'll put this back into a pending PR after the checks are all done. This PR should also close #110

schmunk42 commented 3 years ago

We have correctly tagged images like 7.4-apache-21.3.1 now, so we can proceed with moving to composer 2. The above tag is the last image which will have composer 1 installed by default.

Alex-DA commented 3 years ago

Hello @schmunk42 @bizley @cgsmith , what is the status of this PR?. Exist some official image to use YII2 with PHP 8.0 ?. Thank you for your work.

schmunk42 commented 3 years ago

@Alex-DA This PR is in draft stage, but I think we could move forward with it.

Could you give https://hub.docker.com/r/yiisoftware/yii-php/tags?page=1&ordering=last_updated a try in the meantime? Actually this should also work.

cgsmith commented 3 years ago

I had this as a draft because the builds were failing. I'm not the most confident in my ability to fix the broken build. Can anyone assist?

On Fri, Apr 16, 2021, 2:58 PM Tobias Munk @.***> wrote:

@Alex-DA https://github.com/Alex-DA This PR is in draft stage, but I think we could move forward with it.

Could you give https://hub.docker.com/r/yiisoftware/yii-php/tags?page=1&ordering=last_updated a try in the meantime? Actually this should also work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yiisoft/yii2-docker/pull/123#issuecomment-821529071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELFIW527VYA26GEPOOLZDTJCJG7ANCNFSM4ZWKSBFA .

schmunk42 commented 3 years ago

Could you try updating TEST_YII_VERSION to 5fbd28e05609bd31c8415ede663747c2133d1e46 (2.0.41.1) - I got an error from GitHub when trying to create a new PR from this PR.

schmunk42 commented 3 years ago

Hmm, actions do not run. Could you resolve the conflicts and remove WIP; not sure if actions run on WIP PRs?

schmunk42 commented 3 years ago

At least the action ran now: https://github.com/yiisoft/yii2-docker/actions/runs/763731034

But we need a change, that pushing only happens on master - I contacted GH-support about actions and they said relevant is the current workflow from master(!) not the one from the PR (which makes also sense, but it was different with travis I think)

So conflicts must be resolved for the PHP-8 images to appear.