Meet Sword, Where Symfony Weds WordPress

Sword project page

It was in mid-February of 2012 that Dries Buytaert announced, “The future is a RESTful Drupal’. By the third week of March that year, Fabien Potencier, the project lead of Symfony, also talked about Drupal’s decision to co-opt Symfony in his blog post, “Symfony2 meets Drupal 8.”

One idea behind Symfony was to develop interoperability between different PHP frameworks. Symfony’s embracing of the HTTP specification and PHP standards, together with its set of decoupled and cohesive components, made that dream a reality starting with Midgard announcing its use.

But until recently, nobody had announced a project where the other major PHP-based open source CMS, WordPress, was starting to be built with Symfony.

Well, that boat has since set sail. A new project, ‘Sword,’ has been announced wherein Symfony meets WordPress. It is one step further in modern WordPress development, says the developer, William Arin.

Sword is WordPress run by Symfony. With Sword, the WordPress code has access to all Symfony features, while the Symfony code can be WordPress-independent. You can build your theme or child theme just like you would build a Symfony app. With synchronized auth, you can log in to WordPress, which will also log you into Symfony. 

Sword comes with a preconfigured Docker environment that can be used both in development and production. WordPress is completely configurable through environment variables. The project uses MIT License.

Modern WordPress development has been around for a while with software like Bedrock.

Sword takes an alternative approach. Instead of being WordPress with extra features and a new file structure, it’s Symfony embedding WordPress. All WordPress pages and logic, including WP-CLI, run through Symfony.

It uses PHP 8.1, Symfony 6.1, and WordPress 5.6, each being the latest version of the respective projects. Read more about it from https://getsword.com/guide/

Advertisement Here