Skip to content

Commit 2f8d52e

Browse files
authored
Merge pull request #48 from mvorisek/fix_root_install
Fix install in Roundcubemail as root package
2 parents 6661328 + e33f5d4 commit 2f8d52e

3 files changed

Lines changed: 8 additions & 17 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
// also prevent bounding of unwanted variables for GC
5959
'use_arrow_functions' => false,
6060

61-
# TODO
61+
// TODO
6262
'align_multiline_comment' => false,
6363
'array_indentation' => false,
6464
'binary_operator_spaces' => false,

phpstan.neon.dist

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ parameters:
2323
message: '~^Constant RCMAIL_VERSION not found\.$~'
2424
path: 'src/ExtensionInstaller.php'
2525
count: 3
26-
-
27-
message: '~^Call to static method db_init\(\) on an unknown class rcmail_utils\.$~'
28-
path: 'src/ExtensionInstaller.php'
29-
count: 1
30-
-
31-
message: '~^Call to static method db_update\(\) on an unknown class rcmail_utils\.$~'
32-
path: 'src/ExtensionInstaller.php'
33-
count: 1
3426
-
3527
message: '~^Method Roundcube\\Composer\\ExtensionInstaller::install\(\) should return React\\Promise\\PromiseInterface<void\|null>|null but return statement is missing\.$~'
3628
path: 'src/ExtensionInstaller.php'
@@ -43,14 +35,6 @@ parameters:
4335
message: '~^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$~'
4436
path: 'src/ExtensionInstaller.php'
4537
count: 1
46-
-
47-
message: '~^Instantiated class rcube_config not found\.$~'
48-
path: 'src/ExtensionInstaller.php'
49-
count: 1
50-
-
51-
message: '~^Call to method resolve_paths\(\) on an unknown class rcube_config\.$~'
52-
path: 'src/ExtensionInstaller.php'
53-
count: 1
5438
-
5539
message: '~^Call to function in_array\(\) requires parameter #3 to be set\.$~'
5640
path: 'src/PluginInstaller.php'

src/ExtensionInstaller.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ abstract class ExtensionInstaller extends LibraryInstaller
2626

2727
protected function getRoundcubemailInstallPath(): string
2828
{
29+
$rootPackage = $this->composer->getPackage();
30+
if ($rootPackage->getName() === 'roundcube/roundcubemail') {
31+
$this->initializeVendorDir();
32+
33+
return dirname($this->vendorDir);
34+
}
35+
2936
$roundcubemailPackage = $this->composer
3037
->getRepositoryManager()
3138
->findPackage('roundcube/roundcubemail', '*');

0 commit comments

Comments
 (0)