From 2c5a8d5e694848679223da6ec4db1009f68034f9 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:50:23 +0000 Subject: [PATCH 01/12] php 8.4.1 php: update build patches Signed-off-by: Rui Chen --- Aliases/{php@8.3 => php@8.4} | 0 Formula/p/php.rb | 36 ++++++++++++++++++------------------ 2 files changed, 18 insertions(+), 18 deletions(-) rename Aliases/{php@8.3 => php@8.4} (100%) diff --git a/Aliases/php@8.3 b/Aliases/php@8.4 similarity index 100% rename from Aliases/php@8.3 rename to Aliases/php@8.4 diff --git a/Formula/p/php.rb b/Formula/p/php.rb index 65d86d8d23d85..98136640178bc 100644 --- a/Formula/p/php.rb +++ b/Formula/p/php.rb @@ -2,9 +2,9 @@ class Php < Formula desc "General-purpose scripting language" homepage "https://www.php.net/" # Should only be updated if the new version is announced on the homepage, https://www.php.net/ - url "https://www.php.net/distributions/php-8.3.14.tar.xz" - mirror "https://fossies.org/linux/www/php-8.3.14.tar.xz" - sha256 "58b4cb9019bf70c0cbcdb814c7df79b9065059d14cf7dbf48d971f8e56ae9be7" + url "https://www.php.net/distributions/php-8.4.1.tar.xz" + mirror "https://fossies.org/linux/www/php-8.4.1.tar.xz" + sha256 "94c8a4fd419d45748951fa6d73bd55f6bdf0adaefb8814880a67baa66027311f" license "PHP-3.01" livecheck do @@ -29,7 +29,7 @@ class Php < Formula end depends_on "httpd" => [:build, :test] - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "apr" depends_on "apr-util" depends_on "argon2" @@ -72,11 +72,11 @@ def install system "./buildconf", "--force" inreplace "configure" do |s| - s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`", - "APACHE_THREADED_MPM=" - s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", + s.gsub! "$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1", + "false" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'$($APXS -q LIBEXECDIR)", "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" - s.gsub! "-z `$APXS -q SYSCONFDIR`", + s.gsub! "-z $($APXS -q SYSCONFDIR)", "-z ''" end @@ -429,10 +429,10 @@ def caveats __END__ diff --git a/build/php.m4 b/build/php.m4 -index 3624a33a8e..d17a635c2c 100644 +index e45b22b7..4624b390 100644 --- a/build/php.m4 +++ b/build/php.m4 -@@ -425,7 +425,7 @@ dnl +@@ -429,7 +429,7 @@ dnl dnl Adds a path to linkpath/runpath (LDFLAGS). dnl AC_DEFUN([PHP_ADD_LIBPATH],[ @@ -441,15 +441,15 @@ def caveats PHP_EXPAND_PATH($1, ai_p) ifelse([$2],,[ _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -470,7 +470,7 @@ dnl - dnl Add an include path. If before is 1, add in the beginning of INCLUDES. +@@ -476,7 +476,7 @@ dnl paths are prepended to the beginning of INCLUDES. dnl - AC_DEFUN([PHP_ADD_INCLUDE],[ -- if test "$1" != "/usr/include"; then -+ if test "$1" != "$PHP_OS_SDKPATH/usr/include"; then - PHP_EXPAND_PATH($1, ai_p) - PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ - if test "$2"; then + AC_DEFUN([PHP_ADD_INCLUDE], [ + for include_path in m4_normalize(m4_expand([$1])); do +- AS_IF([test "$include_path" != "/usr/include"], [ ++ AS_IF([test "$include_path" != "$PHP_OS_SDKPATH/usr/include"], [ + PHP_EXPAND_PATH([$include_path], [ai_p]) + PHP_RUN_ONCE([INCLUDEPATH], [$ai_p], [m4_ifnblank([$2], + [INCLUDES="-I$ai_p $INCLUDES"], diff --git a/configure.ac b/configure.ac index 36c6e5e3e2..71b1a16607 100644 --- a/configure.ac From cc5d66fda0520ca684407b4b97e9063869996161 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 21 Nov 2024 09:29:29 -0500 Subject: [PATCH 02/12] php@8.3 8.3.14 (new formula) Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/p/php@8.3.rb | 465 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 466 insertions(+) create mode 100644 Formula/p/php@8.3.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index f71aacb324641..e866362f94d5a 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -2257,6 +2257,7 @@ php-code-sniffer php-cs-fixer php@8.1 php@8.2 +php@8.3 phpmd phpmyadmin phpunit diff --git a/Formula/p/php@8.3.rb b/Formula/p/php@8.3.rb new file mode 100644 index 0000000000000..67d771a06d934 --- /dev/null +++ b/Formula/p/php@8.3.rb @@ -0,0 +1,465 @@ +class PhpAT83 < Formula + desc "General-purpose scripting language" + homepage "https://www.php.net/" + # Should only be updated if the new version is announced on the homepage, https://www.php.net/ + url "https://www.php.net/distributions/php-8.3.14.tar.xz" + mirror "https://fossies.org/linux/www/php-8.3.14.tar.xz" + sha256 "58b4cb9019bf70c0cbcdb814c7df79b9065059d14cf7dbf48d971f8e56ae9be7" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + keg_only :versioned_formula + + # Security Support Until 31 Dec 2027 + # https://www.php.net/supported-versions.php + deprecate! date: "2027-12-31", because: :unsupported + + depends_on "httpd" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "argon2" + depends_on "aspell" + depends_on "autoconf" + depends_on "curl" + depends_on "freetds" + depends_on "gd" + depends_on "gettext" + depends_on "gmp" + depends_on "icu4c@76" + depends_on "krb5" + depends_on "libpq" + depends_on "libsodium" + depends_on "libzip" + depends_on "oniguruma" + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tidy-html5" + depends_on "unixodbc" + + uses_from_macos "xz" => :build + uses_from_macos "bzip2" + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + # PHP build system incorrectly links system libraries + # see https://github.com/php/php-src/issues/10680 + patch :DATA + end + + def install + # buildconf required due to system library linking bug patch + system "./buildconf", "--force" + + inreplace "configure" do |s| + s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`", + "APACHE_THREADED_MPM=" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", + "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" + s.gsub! "-z `$APXS -q SYSCONFDIR`", + "-z ''" + + # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 + s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", + "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("@", "\\@") + "'" + end + + # Update error message in apache sapi to better explain the requirements + # of using Apache http in combination with php if the non-compatible MPM + # has been selected. Homebrew has chosen not to support being able to + # compile a thread safe version of PHP and therefore it is not + # possible to recompile as suggested in the original message + inreplace "sapi/apache2handler/sapi_apache2.c", + "You need to recompile PHP.", + "Homebrew PHP does not support a thread-safe php binary. " \ + "To use the PHP apache sapi please change " \ + "your httpd config to use the prefork MPM" + + inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" + + config_path = etc/"php/#{version.major_minor}" + # Prevent system pear config from inhibiting pear install + (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? + + # Prevent homebrew from hardcoding path to sed shim in phpize script + ENV["lt_cv_path_SED"] = "sed" + + # system pkg-config missing + ENV["KERBEROS_CFLAGS"] = " " + if OS.mac? + ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" + ENV["SASL_LIBS"] = "-lsasl2" + else + ENV["SQLITE_CFLAGS"] = "-I#{Formula["sqlite"].opt_include}" + ENV["SQLITE_LIBS"] = "-lsqlite3" + ENV["BZIP_DIR"] = Formula["bzip2"].opt_prefix + end + + # Each extension that is built on Mojave needs a direct reference to the + # sdk path or it won't find the headers + headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + # `_www` only exists on macOS. + fpm_user = OS.mac? ? "_www" : "www-data" + fpm_group = OS.mac? ? "_www" : "www-data" + + args = %W[ + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{config_path} + --with-config-file-path=#{config_path} + --with-config-file-scan-dir=#{config_path}/conf.d + --with-pear=#{pkgshare}/pear + --enable-bcmath + --enable-calendar + --enable-dba + --enable-exif + --enable-ftp + --enable-fpm + --enable-gd + --enable-intl + --enable-mbregex + --enable-mbstring + --enable-mysqlnd + --enable-pcntl + --enable-phpdbg + --enable-phpdbg-readline + --enable-shmop + --enable-soap + --enable-sockets + --enable-sysvmsg + --enable-sysvsem + --enable-sysvshm + --with-apxs2=#{Formula["httpd"].opt_bin}/apxs + --with-bz2#{headers_path} + --with-curl + --with-external-gd + --with-external-pcre + --with-ffi + --with-fpm-user=#{fpm_user} + --with-fpm-group=#{fpm_group} + --with-gettext=#{Formula["gettext"].opt_prefix} + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-iconv#{headers_path} + --with-kerberos + --with-layout=GNU + --with-ldap=#{Formula["openldap"].opt_prefix} + --with-libxml + --with-libedit + --with-mhash#{headers_path} + --with-mysql-sock=/tmp/mysql.sock + --with-mysqli=mysqlnd + --with-ndbm#{headers_path} + --with-openssl + --with-password-argon2=#{Formula["argon2"].opt_prefix} + --with-pdo-dblib=#{Formula["freetds"].opt_prefix} + --with-pdo-mysql=mysqlnd + --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} + --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} + --with-pdo-sqlite + --with-pgsql=#{Formula["libpq"].opt_prefix} + --with-pic + --with-pspell=#{Formula["aspell"].opt_prefix} + --with-sodium + --with-sqlite3 + --with-tidy=#{Formula["tidy-html5"].opt_prefix} + --with-unixODBC + --with-xsl + --with-zip + --with-zlib + ] + + if OS.mac? + args << "--enable-dtrace" + args << "--with-ldap-sasl" + args << "--with-os-sdkpath=#{MacOS.sdk_path_if_needed}" + else + args << "--disable-dtrace" + args << "--without-ldap-sasl" + args << "--without-ndbm" + args << "--without-gdbm" + end + + system "./configure", *args + system "make" + system "make", "install" + + # Allow pecl to install outside of Cellar + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + orig_ext_dir = File.basename(extension_dir) + inreplace bin/"php-config", lib/"php", prefix/"pecl" + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", %r{; ?extension_dir = "\./"}, + "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" + end + + # Use OpenSSL cert bundle + openssl = Formula["openssl@3"] + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/, + "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" + inreplace "php.ini-#{mode}", /; ?openssl\.capath=/, + "openssl.capath = \"#{openssl.pkgetc}/certs\"" + end + + config_files = { + "php.ini-development" => "php.ini", + "php.ini-production" => "php.ini-production", + "sapi/fpm/php-fpm.conf" => "php-fpm.conf", + "sapi/fpm/www.conf" => "php-fpm.d/www.conf", + } + config_files.each_value do |dst| + dst_default = config_path/"#{dst}.default" + rm dst_default if dst_default.exist? + end + config_path.install config_files + + unless (var/"log/php-fpm.log").exist? + (var/"log").mkpath + touch var/"log/php-fpm.log" + end + end + + def post_install + pear_prefix = pkgshare/"pear" + pear_files = %W[ + #{pear_prefix}/.depdblock + #{pear_prefix}/.filemap + #{pear_prefix}/.depdb + #{pear_prefix}/.lock + ] + + %W[ + #{pear_prefix}/.channels + #{pear_prefix}/.channels/.alias + ].each do |f| + chmod 0755, f + pear_files.concat(Dir["#{f}/*"]) + end + + chmod 0644, pear_files + + # Custom location for extensions installed via pecl + pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" + pecl_path.mkpath + ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + php_basename = File.basename(extension_dir) + php_ext_dir = opt_prefix/"lib/php"/php_basename + + # fix pear config to install outside cellar + pear_path = HOMEBREW_PREFIX/"share/pear" + cp_r pkgshare/"pear/.", pear_path + { + "php_ini" => etc/"php/#{version.major_minor}/php.ini", + "php_dir" => pear_path, + "doc_dir" => pear_path/"doc", + "ext_dir" => pecl_path/php_basename, + "bin_dir" => opt_bin, + "data_dir" => pear_path/"data", + "cfg_dir" => pear_path/"cfg", + "www_dir" => pear_path/"htdocs", + "man_dir" => HOMEBREW_PREFIX/"share/man", + "test_dir" => pear_path/"test", + "php_bin" => opt_bin/"php", + }.each do |key, value| + value.mkpath if /(? + SetHandler application/x-httpd-php + + + Finally, check DirectoryIndex includes index.php + DirectoryIndex index.php index.html + + The php.ini and php-fpm.ini file can be found in: + #{etc}/php/#{version.major_minor}/ + EOS + end + + service do + run [opt_sbin/"php-fpm", "--nodaemonize"] + run_type :immediate + keep_alive true + error_log_path var/"log/php-fpm.log" + working_dir var + end + + test do + assert_match(/^Zend OPcache$/, shell_output("#{bin}/php -i"), + "Zend OPCache extension not loaded") + # Test related to libxml2 and + # https://github.com/Homebrew/homebrew-core/issues/28398 + assert_includes (bin/"php").dynamically_linked_libraries, + (Formula["libpq"].opt_lib/shared_library("libpq", 5)).to_s + + system "#{sbin}/php-fpm", "-t" + system bin/"phpdbg", "-V" + system bin/"php-cgi", "-m" + # Prevent SNMP extension to be added + refute_match(/^snmp$/, shell_output("#{bin}/php -m"), + "SNMP extension doesn't work reliably with Homebrew on High Sierra") + begin + port = free_port + port_fpm = free_port + + expected_output = /^Hello world!$/ + (testpath/"index.php").write <<~PHP + + SetHandler application/x-httpd-php + + EOS + + (testpath/"fpm.conf").write <<~EOS + [global] + daemonize=no + [www] + listen = 127.0.0.1:#{port_fpm} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + EOS + + (testpath/"httpd-fpm.conf").write <<~EOS + #{main_config} + LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so + LoadModule proxy_module lib/httpd/modules/mod_proxy.so + LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so + + SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" + + EOS + + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + Process.kill("TERM", pid) + Process.wait(pid) + + fpm_pid = fork do + exec sbin/"php-fpm", "-y", "fpm.conf" + end + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + ensure + if pid + Process.kill("TERM", pid) + Process.wait(pid) + end + if fpm_pid + Process.kill("TERM", fpm_pid) + Process.wait(fpm_pid) + end + end + end +end + +__END__ +diff --git a/build/php.m4 b/build/php.m4 +index 3624a33a8e..d17a635c2c 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -425,7 +425,7 @@ dnl + dnl Adds a path to linkpath/runpath (LDFLAGS). + dnl + AC_DEFUN([PHP_ADD_LIBPATH],[ +- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then + PHP_EXPAND_PATH($1, ai_p) + ifelse([$2],,[ + _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) +@@ -470,7 +470,7 @@ dnl + dnl Add an include path. If before is 1, add in the beginning of INCLUDES. + dnl + AC_DEFUN([PHP_ADD_INCLUDE],[ +- if test "$1" != "/usr/include"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/include"; then + PHP_EXPAND_PATH($1, ai_p) + PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ + if test "$2"; then +diff --git a/configure.ac b/configure.ac +index 36c6e5e3e2..71b1a16607 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -190,6 +190,14 @@ PHP_ARG_WITH([libdir], + [lib], + [no]) + ++dnl Support systems with system libraries/includes in e.g. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk. ++PHP_ARG_WITH([os-sdkpath], ++ [for system SDK directory], ++ [AS_HELP_STRING([--with-os-sdkpath=NAME], ++ [Ignore system libraries and includes in NAME rather than /])], ++ [], ++ [no]) ++ + PHP_ARG_ENABLE([rpath], + [whether to enable runpaths], + [AS_HELP_STRING([--disable-rpath], From 0740450efa8d6f1f27abf8d8a4e79c66dcbc855a Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 21 Nov 2024 17:00:43 -0500 Subject: [PATCH 03/12] deployer: use php@8.3 Signed-off-by: Rui Chen --- Formula/d/deployer.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Formula/d/deployer.rb b/Formula/d/deployer.rb index d19af74f60c23..fef6ab01e0ad0 100644 --- a/Formula/d/deployer.rb +++ b/Formula/d/deployer.rb @@ -1,18 +1,25 @@ class Deployer < Formula desc "Deployment tool written in PHP with support for popular frameworks" homepage "https://deployer.org/" + # Bump to php 8.4 on the next release, if possible. url "https://github.com/deployphp/deployer/releases/download/v7.5.5/deployer.phar" sha256 "30c1c09038b0c390f40d21b3cb0a9e1ff46cfeefe4da1c834aeca6adfb5952d4" license "MIT" + revision 1 bottle do sha256 cellar: :any_skip_relocation, all: "bafc1e45e6c3ee51ac93ab5ce78373e6549c1b50c6d6a4cebaa32174b8df3d0d" end - depends_on "php" + depends_on "php@8.3" def install - bin.install "deployer.phar" => "dep" + libexec.install "deployer.phar" => "dep" + + (bin/"dep").write <<~EOS + #!#{Formula["php@8.3"].opt_bin}/php + Date: Thu, 21 Nov 2024 17:02:37 -0500 Subject: [PATCH 04/12] php-cs-fixer: use php@8.3 Signed-off-by: Rui Chen --- Formula/p/php-cs-fixer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/p/php-cs-fixer.rb b/Formula/p/php-cs-fixer.rb index dc36038ac0441..f42cf9af6a6fb 100644 --- a/Formula/p/php-cs-fixer.rb +++ b/Formula/p/php-cs-fixer.rb @@ -1,21 +1,23 @@ class PhpCsFixer < Formula desc "Tool to automatically fix PHP coding standards issues" homepage "https://cs.symfony.com/" + # Bump to php 8.4 on the next release, if possible. url "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.64.0/php-cs-fixer.phar" sha256 "7d67bbf0635df7239e0a09aef9999f6f91bbc7ef55541ee06aaed727453bfa5e" license "MIT" + revision 1 bottle do sha256 cellar: :any_skip_relocation, all: "5e7bb7d7d6389d482cb7f639e9aa630bf194b2e8564b07bdab4156f571f584b1" end - depends_on "php" + depends_on "php@8.3" def install libexec.install "php-cs-fixer.phar" (bin/"php-cs-fixer").write <<~EOS - #!#{Formula["php"].opt_bin}/php + #!#{Formula["php@8.3"].opt_bin}/php Date: Thu, 21 Nov 2024 17:08:01 -0500 Subject: [PATCH 05/12] phpmyadmin: update to use `php@8.3` for test Signed-off-by: Rui Chen --- Formula/p/phpmyadmin.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/p/phpmyadmin.rb b/Formula/p/phpmyadmin.rb index ada4401970042..5fab7c0019321 100644 --- a/Formula/p/phpmyadmin.rb +++ b/Formula/p/phpmyadmin.rb @@ -34,7 +34,7 @@ class Phpmyadmin < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "3db06f5c804f3bdc48368d1d1b6460d093163fed7cd881fcdae06d14ee3c53d6" end - depends_on "php" => :test + depends_on "php@8.3" => :test def install pkgshare.install Dir["*"] @@ -65,8 +65,9 @@ def caveats end test do + php = Formula["php@8.3"].opt_bin/"php" cd pkgshare do - assert_match "German", shell_output("php #{pkgshare}/index.php") + assert_match "German", shell_output("#{php} #{pkgshare}/index.php") end end end From 3fb521eb4337a6dd57096eea8d9cf96db214ae4e Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 21 Nov 2024 17:09:08 -0500 Subject: [PATCH 06/12] psalm: use php@8.3 Signed-off-by: Rui Chen --- Formula/p/psalm.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Formula/p/psalm.rb b/Formula/p/psalm.rb index 00f77075511c1..f7ed1467cdfc9 100644 --- a/Formula/p/psalm.rb +++ b/Formula/p/psalm.rb @@ -1,9 +1,11 @@ class Psalm < Formula desc "PHP Static Analysis Tool" homepage "https://psalm.dev" + # Bump to php 8.4 on the next release, if possible. url "https://github.com/vimeo/psalm/releases/download/5.26.1/psalm.phar" sha256 "7d68a927dd72d30ec90e574cc114dd44851d9c49e3855e3c33c2bdd021259d1a" license "MIT" + revision 1 bottle do sha256 cellar: :any_skip_relocation, arm64_sequoia: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" @@ -17,7 +19,7 @@ class Psalm < Formula end depends_on "composer" => :test - depends_on "php" + depends_on "php@8.3" # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix on_macos do @@ -27,7 +29,12 @@ class Psalm < Formula end def install - bin.install "psalm.phar" => "psalm" + libexec.install "psalm.phar" => "psalm" + + (bin/"psalm").write <<~EOS + #!#{Formula["php@8.3"].opt_bin}/php + Date: Fri, 22 Nov 2024 14:31:50 +0000 Subject: [PATCH 07/12] deployer: update 7.5.5_1 bottle. --- Formula/d/deployer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/d/deployer.rb b/Formula/d/deployer.rb index fef6ab01e0ad0..b72fb155493e1 100644 --- a/Formula/d/deployer.rb +++ b/Formula/d/deployer.rb @@ -8,7 +8,7 @@ class Deployer < Formula revision 1 bottle do - sha256 cellar: :any_skip_relocation, all: "bafc1e45e6c3ee51ac93ab5ce78373e6549c1b50c6d6a4cebaa32174b8df3d0d" + sha256 cellar: :any_skip_relocation, all: "7e54fce47176409d67d6508aa9b661e62600d211fe8ad81948029823f7a51b32" end depends_on "php@8.3" From 53f739d54312a684f2e6789d46805e0c4609ac0a Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 22 Nov 2024 14:31:51 +0000 Subject: [PATCH 08/12] php: update 8.4.1 bottle. --- Formula/p/php.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/p/php.rb b/Formula/p/php.rb index 98136640178bc..5117616981f57 100644 --- a/Formula/p/php.rb +++ b/Formula/p/php.rb @@ -13,12 +13,12 @@ class Php < Formula end bottle do - sha256 arm64_sequoia: "9fa13ceaebc79ab1738fcf8ce14e911c17e2e463be48ce45ccaa8d22a97ce441" - sha256 arm64_sonoma: "6fc262dc93f74af202a0b738a7ff1d87684c9d51499259c5521895a69abf04b1" - sha256 arm64_ventura: "3b89735b24a9278141c32a5f0785ceb17bb9f37f3e9f0c06efea5f5bfd859fa4" - sha256 sonoma: "0d9554ce4db41274761f8b4216683647f3e43a2574f245518b2a678a3bafdaf7" - sha256 ventura: "d85244f407ee83fb73c000425d8c2b8203ed6e3a86e83457f685fe547cf71c48" - sha256 x86_64_linux: "c9bcb2a6fc49e33d6deb9fdeb746e127bd061ae0b875019af3314e3226184b05" + sha256 arm64_sequoia: "3800e45d5cd63c32c2f7218d16f58582b7fa6cdef5b95ca455e31b3205fcac3f" + sha256 arm64_sonoma: "d0d48b74cee979feaf61163f997171d4be88aee7bd05d34f7b79086fc9bfee07" + sha256 arm64_ventura: "8457b0bbe50e7a56a498594f09f66aa645403a870632a9a376d8041446d2558a" + sha256 sonoma: "9c19cac2676029b1166c92ef06da10ff8fe8812a7a85f847e28a030f1050c77d" + sha256 ventura: "67374319228f35a65d26cdd7220f78ec82135ef6c832597ac3d4e14b96b2b8b5" + sha256 x86_64_linux: "5b4f182ecbf9f3fa0a455b3f7a22374b5af59ddb231927a0207b6a31c85b094d" end head do From 45b847d025a91a3639ecda23937a475e63d22bec Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 22 Nov 2024 14:31:52 +0000 Subject: [PATCH 09/12] php-cs-fixer: update 3.64.0_1 bottle. --- Formula/p/php-cs-fixer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/p/php-cs-fixer.rb b/Formula/p/php-cs-fixer.rb index f42cf9af6a6fb..0f152ec9e452d 100644 --- a/Formula/p/php-cs-fixer.rb +++ b/Formula/p/php-cs-fixer.rb @@ -8,7 +8,7 @@ class PhpCsFixer < Formula revision 1 bottle do - sha256 cellar: :any_skip_relocation, all: "5e7bb7d7d6389d482cb7f639e9aa630bf194b2e8564b07bdab4156f571f584b1" + sha256 cellar: :any_skip_relocation, all: "a9de27a9df1fdfb1b3555a6fe04b98a025a1bfb97fe893b39c6067f3a37b18ad" end depends_on "php@8.3" From 03580e1ec05f732413faa391f6f17e4f3c5e1c38 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 22 Nov 2024 14:31:52 +0000 Subject: [PATCH 10/12] php@8.3: add 8.3.14 bottle. --- Formula/p/php@8.3.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/p/php@8.3.rb b/Formula/p/php@8.3.rb index 67d771a06d934..733479f5e3db8 100644 --- a/Formula/p/php@8.3.rb +++ b/Formula/p/php@8.3.rb @@ -12,6 +12,15 @@ class PhpAT83 < Formula regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) end + bottle do + sha256 arm64_sequoia: "0b225f4e8af36781b9c01ee1e5298cd57a10f01cdaea6c6b2706d1b9149d4385" + sha256 arm64_sonoma: "b14e458a8082ccf3dc0260c391cbdd6f2383462dbb7f81a96e0e8a88bd92b36e" + sha256 arm64_ventura: "9c95509323222030ce67a68216110d1e3fcad3ad11679cf85b6164722b6f224a" + sha256 sonoma: "921a7465a7d3155692853df27ecf897856ed164e3f85e8380e166cee05f5a05f" + sha256 ventura: "61b7290f486048b1fe8b6e5ec5a93184acf7780b7b92c5c1a7e943a7df6e77ad" + sha256 x86_64_linux: "e7deca61153282f93cd14e539dd468548fd24fe8240833211dd8d1caf9f130d2" + end + keg_only :versioned_formula # Security Support Until 31 Dec 2027 From e49e494f26bc6356410ecc3472b5095cec87aab3 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 22 Nov 2024 14:31:52 +0000 Subject: [PATCH 11/12] phpmyadmin: update 5.2.1 bottle. --- Formula/p/phpmyadmin.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Formula/p/phpmyadmin.rb b/Formula/p/phpmyadmin.rb index 5fab7c0019321..2879e93bc24cc 100644 --- a/Formula/p/phpmyadmin.rb +++ b/Formula/p/phpmyadmin.rb @@ -22,16 +22,13 @@ class Phpmyadmin < Formula end bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "8128020d81fb88ccf3a6f6d8237c51ed2a1a19834539fa9b2303d5feaff22667" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb34ea7ccef57d1f9a45841b4dc4bd8a6d483611bc4aeaa4d5ddfda417005864" - sha256 cellar: :any_skip_relocation, arm64_ventura: "3bd02506f7741f5c566ce1208327f2a2cf02e2295d4cb5cadb6f9f2c4fafb8ec" - sha256 cellar: :any_skip_relocation, arm64_monterey: "2545dca90ee52f478275ff1a0da76cf27fcaf20fa7071f5cfe00f2c7fcdf1f7a" - sha256 cellar: :any_skip_relocation, arm64_big_sur: "83753db830be44e9d0b476e3fbb02ccabf9673364da6c9af9a15909d790acaf5" - sha256 cellar: :any_skip_relocation, sonoma: "af9fe78d82eedac1e56a34dc09d2f15aaeecba6dd21f8c51706afce6cd0c6170" - sha256 cellar: :any_skip_relocation, ventura: "15496fab9c4d8744f5d69869e0862a9c3ea957ebb1c3e62c6f02b7a8ba810169" - sha256 cellar: :any_skip_relocation, monterey: "d0e69d5885b6c7a0e34214d6f3f5ef1aa982c913a239ff3e71c1b4ac6732e701" - sha256 cellar: :any_skip_relocation, big_sur: "77e2cb701aaf85ea94c8e1c9b9345fb6bd6ef6f6ec51a956eed2e3d81895cd21" - sha256 cellar: :any_skip_relocation, x86_64_linux: "3db06f5c804f3bdc48368d1d1b6460d093163fed7cd881fcdae06d14ee3c53d6" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "639600846a9d3e93308a58896d6e08239f82c7a76f117ac664561647d98feb97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "639600846a9d3e93308a58896d6e08239f82c7a76f117ac664561647d98feb97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "639600846a9d3e93308a58896d6e08239f82c7a76f117ac664561647d98feb97" + sha256 cellar: :any_skip_relocation, sonoma: "995e2b5ae053275953d667a4dfb1ef757cb2fb493eba23f16f2fecc35d668fc2" + sha256 cellar: :any_skip_relocation, ventura: "995e2b5ae053275953d667a4dfb1ef757cb2fb493eba23f16f2fecc35d668fc2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "639600846a9d3e93308a58896d6e08239f82c7a76f117ac664561647d98feb97" end depends_on "php@8.3" => :test From 7525a2dac99ccf973e4aefc0fe7d150ca8646a1e Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 22 Nov 2024 14:31:53 +0000 Subject: [PATCH 12/12] psalm: update 5.26.1_1 bottle. --- Formula/p/psalm.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Formula/p/psalm.rb b/Formula/p/psalm.rb index f7ed1467cdfc9..58bacc316128c 100644 --- a/Formula/p/psalm.rb +++ b/Formula/p/psalm.rb @@ -8,14 +8,12 @@ class Psalm < Formula revision 1 bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" - sha256 cellar: :any_skip_relocation, arm64_ventura: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" - sha256 cellar: :any_skip_relocation, arm64_monterey: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" - sha256 cellar: :any_skip_relocation, sonoma: "c91062726d01714fb820072608162c8a5caa2af88c147b548652956d0a5b3cee" - sha256 cellar: :any_skip_relocation, ventura: "c91062726d01714fb820072608162c8a5caa2af88c147b548652956d0a5b3cee" - sha256 cellar: :any_skip_relocation, monterey: "c91062726d01714fb820072608162c8a5caa2af88c147b548652956d0a5b3cee" - sha256 cellar: :any_skip_relocation, x86_64_linux: "7668d9744c37551061d79c812116ad92fee0aac3fc323abda1e71f62cde39848" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "036217c9d7ae0e4dcf447575f0e44faffcc7ca84ece4376a4cd5f00628d95b8a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "036217c9d7ae0e4dcf447575f0e44faffcc7ca84ece4376a4cd5f00628d95b8a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "036217c9d7ae0e4dcf447575f0e44faffcc7ca84ece4376a4cd5f00628d95b8a" + sha256 cellar: :any_skip_relocation, sonoma: "92d3874edda449c19be93b9936d84d863ca1e7dcca1aac98435ea393372ae30e" + sha256 cellar: :any_skip_relocation, ventura: "92d3874edda449c19be93b9936d84d863ca1e7dcca1aac98435ea393372ae30e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "036217c9d7ae0e4dcf447575f0e44faffcc7ca84ece4376a4cd5f00628d95b8a" end depends_on "composer" => :test