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
Fix PECL publish #85
Fix PECL publish #85
Conversation
.github/workflows/ci.yml
Outdated
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
php composer-setup.php |
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.
is this necessary?
ubuntu-latest comes with composer preinstalled
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.
To have composer.phar in the same directory. So, that we don't need to script to get the path of composer.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.
installing composer twice seems like it could have weird consequences. let's just find the path. maybe something like?:
# get path to composer.phar so we can run it with custom php.ini
COMPOSER_PHAR=$(realpath $(which composer))
php -c php.ini $COMPOSER_PHAR require ...
@@ -45,6 +39,13 @@ jobs: | |||
./configure | |||
make |
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.
Debateable: // TODO run tests (if we are officially supporting 5.5 for now)
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.
Maybe we should ask when we can drop support for older versions of PHP. If it's something like 1-2 months away, we can drop support now and sdk-php can pick up new changes later.
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.
Let's leave the php version related stuff as a follow up item, I have listed some TODOs in the description of the PR.
# install awscrt.stub.php to ext/ | ||
cp -v awscrt.stub.php ext/awscrt.stub.php |
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.
Why? We moved this to the main folder instead of ext/ and making a copy here.
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.
PECL removes .php from subdirectory, but not from the root directory. So, move it outside the ext/ is the easiest way.
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.
Why do we need this in ext/? I am just confused about why do we need this file at two places.
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.
# generate awscrt_arginfo.h
php gen_stub.php --minimal-arginfo ext/awscrt.stub.php
This part will generate the awscrt_arginfo.h into the same folder as awscrt.stub.php
.
The gen_sub.php
is from the PHP build scripts, I didn't dig deep into it. We need awscrt_arginfo.h
in ext/, so I just copy it around here.
.github/workflows/ci.yml
Outdated
uses: cmb69/setup-php-sdk@v0.6 | ||
with: | ||
version: '8.0' | ||
arch: x64 | ||
ts: ts | ||
deps: openssl |
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.
Confused: What is this action? I could not find anything about it using a quick Google search (https://github.com/marketplace?type=actions&query=Setup+PHP+). Can you please add some documentation for why we need a different action for Windows CI? It appears that shivammathur/setup-php@v2 also supports Windows.
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.
TBH, I didn't dig deep. I followed the PR initialed from Mike, https://github.com/awslabs/aws-crt-php/pull/77/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR114.
And I believe Mike found it from https://github.com/Imagick/imagick/blob/master/.github/workflows/windows.yml
I was really just want to have something working...
shell: cmd # use CMD instead of powershell to catch error from bat script | ||
strategy: | ||
matrix: | ||
arch: [x64] |
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.
Confused: Why only x64? Is this a todo for 32bit?
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.
Yeah, maybe should leave it as a TODO. Again, just being lazy as no current ask and it's probably work.
This reverts commit b116a18.
…-php into native-extension-rewrite
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.
fix & ship
.github/workflows/ci.yml
Outdated
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
php composer-setup.php |
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.
installing composer twice seems like it could have weird consequences. let's just find the path. maybe something like?:
# get path to composer.phar so we can run it with custom php.ini
COMPOSER_PHAR=$(realpath $(which composer))
php -c php.ini $COMPOSER_PHAR require ...
ISSUE:
Fix:
Windows issue:
Fix:
generate-php-ini
TODO:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.