@FNGR2911 New version 1.5.0 released
Please report any errors, omissions and suggestions without hesitation
@FNGR2911 New version 1.5.0 released
Please report any errors, omissions and suggestions without hesitation
Hi @ahmetbora,
after updating the plugin now via the main composer file in the root folder, I get again this warning:
**Fatal error** : Cannot redeclare e() (previously declared in /Users/takikiometzis/code/thd/vendor/illuminate/support/helpers.php:607) in **/Users/takikiometzis/code/thd/kirby/config/helpers.php** on line **154**
I did as stated in the document.
Can you share your composer.json file?
Here is my composer file. Just for sure, I deleted the whole vendor folder and installed composer again
{
“name”: “getkirby/starterkit”,
“description”: “Kirby Starterkit”,
“type”: “project”,
“keywords”: [“kirby”, “cms”, “starterkit”],
“homepage”: “https://getkirby.com”,
“authors”: [
{
“name”: “Bastian Allgeier”,
“email”: “bastian@getkirby.com”,
“homepage”: “https://getkirby.com”
}
],
“support”: {
“email”: “support@getkirby.com”,
“issues”: “https://github.com/getkirby/starterkit/issues”,
“forum”: “https://forum.getkirby.com”,
“source”: “https://github.com/getkirby/starterkit”
},
“require”: {
“php”: “>=7.1.0”,
“getkirby/cms”: “^3.0”,
“afbora/kirby-blade”: “^1.5”
},
“config”: {
“optimize-autoloader”: true
}
}
I get the some error as @TakioTk
This is not related to the plugin, the illuminate/support
helpers.php file is loaded before the kirby
setup.php file.
vendor/composer/autoload_static.php
public static $files = array (
'...' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'...' => __DIR__ . '/..' . '/illuminate/support/helpers.php',
'...' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
'...' => __DIR__ . '/../..' . '/site/plugins/kirby-blade/helpers.php',
'...' => __DIR__ . '/../..' . '/kirby/config/setup.php',
);
Can we find a more general solution? @texnixe @distantnative @lukasbestle @bastianallgeier
Unfortunately no. Libraries that define the same helpers are not compatible with each other.
The only thing you could do is to include the library manually instead of loading it via Composer and then only load the files you actually need. You can then ignore the files that cause conflicts.
Are the Kirby helpers used internally?
If not, one solution would be either wrapping helpers with function_exists
(assumes you know what you’re doing) or make helpers completely optional (which also assumes you know what you’re doing, but you have to be explicit about it)?
if so, then the Blade plugin could have config = ['helpers' => false]
as an installation instruction and simply include the helpers itself in the correct order.
Yes, they are.