Keen on learning new eCommerce technologies?
Subscribe to our newsletter
and be up to date!
Hello Sylius Community!
It has been a while since last release and everyone is probably wondering what’s up with the roadmap.
The deadline for the BETA has passed, I promised to release it by the end of 2015, but we simply did not manage to complete everything that is needed for that release.
Despite the lack of releases and blog post updates the last few months have been really busy and we have never been closer to the ALPHA and BETA releases.
There are many reasons for the delay and I will elaborate on all of them in a separate blog post which will include the updated roadmap for 2016.
In the meantime, we are happy to release version v0.16.0 of Sylius and its components & bundles.
The new release is exactly 770 commits from 31 contributors. There are several big new features and improvements worth mentioning:
Sylius now requires at least PHP 5.5.9 but we actually recommend running it on the latest PHP7.
You can feel the performance boost in all environments. This is really noticeable in the development environment, running the built-in PHP server.
We do not plan to bump PHP version requirement for 1.0, so you can safely assume that Sylius 1.0 will require PHP 5.5.9.
Sylius is now requiring minimum Symfony 2.7.7 and our goal is to use Symfony 2.8 for the stable release. We are constantly fixing deprecations. Thanks Ben!
Sylius is developed through TDD with Behat, PHPSpec and PHPUnit. We currently have:
There is plenty of things I’d do differently now (write better scenarios, etc.) but this is still quite an impressive suite.
Obviously, it got slow over time. Whole build used to take almost an hour to complete.
Now? Build on PHP7 takes ~7 minutes. Oh yeah, and memory usage went down from few gigs to 40-200mb.
Sylius has plenty of eCommerce features in the main application, but behind scenes there are 36 bundles integrating 29 PHP libraries into Symfony framework. You can imagine that documenting all this requires huge amount of work, but we have made a good first step and updated docs for most of Components. There is still plenty of improvements to do but we have just started!
Have a look around and see if you find these eCommerce libraries useful in your next project, with any framework! Our next step? Bundles!
Our attributes system was very simple and can be attached to any entity, it does not have to be a Product. In case of Sylius, we use it for products but if you want to add custom attributes to your User, Book, or any other entity, you can do it with ease!
Anyway, despite being so flexible in that area, we lacked quite important feature – custom attribute types, we just had few basic types hardcoded and that’s it.
Partially inspired by Akeneo‘s (check them out – awesome PIM) approach we have implemented a much better support of different types. Quick overview:
First of all, every Attribute type is represented by instance of AttributeTypeInterface, which defines the name and storage type of the value. We have several storages available, string, text, date, datetime, integer etc.
Secondly, each attribute type has it’s own Twig template and also can have configuration, so there is a lot of flexibility in terms of displaying and validation of values.
Sylius already ships with some default attribute types and we will add few more in the upcoming releases. Feel free to contribute or suggest new types!
I had this new system for in mind for a long time and with help of Mateusz Zalewski it finally got into the core!
Unique identifier other than DB generated IDs is really useful when dealing with API or importing/exporting.
A lot of our recent projects with Sylius have been in a need of an easy way to identify resources and because of that all important core models have a unique
code field that is not editable after creation. This is also very useful in templates, you can easily reference attributes or any other entity.
Ania Walasek made sure you can enjoy working with all Sylius resources!
Sylius is built on top of SyliusResourceBundle. It gives us generic CRUD and format agnostic controllers.
It means that basically every controller action in Sylius can render a HTML template, return JSON/XML response or pretty much any other format you configure. That’s why we quite easily got a full REST API.
Unfortunately, it was working pretty much out of the box with only YAML configuration, so we have not covered it with tests properly. Now we are going through all endpoints the TDD way, defining what type of request do we want to send and what are expected responses.
And you know what? ApiTestCase works with every Symfony 2.3+ & 3.0 application!
We have changed the configuration tree structure and introduced concept of
Factory services for all resources.
sylius_taxation: validation_groups: tax_category: [sylius, app] classes: tax_category: model: AppBundleEntityTaxCategory form: AppBundleFormTypeTaxCategoryType
sylius_taxation: resources: tax_category: classes: model: AppBundleEntityTaxCategory form: default: AppBundleFormTypeTaxCategoryType validation_groups: default: [sylius, app]
This properly separates the responsibility of creating new resource objects and allowed us to fix several issues, including #480.
I have also reworked the logic behind registering entities/documents as Sylius resources and now we have a single
DriverInterface that is solely responsible for registering a resource.
This change removed a lot of code and magic happening in all bundle extensions and unified the way in which resources are configured.
I added a generic routing generator for all resources and it will give you proper configuration in few lines of YAML. You can read more in the documentation.
We have over 130 PRs waiting for merge and they will go in to the core very soon, some PRs worth having a look for future versions:
You can install and try the latest Sylius by running the following commands:
$ composer create-project sylius/sylius-standard my_project $ cd my_project $ app/console sylius:install $ app/console server:run
If you want to help us in making Sylius 1.0 great eCommerce solution for all developers, join our amazing community and start contributing ideas and code!
We have reached another great milestone, packages have been downloaded over 1,500,000 times and I still remember celebrating 1M not so long time ago. I strongly believe this is just the beginning…
Expect the blog post with roadmap and vision update in the coming weeks! Thank you to the whole Community for your hard work, activity on GitHub amazes me every day.
Subscribe to our newsletter
and be up to date!