[packages/php-symfony-Process] Rel 2; use phpab

arekm arekm at pld-linux.org
Wed Apr 15 19:13:39 CEST 2026


commit 7fef8a4d27decfcc2f0bb39a6badedccac05e3f7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Apr 15 19:13:27 2026 +0200

    Rel 2; use phpab

 php-symfony-Process.spec | 47 +++--------------------------------------------
 1 file changed, 3 insertions(+), 44 deletions(-)
---
diff --git a/php-symfony-Process.spec b/php-symfony-Process.spec
index 7682914..4809d2c 100644
--- a/php-symfony-Process.spec
+++ b/php-symfony-Process.spec
@@ -4,13 +4,13 @@ Summary:	Symfony Process Component
 Summary(pl.UTF-8):	Komponent Symfony Process
 Name:		php-symfony-Process
 Version:	7.2.9
-Release:	1
+Release:	2
 License:	MIT
 Group:		Development/Languages/PHP
 Source0:	https://github.com/symfony/process/archive/v%{version}/process-%{version}.tar.gz
 # Source0-md5:	020560f28cf33035e3cc51eb7ba944e5
 URL:		https://symfony.com/doc/current/components/process.html
-BuildRequires:	php-cli
+BuildRequires:	phpab
 BuildRequires:	rpmbuild(macros) >= 1.610
 Requires:	php(core) >= %{php_min_version}
 Requires:	php(pcre)
@@ -32,48 +32,7 @@ Komponent Process uruchamia polecenia w podprocesach.
 %{__rm} Pipes/WindowsPipes.php
 
 %build
-# generate classmap autoloader
-php -r '
-$classes = [];
-$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."));
-foreach ($rii as $file) {
-    if ($file->isDir() || $file->getExtension() !== "php") continue;
-    $path = $file->getPathname();
-    if (str_contains($path, "/Tests/")) continue;
-    $content = file_get_contents($path);
-    $tokens = token_get_all($content);
-    $ns = "";
-    for ($i = 0; $i < count($tokens); $i++) {
-        if (is_array($tokens[$i]) && $tokens[$i][0] === T_NAMESPACE) {
-            $ns = "";
-            for ($j = $i+1; $j < count($tokens); $j++) {
-                if (is_array($tokens[$j]) && in_array($tokens[$j][0], [T_NAME_QUALIFIED, T_STRING]))
-                    $ns .= $tokens[$j][1];
-                elseif ($tokens[$j] === ";") break;
-            }
-        }
-        if (is_array($tokens[$i]) && in_array($tokens[$i][0], [T_CLASS, T_INTERFACE, T_TRAIT, T_ENUM])) {
-            if ($i > 0 && is_array($tokens[$i-1]) && $tokens[$i-1][0] === T_DOUBLE_COLON) continue;
-            for ($j = $i+1; $j < count($tokens); $j++) {
-                if (is_array($tokens[$j]) && $tokens[$j][0] === T_STRING) {
-                    $cn = $ns ? $ns . "\\\\" . $tokens[$j][1] : $tokens[$j][1];
-                    $rp = substr($path, 1); // strip leading "."
-                    $classes[$cn] = $rp;
-                    break;
-                }
-            }
-        }
-    }
-}
-ksort($classes);
-$f = fopen("autoload.php", "w");
-fwrite($f, "<?php\nspl_autoload_register(\n    function(\$class) {\n        static \$classes = null;\n        if (\$classes === null) {\n            \$classes = array(\n");
-foreach ($classes as $c => $p) {
-    fwrite($f, "                " . var_export($c, true) . " => " . var_export($p, true) . ",\n");
-}
-fwrite($f, "            );\n        }\n        \$cn = strtolower(\$class);\n        if (isset(\$classes[\$cn])) {\n            require __DIR__ . \$classes[\$cn];\n        }\n    },\n    true,\n    false\n);\n");
-fclose($f);
-'
+phpab -n -e '*/Tests/*' -o autoload.php .
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-symfony-Process.git/commitdiff/7fef8a4d27decfcc2f0bb39a6badedccac05e3f7



More information about the pld-cvs-commit mailing list