Skip to content

Commit

Permalink
PHP/8.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Nov 29, 2023
1 parent a8f697d commit cd8d0eb
Show file tree
Hide file tree
Showing 29 changed files with 170 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# heroku-buildpack-php CHANGELOG

## v241 (2023-11-??)

### ADD

- PHP/8.3.0 [David Zuelke]

## v241 (2023-11-29)

- PHP/8.1.26 [David Zuelke]
Expand Down
1 change: 1 addition & 0 deletions bin/util/eol.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"8.0" => array("2022-11-26", "2023-11-26"),
"8.1" => array("2023-11-25", "2024-11-25"),
"8.2" => array("2024-12-08", "2025-12-08"),
"8.3" => array("2025-11-23", "2026-11-23"),
);

if(basename(__FILE__) != basename($_SERVER["PHP_SELF"])) return $eol; // we're being included, just return the data
Expand Down
3 changes: 3 additions & 0 deletions support/build/extensions/no-debug-non-zts-20180731/blackfire
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ case ${ZEND_MODULE_API_VERSION} in
20220829)
series=8.2
;;
20230901)
series=8.3
;;
*)
echo "Unsupported PHP/Zend Module API version: ${ZEND_MODULE_API_VERSION}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions support/build/extensions/no-debug-non-zts-20180731/newrelic
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ case ${ZEND_MODULE_API_VERSION} in
20220829)
series=8.2
;;
20230901)
series=8.3
;;
*)
echo "Unsupported PHP/Zend Module API version: ${ZEND_MODULE_API_VERSION}"
exit 1
Expand Down
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20230901/amqp-2.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/amqp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/apcu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php

source $(dirname $0)/../no-debug-non-zts-20180731/blackfire
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20230901/ev-1.1.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/ev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/event
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/imagick
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/memcached
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/mongodb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/oauth
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/pcov
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20230901/pq-2.2.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*, extensions/no-debug-non-zts-20230901/raphf-2.*

source $(dirname $0)/../no-debug-non-zts-20180731/pq
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20230901/psr-1.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/psr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/raphf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20180731/rdkafka
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/redis
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20230901/uuid-1.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.3.*

source $(dirname $0)/../no-debug-non-zts-20180731/uuid
2 changes: 2 additions & 0 deletions support/build/php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if [[ $dep_version == *alpha* ]] || [[ $dep_version == *beta* ]] || [[ $dep_vers
dep_url=https://downloads.php.net/~ramsey/${dep_archive_name}
elif [[ $dep_version == 8.2.* ]]; then
dep_url=https://downloads.php.net/~pierrick/${dep_archive_name}
elif [[ $dep_version == 8.3.* ]]; then
dep_url=https://downloads.php.net/~eric/${dep_archive_name}
fi
else
dep_url=https://www.php.net/distributions/${dep_archive_name}
Expand Down
4 changes: 4 additions & 0 deletions support/build/php-8.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php

source $(dirname $0)/php
1 change: 1 addition & 0 deletions support/devcenter/generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'8.0',
'8.1',
'8.2',
'8.3',
];

$findstacks = function(array $package) use($stacks) {
Expand Down
5 changes: 5 additions & 0 deletions test/spec/php_8.3-apache2_boot_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "php_shared_boot"

describe "A PHP 8.3/Apache application for testing boot options", :requires_php_on_stack => "8.3" do
include_examples "A PHP application for testing boot options", "8.3", "apache2"
end
5 changes: 5 additions & 0 deletions test/spec/php_8.3-apache2_concurrency_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "php_shared_concurrency"

describe "A PHP 8.3/Apache application for testing WEB_CONCURRENCY behavior", :requires_php_on_stack => "8.3" do
include_examples "A PHP application for testing WEB_CONCURRENCY behavior", "8.3", "apache2"
end
5 changes: 5 additions & 0 deletions test/spec/php_8.3-nginx_boot_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "php_shared_boot"

describe "A PHP 8.3/Nginx application for testing boot options", :requires_php_on_stack => "8.3" do
include_examples "A PHP application for testing boot options", "8.3", "nginx"
end
5 changes: 5 additions & 0 deletions test/spec/php_8.3-nginx_concurrency_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "php_shared_concurrency"

describe "A PHP 8.3/Nginx application for testing WEB_CONCURRENCY behavior", :requires_php_on_stack => "8.3" do
include_examples "A PHP application for testing WEB_CONCURRENCY behavior", "8.3", "nginx"
end
48 changes: 48 additions & 0 deletions test/spec/php_8.3_base_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
require_relative "php_shared_base"

describe "A basic PHP 8.3 application", :requires_php_on_stack => "8.3" do
include_examples "A basic PHP application", "8.3"

context "with an index.php that allows for different execution times" do
['apache2', 'nginx'].each do |server|
context "running the #{server} web server" do
let(:app) {
new_app_with_stack_and_platrepo('test/fixtures/sigterm',
before_deploy: -> { system("composer require --quiet --ignore-platform-reqs php '8.3.*'") or raise "Failed to require PHP version" }
)
}

# FIXME: move to php_shared.rb once all PHPs are rebuilt with that tracing capability
it "logs slowness after configured time and sees a trace" do
app.deploy do |app|
# launch web server wrapped in a 20 second timeout
# once web server is ready, `read` unblocks and we curl the sleep() script which will take a few seconds to run
# after `curl` completes, `wait-for.it.sh` will shut down
# ensure slowlog info and trace is there
cmd = "./waitforit.sh 20 'ready for connections' heroku-php-#{server} --verbose -F fpm.request_slowlog_timeout.conf | { read && curl \"localhost:$PORT/index.php?wait=5\"; }"
retry_until retry: 3, sleep: 5 do
output = app.run(cmd)
expect(output).to include("executing too slow")
expect(output).to include("sleep() /app/index.php:5")
end
end
end

it "logs slowness after about 3 seconds and terminates the process after about 30 seconds" do
app.deploy do |app|
# launch web server wrapped in a 50 second timeout
# once web server is ready, `read` unblocks and we curl the sleep() script with a very long timeout
# after `curl` completes, `wait-for.it.sh` will shut down
# ensure slowlog and terminate output is there
cmd = "./waitforit.sh 50 'ready for connections' heroku-php-#{server} --verbose | { read && curl \"localhost:$PORT/index.php?wait=35\"; }"
retry_until retry: 3, sleep: 5 do
output = app.run(cmd)
expect(output).to match(/executing too slow/)
expect(output).to match(/execution timed out/)
end
end
end
end
end
end
end
6 changes: 3 additions & 3 deletions test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ def expect_exit(expect: :to, operator: :eq, code: 0)
end

def expected_default_php(stack)
"8.2"
"8.3"
end

def php_on_stack?(series)
case ENV["STACK"]
when "heroku-20"
available = ["7.3", "7.4", "8.0", "8.1", "8.2"]
available = ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
else
available = ["8.1", "8.2"]
available = ["8.1", "8.2", "8.3"]
end
available.include?(series)
end
Expand Down

0 comments on commit cd8d0eb

Please sign in to comment.