Forms Bridge 4.1.0 is now available. In this release, we’ve made significant changes in our PHP development environment to make the project more sustainable in the long term and to foster contributions to the project.
Changes
- We’ve included unit tests with PHPUnit to the project and added a new test job to the CI workflows.
- We are rewriting the code to follow the WordPress Coding Standards.
- We’ve disassembled the HTTP Bridge package and reassembled it as a library, as it is no longer used as an independent plugin.
Unit testing
Forms Bridge started as small private plugin to solve a customer requirement for integrating Gravityforms leads into the Odoo CRM module. Shortly, we were reusing this solution with more customers at Còdec and that’s when we realized it could be converted to an abstract and reusable plugin.
After one year of active development, Forms Bridge has become a great and powerful solution to integrate WordPress with remote APIs and to set up automations on top of your WordPress forms, with support for the most widely used form builders in the plugins repository, and that’s great! The drawback of this growth is that the plugin has become a huge project and it is increasingly complicated to deliver new features without introducing bugs.
After struggling with some bugs in our two past releases, we decided to stop the new features development and start writing some tests. Following the WordPress Core team approach, we chose to use PHPUnit and reuse its testing stack.
Setting up a test environment for a WordPress plugin is not trivial. It requires a complete WordPress installation, with a web server, database and a PHP interpreter to work properly. The entire setup must be ephemeral to always run the tests on a fresh installation with the same state. Reusing the testing libraries from the core team save us a lot of time and prevent potential headaches. Docker has been a crucial tool in facilitating this setup.
Despite our strategy of using community tools, getting our tests running was challenging. At the end, we’ve configured a GitHub workflow based on a custom docker image that runs all the tests in a container. The same container can be used locally to run the tests on any computer. You can get the workflow configuration in our GitHub repository.
This is a background task that we will continue implementing over time to increase the test coverage. For now, we’ve focused on cover the form builder integration modules and the plugin’s core classes, but it remains a lot of work to done!
WordPress Coding Standards
Let’s be honest: WordPress Coding Standards can feel restrictive and sometimes seem arbitrary, and that’s not even mentioning how awful the code could looks with all those spaces floating around.
At the same time, we know that coding standards are less about restrictions and more about prioritizing collective progress over individual preferences and building software that’s bigger than any single developer.
That’s why we are rewriting all our code to comply with the coding standards.
To make this work less painful, we are using automated linting tools like PHP Code Sniffer, IDE integrations and CI/CD pipelines to perform lint and format checks.
GitHub
An other important update is our decision to publish the plugin codebase on GitHub. We’ve been using GitLab as our preferred development platform for multiple reasons:
- It is open source.
- It supports to self host your own instance.
- Historically, it has a more DevOps and project management tools than GitHub.
- Is not owned by Microsoft
We still love GitLab, and we will continue using it for our cooperative projects. However, GitHub is the de facto place to create open source communities and we want Forms Bridge to be as open and collective as possible. Despite the contradictions of hosting our code on a private platform owned by one of the world’s largest software companies, we’ve decided to move forward.
What’s next?
All this effort came at the expense of developing new features. Now that we’re done, it’s time to come back to the development work and reactivate the feature delivery pipeline. We’ve two epics upcomming:
- Chat and collaboration app add-ons: Starting by Zulip, a work in progress PR, and planned support for Slack, RocketChat and Mattermost.
- New form builders: Forms Bridge currently supports the main four form builder plugins in the WordPress ecosystem, plus the WooCommerce checkout form. In addition we have strategic plans to add support for:
* We don’t include Elementor Forms in this list due to the company’s ties with the genocide state of Israel.