Custom Indexes Error after 2.0 update

I know that latest update breaks BC, but this case wasn’t mentioned in update guide.

Abstract Algolia_Index class was changed in 2.0.0 and upgrade will case fatal errors.

I saw this comment on Github. Is there another version of plugin that provides more stable way of extending main plugin?

Hey there,

Yes the classes changed a lot, but it is mainly simplification.

I think you should be able to adapt your code easily.

What errors are you getting?

Hello @rayrutjes.

Yeah, I read new code base and update isn’t a problem, already updated most of the custom code base.

Just wanted to know, if these are the changes you mentioned in Github comment, or there will be more that might break BC with base abstract classes?

Not exactly,
What I mentioned in the comment is that we are trying to ship some logic as building blocks so that developers can use that directly for building pipelines.

WordPress plugins are pretty limited when it comes to semver, dependency management.

Also it is hard to handle UI upgrades.

That is why we are thinking of shipping more developer friendly bricks as an alternative.

So far we have working POCs, but still need to refine the APIs we want to expose. We don’t want to introduce BC too often with that building blocks approach.

I’d gladly hear how that kind of approach could be used in your project.

It would be great to see more developer oriented approach as well.

Yeah, semver isn’t really supported in WP world. If plugin uses semver, managed WP hosting might still auto update your plugin when major release is out. Which will break things.

My current implementation doesn’t depend on any UI.

  • Initial indexing is done via WP-CLI.
  • I’ve custom logger (PSR-3 based). Since creating logs via post type wasn’t option for us.
  • Settings are pulled via config files. Easy to switch between envs.

I like building block approach. Happy to help with testing.

Very interesting @georgemamadashvili,

Can you tell me more about the config file based approach?
Do you use an existing library for this?

Regarding custom posts, we removed all of them since 2.0.0.

We also took care of publishing all old versions of the plugin to the SVN repository to let users lock-in their version in version control.

I’ll make sure to put you in the loop for future building blocks.

Will try to export my file based config as reusable piece of code. Currently in middle of updating whole config system, I think new one will be more usable.

1 Like

That would be awesome @georgemamadashvili, I’d gladly share your work afterwards!