testing-php

tarafından automattic

PHP lint denetimini çalıştırarak sözdizimi hatalarını yakalamak için yönergeler.

npx skills add https://github.com/automattic/data-liberation-agent --skill testing-php

When to use me

Use this skill when validating PHP files for syntax errors. Do not use this skill for JavaScript or CSS validation.

Step 1: Identify PHP files

Find all PHP files in the project, excluding vendor/, node_modules/, and build/ directories:

find . -name "*.php" -not -path "*/vendor/*" -not -path "*/node_modules/*" -not -path "*/build/*"

Step 2: Run PHP syntax check

Check each PHP file for syntax errors using php -l:

php -l <file>
  • A file with valid syntax prints No syntax errors detected in <file> and exits 0.
  • A file with syntax errors prints the error message with line number and exits non-zero.
  • Fix any syntax errors found by editing the file, then re-run php -l to confirm.

Rules

  • Syntax only: This skill checks for PHP syntax errors. Do not run PHPCS or other coding standard tools.
  • Max 3 cycles: Run at most 3 fix-then-retest cycles per file. If issues remain after 3 cycles, report them as unresolved.
  • Never modify business logic: Only fix syntax errors. Do not change how the code works.
  • Report format: After testing, report results as:
    • PASS: No syntax errors
    • FAIL: List remaining errors with file, line, and message

automattic tarafından daha fazla skill

wp-phpstan
automattic
WordPress projelerinde (eklenti/tema/site) PHPStan statik analizini yapılandırırken, çalıştırırken veya düzeltirken kullanın: phpstan.neon kurulumu, temel dosyalar,…
official
wp-playground
automattic
WordPress Playground iş akışları için kullanın: tarayıcıda veya yerel olarak @wp-playground/cli (sunucu, run-blueprint, build-snapshot) ile hızlı, geçici WP örnekleri,…
official
wp-plugin-development
automattic
WordPress eklentileri geliştirirken kullanılır: mimari ve hook’lar, etkinleştirme/devre dışı bırakma/kaldırma, yönetici arayüzü ve Ayarlar API’si, veri depolama, cron/görevler, güvenlik…
official
wp-project-triage
automattic
Bir WordPress deposunun (eklenti/tema/blok teması/WP çekirdeği/Gutenberg/tam site) araçlar/testler/sürüm… dahil deterministik bir incelemesine ihtiyaç duyduğunuzda kullanın.
official
wp-rest-api
automattic
WordPress REST API uç noktalarını/yollarını oluştururken, genişletirken veya hata ayıklarken kullanın: register_rest_route, WP_REST_Controller/kontrolcü sınıfları, şema/argüman…
official
wp-wpcli-and-ops
automattic
WP-CLI (wp) ile WordPress işlemleri yaparken kullan: güvenli arama-değiştirme, veritabanı dışa/içe aktarma, eklenti/tema/kullanıcı/içerik yönetimi, cron, önbellek temizleme,…
official
wpds
automattic
WordPress Tasarım Sistemi (WPDS) ve bileşenleri, tokenları, desenleri vb. kullanarak arayüzler oluştururken kullanın.
official
woocommerce-finalize
automattic
WooCommerce eklentileri için yayın öncesi kod sağlığı ve izlenebilirlik denetimi. Kod incelemesinden sonra çalışır -- ölü kod, tekrarlar, yapısal karmaşıklık ve...
official