This file provides context for AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.) working in this repository.
- Product family: ownCloud Classic — migration tooling
- Purpose: ownCloud app that migrates users, groups, files and shares from ownCloud Classic to ownCloud Infinite Scale (oCIS).
- Primary language: PHP (>= 8.3)
- Build system: Composer, Make
- Test framework: PHPUnit (unit), Docker-based end-to-end acceptance tests
- CI system: GitHub Actions (plus Drone)
appinfo/- ownCloud app metadata (info.xml,app.php,install.php)lib/- PHP source codelib/Command/-occCLI command handlers (the migration steps)lib/MigrationState/- migration state machinelib/OCIS/- oCIS REST API clientlib/Helper/- utility classes (users, groups, storage, permissions)lib/ConflictLog/- conflict logging
bin/rclone_linux_amd64- bundled rclone binary used for file migrationtests/unit/- PHPUnit unit teststests/acceptance/- Docker-based end-to-end tests (ownCloud Classic + oCIS)composer.json- PHP dependencies and app metadataphpstan.neon- PHPStan configuration.php-cs-fixer.dist.php- php-cs-fixer (ownCloud code style) configurationMakefile- build and test automation
- Branching: master
- Commit messages: Must follow Conventional Commits format (PR titles are checked by CI). Commits must be DCO signed-off — see the Git Workflow section below.
- Code style: php-cs-fixer with the ownCloud coding standard.
- PR process: Open a PR against master. All CI checks must pass.
# Build (install all dependencies)
make
# Test (PHP unit)
make test-php-unit
# Lint (PHP code style, dry-run)
make test-php-style
# Fix code style
make test-php-style-fix
# Static analysis
make test-php-phpstan
make test-php-phan
# End-to-end acceptance tests (Docker: ownCloud Classic + oCIS)
make test-acceptance- This project is licensed under the Apache License 2.0. All code contributions must be compatible with Apache-2.0.
- Do not introduce dependencies under licenses incompatible with Apache-2.0 (Apache "Category X": GPL, AGPL, LGPL, etc.) without explicit discussion in an issue first. See the ASF third-party license policy.
- Do not introduce new dependencies without discussion in an issue first.
- Conventional Commits are enforced by CI.
- Only use actions owned by
owncloud, created by GitHub (actions/*), verified on the GitHub Marketplace, or verified by the ownCloud Maintainers. - Pin third-party actions to their full commit SHA (not tags):
uses: actions/checkout@<SHA> # vX.Y.Z. ownCloud's own reusable workflows (owncloud/reusable-workflows) may track@main. - Never introduce actions from unverified third parties.
- Dependabot is configured for automated dependency updates (
.github/dependabot.yml). - Review and merge Dependabot PRs as part of regular maintenance.
- Rebase policy: Always rebase; never create merge commits. Use
git pull --rebaseandgit rebasebefore pushing. - Signed commits: All commits must be signed, using either GPG or SSH (
git commit -S -s). - DCO sign-off: Every commit needs a
Signed-off-byline (git commit -s). This is enforced by the DCO check on pull requests — PRs cannot merge until all commits are signed off. SeeCONTRIBUTING.md. - Conventional Commits: Use the Conventional Commits format. A reusable GitHub Actions workflow enforces this on commit messages and PR titles.
- Match existing code style.
- Do not refactor unrelated code in the same PR.
- Write tests for new functionality.
- Keep PRs focused and atomic.
- Use Conventional Commits format for all commit messages.