Skip to content

Fix Nextcloud 33 compatibility and harmonize workflows#112

Merged
ashcoft merged 4 commits into
masterfrom
fix/nc33-compatibility-and-workflows-16460799255086214259
May 19, 2026
Merged

Fix Nextcloud 33 compatibility and harmonize workflows#112
ashcoft merged 4 commits into
masterfrom
fix/nc33-compatibility-and-workflows-16460799255086214259

Conversation

@ashcoft

@ashcoft ashcoft commented May 18, 2026

Copy link
Copy Markdown
Owner

This PR addresses the CI failures and ensures compatibility with Nextcloud 33 and PHP 8.2.

Key changes:

  • Dependency Fix: Resolved a conflict where symfony/string was attempting to use v8.x (requiring PHP 8.4) by downgrading it to v7.x in composer.lock.
  • NC33 Compatibility: Updated appinfo/info.xml and composer.json to explicitly target PHP 8.2 and Nextcloud 33.
  • Workflow Harmonization: Standardized GitHub Actions workflows to use consistent pinned hashes and version tags.
  • Static Analysis Fix: Corrected a syntax error in psalm.xml that was breaking static analysis.
  • Testing Fix: Updated the namespace in tests/unit/ApplicationTest.php to comply with PSR-4 as defined in composer.json.
  • Documentation: Added AGENTS.md to provide durable context and instructions for future AI agent interventions.

Verified that npm install --legacy-peer-deps works and npm test passes. Backend dependencies are now resolvable on PHP 8.2.


PR created automatically by Jules for task 16460799255086214259 started by @ashcoft

Summary by CodeRabbit

  • Chores

    • Updated CI workflow setup and install commands for consistency (PHP action comments, npm install behavior).
    • Added development guidelines and new dev-tooling configurations (linters, formatters, static analysis).
    • Cleared cached test results.
  • Tests

    • Reorganized test namespaces for clearer test structure.
  • Style

    • Minor stylesheet breakpoint and loading spinner styling tweaks.
  • New Features

    • Viewer now exposes a default index route that renders the main view.

Review Change Stack

- Downgrade symfony/string to v7.x in composer.lock for PHP 8.2 compatibility
- Update appinfo/info.xml and composer.json to target PHP 8.2
- Fix syntax error and update phpVersion in psalm.xml
- Fix PSR-4 namespace in tests/unit/ApplicationTest.php
- Harmonize GitHub Actions workflows with consistent hashes and tags
- Create AGENTS.md with project-specific agent instructions

Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR standardizes CI setup-php comments/pins, switches numerous workflows from npm ci to npm install --legacy-peer-deps, adds developer tooling configs (phpstan, rector, php-cs-fixer, stylelint), reformats PHP files and tests, tweaks UI/styles, and adds AGENTS.md.

Changes

Repository maintenance and tooling updates

Layer / File(s) Summary
PHP setup action updates
.github/workflows/lint-php.yml, .github/workflows/psalm.yml, .github/workflows/rector.yml, .github/workflows/phpstan.yml
Update inline comments and pinned references for shivammathur/setup-php across CI workflows.
npm install behavior across workflows
.github/workflows/* (multiple workflows)
Replace npm ci with npm install --legacy-peer-deps in many workflow install/build steps.
Dev tooling and static analysis configs
composer.json, phpstan.neon, rector.php, .php-cs-fixer.dist.php, package.json
Add/adjust dev dependencies and scripts; configure PHPStan, Rector, and PHP-CS-Fixer.
PHP formatting & controllers
lib/AppInfo/Application.php, lib/Controller/*, lib/Listener/LoadViewer.php
Reformat PHP brace/style; add ViewController::index(); preserve existing controller/listener logic.
Tests and PHPUnit cache
tests/unit/ApplicationTest.php, tests/.phpunit.cache/test-results
Change test namespace/formatting and clear PHPUnit cached test-results entry.
Assets, stylelint, and UI tweaks
css/cad-viewer.css, src/App.vue, stylelint.config.js, appinfo/routes.php
Update media query syntax and spinner color format; add Stylelint config and lint script changes; minor PHP header formatting.
Agent documentation and psalm format
AGENTS.md, psalm.xml
Add AGENTS.md with repo guidance for AI agents and adjust psalm.xml root tag formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ci, dependencies, tests, documentation

Poem

🐰
I hopped through workflows, tidy and spry,
Tweaked installs and lint, gave configs a try.
New docs in my pouch, style rules in a stack,
A spinner that glows and controllers kept track.
Hop, review, merge — then I’ll nap on the track.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the two main objectives: fixing Nextcloud 33 compatibility and harmonizing workflows. It directly reflects the primary changes across the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nc33-compatibility-and-workflows-16460799255086214259

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/App.vue

Parsing error: Unexpected token ViewerInstance


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

google-labs-jules Bot and others added 3 commits May 18, 2026 12:53
- Resolve frontend dependency conflict by downgrading jest-watch-typeahead
- Use --legacy-peer-deps for npm installation in CI and local dev
- Update metadata to target PHP 8.2 and Nextcloud 33
- Add and configure php-cs-fixer and phpstan for static analysis
- Harmonize GitHub Actions workflows with consistent hashes and tags
- Fix PSR-4 namespace in tests and composer.json
- Fix syntax error in psalm.xml
- Add AGENTS.md with durable development instructions

Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com>
- Resolve frontend dependency conflicts in package.json
- Establish PHP quality tools: php-cs-fixer, phpstan, rector
- Fix PSR-4 namespace violations in tests
- Correct syntax and versioning in psalm.xml
- Harmonize GitHub Actions workflows with consistent pinned hashes
- Add AGENTS.md for durable development context
- Configure stylelint for Vue and CSS components

Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com>
- Add stylelint, phpstan, and rector to CI workflows and local scripts
- Switch from 'npm ci' to 'npm install --legacy-peer-deps' in all workflows to resolve peer dependency conflicts
- Downgrade jest-watch-typeahead to v2.2.2 for Jest 29 compatibility
- Fix PSR-4 namespace discovery for unit tests
- Correct syntax error in psalm.xml
- Add AGENTS.md with development guidelines for AI agents
- Establish baseline configurations for phpstan, php-cs-fixer, and stylelint

Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.github/workflows/appstore-build-publish.yml (1)

117-117: 🏗️ Heavy lift

Add an inline comment explaining why --legacy-peer-deps is needed.

While the rationale is documented in the commit message, the code lacks inline documentation for why npm install --legacy-peer-deps replaces the more deterministic npm ci. This makes the decision less discoverable for future maintainers.

Add a brief comment above line 117:

          cd ${{ env.APP_NAME }}
+         # Using --legacy-peer-deps to resolve peer dependency conflicts
          npm install --legacy-peer-deps

Consider also tracking a TODO to resolve the underlying peer dependency conflicts properly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/appstore-build-publish.yml at line 117, Add an inline
comment above the npm install step that explains why npm install
--legacy-peer-deps is used instead of the deterministic npm ci (i.e., to bypass
current peerDependency conflicts in the dependency tree), and include a short
TODO note to resolve those peer dependency issues upstream; reference the exact
command string (--legacy-peer-deps) and the replaced command name (npm ci) so
reviewers can easily find and later remove the workaround.
.github/workflows/node-test.yml (1)

82-87: ⚡ Quick win

Use npm ci --legacy-peer-deps in CI for deterministic installs.

npm install can make dependency resolution less reproducible between runs. Since the workflow specifies npm v11 (package.json engines constraint), use npm ci --legacy-peer-deps to maintain deterministic installs while preserving the peer-deps workaround.

Proposed change
-          npm install --legacy-peer-deps
+          npm ci --legacy-peer-deps
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/node-test.yml around lines 82 - 87, Update the CI step
named "Install dependencies & build" to use a deterministic install: replace the
`npm install` invocation with `npm ci --legacy-peer-deps` while keeping the
existing environment variable `CYPRESS_INSTALL_BINARY: 0` and the subsequent
`npm run build --if-present` command; this ensures reproducible installs in the
workflow step that currently runs under the npm v11 constraint.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/appstore-build-publish.yml:
- Line 117: Add an inline comment above the npm install step that explains why
npm install --legacy-peer-deps is used instead of the deterministic npm ci
(i.e., to bypass current peerDependency conflicts in the dependency tree), and
include a short TODO note to resolve those peer dependency issues upstream;
reference the exact command string (--legacy-peer-deps) and the replaced command
name (npm ci) so reviewers can easily find and later remove the workaround.

In @.github/workflows/node-test.yml:
- Around line 82-87: Update the CI step named "Install dependencies & build" to
use a deterministic install: replace the `npm install` invocation with `npm ci
--legacy-peer-deps` while keeping the existing environment variable
`CYPRESS_INSTALL_BINARY: 0` and the subsequent `npm run build --if-present`
command; this ensures reproducible installs in the workflow step that currently
runs under the npm v11 constraint.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 266edd2e-da7e-4d00-9607-662a7887e4db

📥 Commits

Reviewing files that changed from the base of the PR and between 9185661 and 7e5a433.

⛔ Files ignored due to path filters (2)
  • composer.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (27)
  • .github/workflows/appstore-build-publish.yml
  • .github/workflows/command-compile.yml
  • .github/workflows/command-openapi.yml
  • .github/workflows/cypress.yml
  • .github/workflows/documentation.yml
  • .github/workflows/lint-eslint.yml
  • .github/workflows/lint-stylelint.yml
  • .github/workflows/lint-typescript.yml
  • .github/workflows/node-test.yml
  • .github/workflows/npm-audit-fix.yml
  • .github/workflows/npm-build.yml
  • .github/workflows/openapi.yml
  • .github/workflows/phpstan.yml
  • .php-cs-fixer.dist.php
  • appinfo/routes.php
  • composer.json
  • css/cad-viewer.css
  • lib/AppInfo/Application.php
  • lib/Controller/FileController.php
  • lib/Controller/ViewController.php
  • lib/Listener/LoadViewer.php
  • package.json
  • phpstan.neon
  • rector.php
  • src/App.vue
  • stylelint.config.js
  • tests/unit/ApplicationTest.php
✅ Files skipped from review due to trivial changes (9)
  • appinfo/routes.php
  • .github/workflows/phpstan.yml
  • lib/Listener/LoadViewer.php
  • rector.php
  • src/App.vue
  • stylelint.config.js
  • .php-cs-fixer.dist.php
  • lib/Controller/FileController.php
  • tests/unit/ApplicationTest.php

@ashcoft ashcoft merged commit adb6cee into master May 19, 2026
12 of 15 checks passed
@ashcoft ashcoft deleted the fix/nc33-compatibility-and-workflows-16460799255086214259 branch May 20, 2026 18:47
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.

1 participant