Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer plaform schema gets overwritten with old version #10784

Open
1 task done
andybroomfield opened this issue Oct 14, 2024 · 0 comments
Open
1 task done

Composer plaform schema gets overwritten with old version #10784

andybroomfield opened this issue Oct 14, 2024 · 0 comments
Labels
L: github:actions GitHub Actions L: php:composer Issues and code for Composer T: bug 🐞 Something isn't working

Comments

@andybroomfield
Copy link

andybroomfield commented Oct 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

composer

Package manager version

2.8.1

Language version

PHP

Manifest location and content before the Dependabot update

In project root

dependabot.yml content

version: 2
updates:
  - package-ecosystem: "composer"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
      time: "07:00"
      
    ignore:
      # Don't raise a separate PR for major drupal updates, 
      # Skip as we do these manually
      # Minor updates will be raised as separate PR
      # Only patch updates will be dealt with here
      - dependency-name: "drupal/core*"
        update-types: ["version-update:semver-major"]

    allow:
      # Allow both direct and indirect updates for all packages
      - dependency-type: "all"
    versioning-strategy: lockfile-only      
    
    groups:
      drupal-core-patches:
        patterns:
          - "drupal/core*"
        update-types:
          - "patch"
      contrib-module-updates:
        patterns:
          - "*" 
        exclude-patterns:
          - "drupal/core*"
        update-types:
          - "minor" 
          - "patch"  


  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
      time: "07:00"           

Updated dependency

All

What you expected to see, versus what you actually saw

The plaform section of composer.lock is being changed to the older schema (empty array) and not an object.
I would not expect this section to be updated.

This was noticed as we have a Github action that creates a build using Acquia BLT, which then errors with a dirty repository warning related to this change in composer.lock.

Current workaround is to checkout the dependabot PRs and run composer update --lock and push, which restores the platform schemas.

Native package manager behavior

Since composer 2.8, the platform and platform-dev sections are objects.
composer/composer#12123

Images of the diff or a link to the PR, issue, or logs

Screenshot 2024-10-14 at 1 05 56 PM
-    "platform": {},
-   "platform-dev": {},
+    "platform": [],
+    "platform-dev": [],

Smallest manifest that reproduces the issue

No response

@andybroomfield andybroomfield added the T: bug 🐞 Something isn't working label Oct 14, 2024
@github-actions github-actions bot added L: github:actions GitHub Actions L: php:composer Issues and code for Composer labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: github:actions GitHub Actions L: php:composer Issues and code for Composer T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant