Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 23, 2025

This PR adds a .github/copilot-setup-steps.yml file to customize GitHub Copilot's coding agent environment, following the best practices outlined in GitHub's documentation.

What this enables

The copilot-setup-steps.yml file ensures that GitHub Copilot has access to the same development environment as our CI pipeline, including:

  • PHP 8.4+ - Critical requirement for this project due to property hooks syntax
  • Composer dependency management - All development tools and libraries
  • Development toolchain - php-cs-fixer, PHPStan, PHPUnit, composer-dependency-analyser
  • Performance optimization - Composer package caching using the same strategy as CI

Implementation details

The setup file mirrors our CI workflow (.github/workflows/ci.yml) but focuses specifically on environment preparation rather than validation:

steps:
  - name: Setup PHP 8.4
    uses: shivammathur/setup-php@v2
    with:
      php-version: '8.4'
      coverage: none
      tools: composer

  - name: Cache Composer packages
    uses: actions/cache@v4
    # ... caching configuration

  - name: Install dependencies
    run: composer install --prefer-dist --no-progress

  - name: Verify development tools are available
    run: |
      vendor/bin/composer-dependency-analyser --version
      vendor/bin/php-cs-fixer --version  
      vendor/bin/phpstan --version
      vendor/bin/phpunit --version
      composer normalize --version

Benefits

With this setup, GitHub Copilot will be able to:

  • Better understand the project's PHP 8.4+ syntax and features
  • Access the same development tools used in CI for code analysis
  • Provide more accurate suggestions based on the project's actual dependencies
  • Understand the coding standards enforced by php-cs-fixer and PHPStan

This follows the project's philosophy of maintaining consistency between development, CI, and now AI-assisted development environments.


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

Co-authored-by: ruudk <104180+ruudk@users.noreply.github.com>
Copilot AI changed the title [WIP] Create copilot-setup-steps.yml based on the current .github/workflows/ci.yml following best practices defined in https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinsta... Add copilot-setup-steps.yml for GitHub Copilot environment customization Aug 23, 2025
Copilot AI requested a review from ruudk August 23, 2025 07:16
Copilot finished work on behalf of ruudk August 23, 2025 07:16
@ruudk ruudk marked this pull request as ready for review August 23, 2025 07:17
@ruudk ruudk merged commit 64c182f into main Aug 23, 2025
2 checks passed
@ruudk ruudk deleted the copilot/fix-67549023-d7e2-47c6-b537-32013d3cc26e branch August 23, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants