Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 2, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides GitHub Copilot coding agents with detailed instructions for working effectively in the parser-reflection repository.

What's Included

The instructions provide complete guidance for:

Build Process with Validated Commands:

  • PHP environment setup (requires PHP >=8.2)
  • Composer dependency installation with proper timeout handling
  • Complete build validation and testing procedures

Critical Build Issues Addressed:

  • Documents the GitHub API rate limit issue that causes standard composer install to fail
  • Provides working solution: composer install --prefer-source --no-interaction
  • Includes explicit timing expectations (15-25 minutes) with "NEVER CANCEL" warnings

Development Workflow:

  • Test execution (vendor/bin/phpunit - 10,579 tests in ~6 seconds)
  • Code quality tools (PHPStan static analysis, Rector code improvements)
  • Library functionality validation with working test scenarios

Repository Context:

  • Project structure overview (30 source files, 37 test files)
  • Key dependencies (nikic/php-parser, PHPUnit)
  • Library purpose and deprecation status (favor BetterReflection for new projects)

Troubleshooting Guide:

  • Network connectivity issues and authentication problems
  • Memory configuration requirements
  • Common error scenarios and solutions

Validation

Every command in the instructions has been tested and validated:

  • All build commands work exactly as documented
  • Timing measurements are accurate with appropriate safety buffers
  • Test scenarios successfully demonstrate library functionality
  • Troubleshooting steps address real issues encountered during validation

The instructions follow the imperative tone requirement and prioritize working commands over verbose explanations, ensuring agents can copy-paste commands that work reliably every time.

Fixes #149.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/pLBE8m /usr/bin/composer install --no-dev (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)
  • https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TsiH9l /usr/bin/composer install --no-interaction --no-progress (http block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for parser-reflection repository Sep 2, 2025
Copilot AI requested a review from lisachenko September 2, 2025 14:55
@lisachenko lisachenko marked this pull request as ready for review September 2, 2025 15:11
@lisachenko lisachenko merged commit 3814312 into master Sep 2, 2025
12 checks passed
@lisachenko lisachenko deleted the copilot/fix-149 branch September 2, 2025 15:14
@scrutinizer-notifier
Copy link

The inspection completed: No new issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

3 participants