Can't install Blade plugin with Composer

I’m not sure if this is a Kirby issue or a plugin developer issue… running composer update some times breaks a site, and I think it coincided with both a plugin being updated and the Kirby Composer Installer being updated, so I’m not quite sure which one is at fault.

The plugin in question is the Kirby Blade plugin by @beebmx which keeps telling me that it cant find the vendor autoload (It worked fine until yesterday). I have posted an issue on the plugins repo, but as I say, im not sure if it is the plugin or the Kirby Composer installer causing the problem.

@lukasbestle this is a ping :slight_smile: I’m not using a custom folder setup.

The last update to our Composer installer that changed anything in relation to plugin installation was 1.1.3, which was a week ago.

I have taken a look at the Blade plugin and it looks like the plugin is causing this.


@beebmx You are using our getkirby/composer-installer as well as composer/installers at the same time. This is not supported.

I recommend to use no installer for now and then re-enable getkirby/composer-installer when our Pluginkit is out (which needs a few changes to your plugin). The getkirby/composer-installer is only supported for Pluginkit plugins.

composer/installers is not supported for Kirby 3 plugins at all.

Thanks @lukasbestle . Guess I will just have to wait for @beebmx to take care of it.

I know that Bastian tweeted about this plugin a couple of days ago, so there may be questions from others about it… :frowning:

There are several plugins with Composer configuration that is not 100 % working, but that’s because there wasn’t good documentation on this until now. :slight_smile:

With the Pluginkit, this will fortunately change soon. We will also support plugin devs with the migration of their plugins. But as long as devs don’t use the Composer installer for plugins that are not built with the Pluginkit, it should all work well in the transition period.

Absolutely! It’s early days still really, there are bound to be some bumps in the road. You guys are doing an awesome job :slight_smile:

1 Like

Oh, BTW: You can try to downgrade the plugin to its 1.0.0 release, that should at least not throw an error. The bug that causes the error has been introduced in the plugin release 1.0.1.

Yep… been down that road already and found a new bump :slight_smile: It gets past the autoload issue but results in a whoops because the blade plugin cant find a class it depends on in an external dependency, despite it being installed.

Oh well. :man_shrugging:

Edit: Ah, I know where that comes from: The plugin’s dependencies are set up as require-dev, which means that they won’t be installed if the plugin is installed with Composer. @beebmx

I think the issue is fixed in 1.0.2 and is live.

You’re right. But the illuminate/view or Blade package has big big problems with Kirby, because both use same helpers (like e helper).

illuminate/view should be in the composer require section, but composer load the Blade package before Kirby it throw so many errors, I have to put that package in the require-dev dependencies just for control and include it all the vendor resources.

This is awful but, for now is the best solution.

1 Like

Ah, OK. That’s unfortunate, but makes sense. :slight_smile:

@beebmx Thanks for trying fix it, but no dice I am afraid with version 1.0.2…

Whoops \ Exception \ ErrorException (E_ERROR)
Class 'Jenssegers\Blade\Blade' not found

It’s now finally fixed.

2 Likes