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

Update PHP to 8.2 and enable zlib #96

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Update PHP to 8.2 and enable zlib #96

merged 2 commits into from
Oct 26, 2023

Conversation

pjcdawkins
Copy link
Contributor

@pjcdawkins pjcdawkins commented Aug 4, 2023

#54

Check various needed extensions are installed ... I've checked for linux/amd64:

  • curl
  • json
  • openssl
  • pcre
  • phar

plus desirable extensions:

  • zlib (for using gzip over HTTP)
  • pcntl and posix (for enabling the tunnel:open command)

@pjcdawkins pjcdawkins changed the title Update legacy CLI to 4.8.0 and PHP to 8.2 Update PHP to 8.2 Aug 14, 2023
Copy link
Member

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove deprecation warning before bumping the PHP version.

I get the following ones when logging in:

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /home/akalipetis/.platformsh/oauth-listener/index.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /home/akalipetis/.platformsh/oauth-listener/index.php:45) in /home/akalipetis/.platformsh/oauth-listener/index.php on line 187

Warning: Cannot modify header information - headers already sent by (output started at /home/akalipetis/.platformsh/oauth-listener/index.php:45) in /home/akalipetis/.platformsh/oauth-listener/index.php on line 187

Warning: Cannot modify header information - headers already sent by (output started at /home/akalipetis/.platformsh/oauth-listener/index.php:45) in /home/akalipetis/.platformsh/oauth-listener/index.php on line 187

@pjcdawkins
Copy link
Contributor Author

Weird, I don't get that when I run ./bin/platform login directly in legacy-cli under PHP 8.2 🤔

pjcdawkins added a commit to platformsh/legacy-cli that referenced this pull request Aug 16, 2023
@pjcdawkins
Copy link
Contributor Author

We should remove deprecation warning before bumping the PHP version.

Things that stop it working, yes. There are definitely deprecations, which are unavoidable as it still supports PHP 5.6+ and various libraries include deprecated code (mostly Guzzle). They're usually hidden unless you define PLATFORMSH_CLI_REPORT_DEPRECATIONS=1 as an env var and run with -vvv.

@pjcdawkins
Copy link
Contributor Author

Rebased

@pjcdawkins
Copy link
Contributor Author

pjcdawkins commented Sep 20, 2023

Rebased again / updated to 8.2.10

And I've updated the OP comment with a list of extensions that we'd want to check exist in the PHP build

@pjcdawkins
Copy link
Contributor Author

pjcdawkins commented Sep 20, 2023

$ ./internal/legacy/archives/php_linux_amd64 --version

PHP 8.2.10 (cli) (built: Sep 20 2023 16:58:29) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.10, Copyright (c) Zend Technologies

$ ./internal/legacy/archives/php_linux_amd64 -r 'foreach (["curl", "json", "openssl", "pcre", "phar", "zlib", "posix", "pcntl"] as $ext) echo extension_loaded($ext) ? "$ext: found\n" : "$ext: not found :(\n";'

curl: found
json: found
openssl: found
pcre: found
phar: found
zlib: not found :(
posix: found
pcntl: found

@akalipetis could we build PHP --with-zlib ?

@pjcdawkins
Copy link
Contributor Author

Rebased + updated to 8.2.11

@pjcdawkins
Copy link
Contributor Author

I've added zlib

I haven't tested if this builds OK for Windows / OS X / ARM

@pjcdawkins pjcdawkins changed the title Update PHP to 8.2 Update PHP to 8.2 and enable zlib Oct 26, 2023
Copy link
Member

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐻

@akalipetis
Copy link
Member

Deprecation warnings are gone and everything seems to be working great!

@akalipetis akalipetis merged commit 252aea5 into main Oct 26, 2023
1 check passed
@akalipetis akalipetis deleted the php-8.2 branch October 26, 2023 16:57
@akalipetis akalipetis mentioned this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants