Skip to content

Add CI workflow and Dependabot configuration#4

Merged
Yourfiyan merged 1 commit into
mainfrom
ci-dependabot
Mar 8, 2026
Merged

Add CI workflow and Dependabot configuration#4
Yourfiyan merged 1 commit into
mainfrom
ci-dependabot

Conversation

@Yourfiyan
Copy link
Copy Markdown
Owner

Changes

  • CI (.github/workflows/ci.yml): PHP 8.2 syntax check on all .php files
  • Dependabot (.github/dependabot.yml): Weekly github-actions updates

- CI: PHP 8.2 syntax check on all .php files
- Dependabot: github-actions weekly updates
Copilot AI review requested due to automatic review settings March 8, 2026 12:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds basic automation to the repo via GitHub Actions CI and Dependabot, aiming to keep GitHub Actions dependencies updated and to gate changes on a PHP syntax check.

Changes:

  • Add a GitHub Actions workflow to run a PHP 8.2 syntax lint across repository .php files (excluding vendor/).
  • Add a Dependabot configuration for weekly github-actions updates.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml Introduces a CI workflow intended to run php -l against all PHP files on pushes/PRs to main.
.github/dependabot.yml Enables weekly Dependabot PRs for GitHub Actions dependency updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
php-version: "8.2"

- name: Check PHP syntax
run: find . -name "*.php" -not -path "./vendor/*" -exec php -l {} \;
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The find ... -exec php -l ... \; command does not cause the step to fail when php -l returns a non-zero status (find's overall exit code is based on find errors, not predicate results). As a result, PHP syntax errors may not fail CI. Update the step to explicitly propagate failures (e.g., loop over files with set -e, or pipe find -print0 into xargs and rely on xargs' non-zero exit).

Suggested change
run: find . -name "*.php" -not -path "./vendor/*" -exec php -l {} \;
run: find . -name "*.php" -not -path "./vendor/*" -print0 | xargs -0 -n1 php -l

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
branches: [main]

jobs:
php-syntax:
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an explicit permissions: block (e.g., contents: read) to the workflow/job. GitHub Actions defaults can be broader than necessary and explicit minimal permissions helps avoid future permission-related breakages and follows GitHub's recommended hardening guidance.

Suggested change
php-syntax:
php-syntax:
permissions:
contents: read

Copilot uses AI. Check for mistakes.
@Yourfiyan Yourfiyan merged commit 35e910b into main Mar 8, 2026
5 checks passed
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