SymfonyCasts / reset-password-bundle

Need a killer reset password feature for your Symfony? Us too!
https://symfonycasts.com
MIT License
465 stars 65 forks source link

Bundle removes maker-bundle #179

Closed cornobils closed 3 years ago

cornobils commented 3 years ago

I cannot install reset-password-bundle, because it removes maker-bundle:

$ composer require symfonycasts/reset-password-bundle
Using version ^1.9 for symfonycasts/reset-password-bundle
./composer.json has been updated
Running composer update symfonycasts/reset-password-bundle
Gathering patches for root package.
Removing package symfony/maker-bundle so that it can be re-installed and re-patched.
  - Removing symfony/maker-bundle (v1.33.0)
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking symfonycasts/reset-password-bundle (v1.9.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing symfonycasts/reset-password-bundle (v1.9.1): Extracting archive
Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package white-october/pagerfanta-bundle is abandoned, you should avoid using it. Use babdev/pagerfanta-bundle instead.
Package zendframework/zend-stdlib is abandoned, you should avoid using it. Use laminas/laminas-stdlib instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 1 recipe (235b68306572f5b23d940c49269869c4)
  - Configuring symfonycasts/reset-password-bundle (>=1.0): From github.com/symfony/recipes:masterExecuting script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#54
!!    #message: """
!!      Attempted to load class "MakerBundle" from namespace "Symfony\Bundle\MakerBundle".\n
!!      Did you forget a "use" statement for another namespace?
!!      """

but when installing back maker-bundle, it removes reset-password-bundle:

$ composer require symfony/maker-bundle --dev
Using version ^1.33 for symfony/maker-bundle
./composer.json has been updated
Running composer update symfony/maker-bundle
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading symfony/maker-bundle (v1.23.0 => v1.33.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 1 removal
  - Downloading symfony/maker-bundle (v1.33.0)
  - Removing symfonycasts/reset-password-bundle (v1.9.1)
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing symfony/maker-bundle (v1.33.0): Extracting archive
  - Applying patches for symfony/maker-bundle
    https://raw.githubusercontent.com/vklux/maker-bundle-force-annotation/master/maker-force-annotation-flag.patch (Provide flag to force annotation in make entity command)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/vklux/maker-bundle-force-annotation/master/maker-force-annotation-flag.patch

Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package white-october/pagerfanta-bundle is abandoned, you should avoid using it. Use babdev/pagerfanta-bundle instead.
Package zendframework/zend-stdlib is abandoned, you should avoid using it. Use laminas/laminas-stdlib instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
2 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 1 recipe (a0ca6cd827e24a44abedf9d4dafd38f8)
  - Unconfiguring symfonycasts/reset-password-bundle (>=1.0): From github.com/symfony/recipes:master
Executing script cache:clear [OK]
Executing script assets:install public [OK]

Nothing to unpack

Symfony 4.4.16, windows 10 x64, php 7.4.21

jrushlow commented 3 years ago

Howdy @doctorx32 - It looks like composer is attempting to upgrade symfony/maker-bundle while its attempting to install the symfonycasts/reset-password-bundle. The error you're getting is because composer removes, maker-bundle, installs reset-password-bundle, then attempts to install the recipe for reset-password-bundle. This obviously fails because make-bundle has not yet been reinstalled.

Try updating your project dependencies, or at the very least symfony/maker-bundle before you attempt to install the reset-password-bundle

$> composer upgrade
....
$> composer require symfonycasts/reset-password-bundle

I cannot say I have come across this situation before myself. Let me know if you still run into issues after upgrading the project dependencies.

cornobils commented 3 years ago

It worked, thank you for so great explanation!