1

I got this error when I try "composer update":

Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package sebastian/resource-operations is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
126 packages you are using are looking for funding.
Use the `composer fund` command to find out more!  
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: ext\pdo_mysql.so (Le module spécifié est introuvable.), ext\php_pdo_mysql.so.dll (Le module spécifié est introuvable.)) in Unknown on line 0
!!  PHP Fatal error:  Class ContainerVzfKDDX\Paginator_f262b94 may not inherit from final class (Knp\Component\Pager\Paginator) in C:\Users\afpa\Desktop\Git_repo\boomerang\var\cache\dev\ContainerVzfKDDX\App_KernelDevDebugContainer.php on line 13157
!!  Symfony\Component\ErrorHandler\Error\FatalError {#88
!!    -error: array:4 [
!!      "type" => 64
!!      "message" => "Class ContainerVzfKDDX\Paginator_f262b94 may not inherit from final class (Knp\Component\Pager\Paginator)"
!!      "file" => "C:\Users\afpa\Desktop\Git_repo\boomerang\var\cache\dev\ContainerVzfKDDX\App_KernelDevDebugContainer.php"
!!      "line" => 13157
!!    ]
!!    #message: "Compile Error: Class ContainerVzfKDDX\Paginator_f262b94 may not inherit from final class (Knp\Component\Pager\Paginator)"
!!    #code: 0
!!    #file: "C:\Users\afpa\Desktop\Git_repo\boomerang\var\cache\dev\ContainerVzfKDDX\App_KernelDevDebugContainer.php"
!!    #line: 13157
!!  }
!!

Script @auto-scripts was called via post-update-cmd

I tried "composer require symfony/knp-paginator-bundle" and got this error:

[InvalidArgumentException] Could not find a matching version of package symfony/knp-paginator-bundle. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (de
v).

this is what have in composer.json :

"knplabs/knp-paginator-bundle": "^5.6.0"

I'm new to Symfony and on this project, I don't understand why I have this error.

  • 1
    Please copy and paste the text directly into the question. Text within images is not searchable and will not help future users with the same error, find this question. Also it is very hard to read the image without opening it in a new tab. We (the people trying to help you) also cannot easily copy and google the key parts of the text. The easier you make it to help, the more help you are likely to receive. – Arleigh Hix Sep 06 '21 at 16:59
  • The `cache:clear` error `(may not inherit from final class (Knp\Component\Pager\Paginator)` from the `auto-scripts` is caused by not clearing the cache prior to updating your composer library files. As a result the symfony command attempts to execute with the originally compiled services, where their signatures have since changed to `final` in the newer version. Shutdown your webserver and manually delete your `var/cache/dev` directory before running `composer update|install|require|remove`. Then restart your webserver after composer has completed. – Will B. Sep 07 '21 at 22:27
  • The `Could not find a matching version of package symfony/knp-paginator-bundle`, is caused because `symfony` does not maintain the `knp-paginator-bundle`, `knplabs` does. So it should be `composer require knplabs/knp-paginator-bundle`, which is already instealled. – Will B. Sep 07 '21 at 22:29

0 Answers0