Skip to content

Cannot uninstall 3th party module. Magento reads location of composer.json wrong #9248

@PascalBrouwers

Description

@PascalBrouwers

Preconditions

  1. Magento 2.1.x
  2. PHP 7.0.14
  3. MySQL 5.7.16

Steps to reproduce

  1. Have a custom module with the following structure.
  • composer.json
  • registration.php
  • src
  1. in registration.php have the dir as: __DIR__.'/src'
  2. in composer.json have psr-4 as: "Vendor\\Module\\": "src/"
  3. have some installSchema, installData file in src\Setup
  4. have a Uninstall file in src\Setup
  5. run: bin/magento module:uninstall Vendor_Module --remove-data

Expected result

  1. It should properly find the composer.json file and uninstall the module

Actual result

  1. Exits with error: Vendor_Module is not an installed composer package

But if you add a composer.json file to src/ then it will uninstall the module, but this is not where the composer.json file should be for 3rd modules.

Related issues:
#7064
#3290

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: doneReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.help wantedstale issue

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions