-
Notifications
You must be signed in to change notification settings - Fork 68
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
XDMoD 11.0 PHP 7.4 Changes #1806
Changes from all commits
9b67a0c
2397fee
eb2b0ed
e47518d
c62a7ce
cf6f39a
e996e98
68fbbe5
cebf3a0
6f37189
b9937c4
b64b7fb
8a15723
02c9784
61fa9d9
ba55069
779593b
2f10c4a
973db40
5b9b72d
ec2d5db
4410b2f
8276c78
ca0c621
b0200be
48d21d4
988a69f
d0fd8c4
491410a
c65cc9e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |||||
steps: | ||||||
- run: | ||||||
name: Generate OpenSSL Key | ||||||
command: openssl genrsa -rand /proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/uptime 2048 > /etc/pki/tls/private/localhost.key | ||||||
command: openssl genrsa -rand /proc/cpuinfo:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/uptime 2048 > /etc/pki/tls/private/localhost.key | ||||||
- run: | ||||||
name: Generate Certificate | ||||||
command: /usr/bin/openssl req -new -key /etc/pki/tls/private/localhost.key -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req -out /etc/pki/tls/certs/localhost.crt -subj "/C=XX/L=Default City/O=Default Company Ltd" | ||||||
|
@@ -35,6 +35,15 @@ jobs: | |||||
#- setup_remote_docker: | ||||||
# docker_layer_caching: true | ||||||
# Download and cache dependencies | ||||||
- run: | ||||||
name: Update php module | ||||||
command: dnf module -y reset php && dnf module -y enable php:7.4 | ||||||
- run: | ||||||
name: Install PHP 7.4 and PHP module pre-reqs & an updated version of PHP Pear | ||||||
command: dnf install -y php libzip-devel php-pear php-devel | ||||||
- run: | ||||||
name: Install MongoDB Pear module | ||||||
command: yes '' | pecl install mongodb || true | ||||||
- run: | ||||||
name: install the composer dependencies | ||||||
command: composer install | ||||||
|
@@ -43,7 +52,9 @@ jobs: | |||||
command: | | ||||||
mkdir ~/phpunit | ||||||
mkdir /tmp/screenshots | ||||||
- run: ~/bin/buildrpm xdmod | ||||||
- run: | ||||||
name: Build XDMoD RPM | ||||||
command: ~/bin/buildrpm xdmod | ||||||
- run: | ||||||
name: Install / Upgrade XDMoD from RPM | ||||||
command: ./tests/ci/bootstrap.sh | ||||||
|
@@ -82,20 +93,24 @@ jobs: | |||||
chown root:root -R /usr/local/node-v10.24.1-linux-x64 | ||||||
- run: pushd ./tests/ui && PATH=/usr/local/node-v10.24.1-linux-x64/bin:$PATH /usr/local/node-v10.24.1-linux-x64/bin/npm install && popd | ||||||
- run: PATH=/usr/local/node-v10.24.1-linux-x64/bin:$PATH ./tests/ui/runtests.sh --headless --log-junit ~/phpunit | ||||||
|
||||||
- run: | ||||||
name: 'Run SSO Tests' | ||||||
command: | | ||||||
PATH=/usr/local/node-v10.24.1-linux-x64/bin:$PATH ./tests/ci/samlSetup.sh | ||||||
PATH=/usr/local/node-v10.24.1-linux-x64/bin:$PATH ./tests/ui/runtests.sh --headless --log-junit ~/phpunit --sso | ||||||
./vendor/phpunit/phpunit/phpunit -c ./tests/integration/phpunit.xml.dist --testsuite sso --log-junit ~/phpunit/xdmod-sso-integration.xml | ||||||
- run: | ||||||
name: Ensure that no unexpected Apache errors were generated | ||||||
command: test ! -e /var/log/php-fpm/www-error.log | ||||||
name: Ensure that no unexpected Apache errors were generated ( We expect PHP Deprecated ) | ||||||
command: > | ||||||
jpwhite4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
if [ -e /var/log/php-fpm/www-error.log ]; then | ||||||
test `egrep -v "PHP Deprecated.*vendor\/.*" /var/log/php-fpm/www-error.log | wc -l` = 0; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as my |
||||||
fi | ||||||
- run: | ||||||
name: Ensure that no PHP command-line errors were generated | ||||||
command: > | ||||||
if [ -e /var/log/php_errors.log ]; then | ||||||
test `fgrep -v 'vendor/phpunit/phpunit/src' /var/log/php_errors.log | wc -l` = 0; | ||||||
test `egrep -v "PHP Deprecated.*vendor\/.*|PHP Notice: fread()" /var/log/php_errors.log | wc -l` = 0; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as my |
||||||
fi | ||||||
- store_artifacts: | ||||||
path: /tmp/screenshots | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,10 +267,14 @@ public function setSystemQuoteChar($char) | |
|
||
public function quote($identifier) | ||
{ | ||
// Don't quote the identifier if it's already been quoted | ||
// We can't quote non-strings so.... | ||
if (!is_string($identifier)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the safest way to handle this case? What scenarios exist where the quote function was called with a non string object? What was the object and what happened next? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably not, I've updated this in the latest commit to throw an Exception. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So just some background, this code works fine in 7.2|7.4, but it was failing in 8.0 due to 8.X being more stringent about types. |
||
throw new \Exception('Unable to quote non-string identifier.'); | ||
} | ||
|
||
if (0 === strpos($identifier, $this->systemQuoteChar) | ||
&& (strlen($identifier) - 1) === strrpos($identifier, $this->systemQuoteChar) ) { | ||
// Don't quote the identifier if it's already been quoted | ||
if (str_starts_with($identifier, $this->systemQuoteChar) | ||
&& str_ends_with($identifier, $this->systemQuoteChar)) { | ||
return $identifier; | ||
} else { | ||
return $this->systemQuoteChar . $identifier . $this->systemQuoteChar; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are |
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
|| 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.
So at one point during development
yes '' | pecl install mongodb
was returning a non-zero exit code due to not being able to add information php.ini. that doesn't seem to be the case anymore. I'll remove the extraneous|| 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.
Or judging by the latest build failure it looks like we do need this. Specifically it returns
and exit code=141