namae space
fix global namespace replacing
Namaespace هو أمر UTIL لمساحة الاسم PHP. يمكّنك هذا الأمر من العثور على مساحة الاسم واستبداله باستخدام تحليل ثابت.

composer require --dev gong023/namae-space
namaespace find -C $HOME/your/project # path to your project composer.json
-F Name\YourClass # Name what you want to find
namaespace command stdouts استخدام Name\YourClass .
انظر --help لمعرفة المزيد.
namaespace replace -C $HOME/your/project # path to your project composer.json
-O Origin\YourOriginClass # Replaced OriginName
-N New\YourNewClass # NewClassName which you want to replace
يجد Command namaespace YourOriginClass ، ثم يحل محله على YourNewClass .
يمكنك تمرير خيار -D أو --dry_run إذا كنت تريد الاختبار قبل استبدالها. انظر --help لمعرفة المزيد.
على عكس IDE ، يمكن لـ Namaespace تغيير مساحة الاسم العالمية ليتم تسميتها.
يجد namaespace مسارات من خلال قراءة Composer.json وتحليل الرموز.
يتم تفويض التحليل بشكل رئيسي إلى Nikic/PHP-Parser. لا داعي للقلق بشأن عدم استقرار Regex.
ويتم تنفيذ التحليل تحت المعالجة المتعددة. يمكنك تمرير خيار -M أو --max_process للتحكم في عدد العملية لأي أوامر.