beberlei / composer-monorepo-plugin

Integrates Composer into monolithic repositories with many packages.
MIT License
304 stars 41 forks source link

The plugin is not compatible with the last release of composer #77

Closed sukei closed 2 years ago

sukei commented 2 years ago

Composer 2.3.4 & PHP 8.1.4

There are some incompatibilities with method signatures.

Fatal error: Declaration of 
       Monorepo\Composer\EventDispatcher::dispatch($eventName, ?Composer\EventDispatcher\Event $event = null) must be compatible with 
Composer\EventDispatcher\EventDispatcher::dispatch(?string $eventName, ?Composer\EventDispatcher\Event $event = null): int
in vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Composer/EventDispatcher.php on line 9

Some abstract method are not implemented too:

Composer\Repository\InstalledRepositoryInterface::getDevMode()

beberlei commented 2 years ago

I am not actively using this plugin myself at the moment, could someone maybe provide a PR?

richardeyre commented 2 years ago

PR #76 suggests it was created for forward compatibility with this issue.

qualeo commented 2 years ago

I am not actively using this plugin myself at the moment, could someone maybe provide a PR?

@beberlei Are you actively using another method/strategy (Bazel? Other?) to manage symfony monorepos?

qualeo commented 2 years ago

@beberlei @sukei it appears @Seldaek may have already submitted a PR to fix this issue:

https://github.com/beberlei/composer-monorepo-plugin/pull/76

beberlei commented 2 years ago

Merged that one without verify for now.

qualeo commented 2 years ago

@beberlei @sukei I just confirmed the merge and appears to be working now. Thanks Ben!

$ php --version
PHP 8.1.5 (cli) (built: Apr 21 2022 10:15:06) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies
$ composer --version
Composer version 2.3.5 2022-04-13 16:43:00
$ composer show
beberlei/composer-monorepo-plugin dev-master b9dd9b6
$ composer show beberlei/composer-monorepo-plugin
name     : beberlei/composer-monorepo-plugin
descrip. : 
keywords : 
versions : * dev-master
type     : composer-plugin
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : 
source   : [git] https://github.com/beberlei/composer-monorepo-plugin.git b9dd9b69cbbb29d55d77e620ccced73d08266366
dist     : [zip] https://api.github.com/repos/beberlei/composer-monorepo-plugin/zipball/b9dd9b69cbbb29d55d77e620ccced73d08266366 b9dd9b69cbbb29d55d77e620ccced73d08266366
path     : /home/james/Code/qualeo/qualeo/vendor/beberlei/composer-monorepo-plugin
names    : beberlei/composer-monorepo-plugin

support
issues : https://github.com/beberlei/composer-monorepo-plugin/issues
source : https://github.com/beberlei/composer-monorepo-plugin/tree/master

autoload
psr-0
Monorepo\ => src/main

requires
composer-plugin-api ^2.0

requires (dev)
composer/composer ^2.0.7
phake/phake ^2.2|^3.0
php ^5.5|^7.0|^8.0
phpunit/phpunit ^5|^6|^7|^8|^9
marcosmarcolin commented 2 years ago

@beberlei @qualeo Hello, could you release a version (0.17.6) with this fix if possible? To not use the dev-master in production.

https://github.com/beberlei/composer-monorepo-plugin/issues/78