[php-src] master: Fix incorrect method case for SplFileInfo::getPathname() in gen_stub.php (#22597)

Jorg Adam Sowa via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Jorg Adam Sowa (jorgsowa)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-07-06T18:06:53+01:00

Commit: https://github.com/php/php-src/commit/76c40ecbe33a698899fbb016ad882aed5c093452
Raw diff: https://github.com/php/php-src/commit/76c40ecbe33a698899fbb016ad882aed5c093452.diff

Fix incorrect method case for SplFileInfo::getPathname() in gen_stub.php (#22597)

getPathName() was called instead of the correctly-cased getPathname().

Changed paths:
  M  build/gen_stub.php


Diff:

diff --git a/build/gen_stub.php b/build/gen_stub.php
index 1e1d53c5146c..715a47182340 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -84,7 +84,7 @@ function processDirectory(string $dir, Context $context): array {
         RecursiveIteratorIterator::LEAVES_ONLY
     );
     foreach ($it as $file) {
-        $pathName = $file->getPathName();
+        $pathName = $file->getPathname();
         if (str_ends_with($pathName, '.stub.php')) {
             $pathNames[] = $pathName;
         }
@@ -5561,7 +5561,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
     );
 
     foreach ($it as $file) {
-        $pathName = $file->getPathName();
+        $pathName = $file->getPathname();
         if (!preg_match('/(?:[\w\.]*constants[\w\._]*|tokens).xml$/i', basename($pathName))) {
             continue;
         }
@@ -5742,7 +5742,7 @@ function replaceClassSynopses(
     );
 
     foreach ($it as $file) {
-        $pathName = $file->getPathName();
+        $pathName = $file->getPathname();
         if (!preg_match('/\.xml$/i', $pathName)) {
             continue;
         }
@@ -5959,7 +5959,7 @@ function replaceMethodSynopses(
     );
 
     foreach ($it as $file) {
-        $pathName = $file->getPathName();
+        $pathName = $file->getPathname();
         if (!preg_match('/\.xml$/i', $pathName)) {
             continue;
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.