Skip to content

Commit 52d8172

Browse files
authored
Allow composer autoloading (to coexist) (#9407)
* Replace custom loader in favor of composer native * Load plugins using composer * finish debug_logger plugin * finish markasjunk plugin * finish password plugin * finish enigma plugin * finish managesieve plugin * fix ExtensionInstaller run on first install * fix phpstan "Implicit array creation" in plugin config files * simplify composer.json * keep non-composer autoloading relying on include_path set in plugins * update minimal "roundcube/plugin-installer" version * "plugins.roundcube.net" root-only package repo is not needed * REVERT ALL * fix phpstan "Implicit array creation" in plugin config files * update minimal "roundcube/plugin-installer" version * reland composer.json changes * fix ExtensionInstaller run on first install * Roundcube (non plugin) tests are fine to rely on composer autoload * fix CS of master * not needed until strict composer autoloading * improve comment * revert rcmail_oauth change - fixed in plugin installer * require fixed plugin installer
1 parent d9d51b8 commit 52d8172

File tree

38 files changed

+230
-59
lines changed

38 files changed

+230
-59
lines changed

composer.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"pear/net_sieve": "~1.4.5",
1414
"pear/net_smtp": "~1.10.0",
1515
"pear/pear-core-minimal": "~1.10.1",
16-
"roundcube/plugin-installer": "~0.3.3",
16+
"roundcube/plugin-installer": "~0.3.4",
1717
"roundcube/rtf-html-php": "^2.1"
1818
},
1919
"require-dev": {
@@ -35,6 +35,18 @@
3535
"url": "https://plugins.roundcube.net"
3636
}
3737
],
38+
"autoload": {
39+
"classmap": [
40+
"program/actions/",
41+
"program/include/",
42+
"program/lib/"
43+
]
44+
},
45+
"autoload-dev": {
46+
"classmap": [
47+
"tests/"
48+
]
49+
},
3850
"config": {
3951
"allow-plugins": {
4052
"ergebnis/composer-normalize": true,

plugins/acl/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"acl.php"
21+
]
1722
}
1823
}

plugins/additional_message_headers/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"additional_message_headers.php"
21+
]
1722
}
1823
}

plugins/archive/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3"
21+
"roundcube/plugin-installer": "~0.3.4"
22+
},
23+
"autoload": {
24+
"classmap": [
25+
"archive.php"
26+
]
2227
}
2328
}

plugins/attachment_reminder/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
],
1818
"require": {
1919
"php": ">=7.3.0",
20-
"roundcube/plugin-installer": "~0.3.3"
20+
"roundcube/plugin-installer": "~0.3.4"
21+
},
22+
"autoload": {
23+
"classmap": [
24+
"attachment_reminder.php"
25+
]
2126
}
2227
}

plugins/autologon/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"autologon.php"
21+
]
1722
}
1823
}

plugins/autologout/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
],
1313
"require": {
1414
"php": ">=7.3.0",
15-
"roundcube/plugin-installer": "~0.3.3"
15+
"roundcube/plugin-installer": "~0.3.4"
16+
},
17+
"autoload": {
18+
"classmap": [
19+
"autologout.php"
20+
]
1621
}
1722
}

plugins/database_attachments/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3",
21+
"roundcube/plugin-installer": "~0.3.4",
2222
"roundcube/filesystem_attachments": ">=1.0.0"
23+
},
24+
"autoload": {
25+
"classmap": [
26+
"database_attachments.php"
27+
]
2328
}
2429
}

plugins/debug_logger/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"debug_logger.php",
21+
"runlog/runlog.php"
22+
]
1723
}
1824
}

plugins/emoticons/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3"
21+
"roundcube/plugin-installer": "~0.3.4"
22+
},
23+
"autoload": {
24+
"classmap": [
25+
"emoticons.php"
26+
]
2227
}
2328
}

plugins/enigma/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3",
16+
"roundcube/plugin-installer": "~0.3.4",
1717
"pear/crypt_gpg": "~1.6.3"
18+
},
19+
"autoload": {
20+
"classmap": [
21+
"lib/",
22+
"enigma.php"
23+
]
1824
}
1925
}

plugins/example_addressbook/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"example_addressbook.php",
21+
"example_addressbook_backend.php"
22+
]
1723
}
1824
}

plugins/filesystem_attachments/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3"
21+
"roundcube/plugin-installer": "~0.3.4"
22+
},
23+
"autoload": {
24+
"classmap": [
25+
"filesystem_attachments.php"
26+
]
2227
}
2328
}

plugins/help/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"help.php"
21+
]
1722
}
1823
}

plugins/hide_blockquote/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"hide_blockquote.php"
21+
]
1722
}
1823
}

plugins/http_authentication/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"http_authentication.php"
21+
]
1722
}
1823
}

plugins/identicon/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"require": {
1515
"php": ">=7.3.0",
1616
"ext-gd": "*",
17-
"roundcube/plugin-installer": "~0.3.3"
17+
"roundcube/plugin-installer": "~0.3.4"
18+
},
19+
"autoload": {
20+
"classmap": [
21+
"identicon.php",
22+
"identicon_engine.php"
23+
]
1824
}
1925
}

plugins/identity_select/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"identity_select.php"
21+
]
1722
}
1823
}

plugins/jqueryui/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3"
21+
"roundcube/plugin-installer": "~0.3.4"
22+
},
23+
"autoload": {
24+
"classmap": [
25+
"jqueryui.php"
26+
]
2227
}
2328
}

plugins/krb_authentication/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"krb_authentication.php"
21+
]
1722
}
1823
}

plugins/managesieve/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3",
16+
"roundcube/plugin-installer": "~0.3.4",
1717
"pear/net_sieve": "~1.4.4"
18+
},
19+
"autoload": {
20+
"classmap": [
21+
"lib/",
22+
"managesieve.php"
23+
]
1824
}
1925
}

plugins/markasjunk/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3"
21+
"roundcube/plugin-installer": "~0.3.4"
22+
},
23+
"autoload": {
24+
"classmap": [
25+
"drivers/",
26+
"markasjunk.php"
27+
]
2228
}
2329
}

plugins/new_user_dialog/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"new_user_dialog.php"
21+
]
1722
}
1823
}

plugins/new_user_identity/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"new_user_identity.php"
21+
]
1722
}
1823
}

plugins/newmail_notifier/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"newmail_notifier.php"
21+
]
1722
}
1823
}

plugins/password/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
],
1414
"require": {
1515
"php": ">=7.3.0",
16-
"roundcube/plugin-installer": "~0.3.3"
16+
"roundcube/plugin-installer": "~0.3.4"
17+
},
18+
"autoload": {
19+
"classmap": [
20+
"drivers/",
21+
"password.php"
22+
]
1723
}
1824
}

plugins/reconnect/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
],
1313
"require": {
1414
"php": ">=7.3.0",
15-
"roundcube/plugin-installer": "~0.3.3"
15+
"roundcube/plugin-installer": "~0.3.4"
16+
},
17+
"autoload": {
18+
"classmap": [
19+
"reconnect.php"
20+
]
1621
}
1722
}

plugins/redundant_attachments/composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
],
1919
"require": {
2020
"php": ">=7.3.0",
21-
"roundcube/plugin-installer": "~0.3.3",
21+
"roundcube/plugin-installer": "~0.3.4",
2222
"roundcube/filesystem_attachments": ">=1.0.0"
23+
},
24+
"autoload": {
25+
"classmap": [
26+
"redundant_attachments.php"
27+
]
2328
}
2429
}

0 commit comments

Comments
 (0)