Blog: Propel2 Is About To Be Released
One year and a half ago, Propel2 began. We decided to refactor the whole Propel code base in order to remove BC hacks, and introduce new features. We, the community and the Propel core developers, wrote a roadmap with all key points:
- Removing all
require()
and adding namespaces, that means the directory structure will be modified to follow the PSR-0 specification; - Adding an autoloader component, probably the Symfony2 ClassLoader Component. Note: Composer has been used;
- Fixing CS;
- Fixing naming;
- Removing Phing and related stuffs;
- Removing late-static-binding hacks;
- Adding a new component to handle the console logic: Symfony2 Console Component is suitable for that part (#100);
- Introducing a commons logic (useful for shared information between the Platform (buildtime) and Adapters (runtime));
- Refactoring Adapters to be more generic (Proxy connection or something else) (#33, #39, #47);
- Adding new named exceptions (#90);
- Adding a new (or real) logging part: probably Monolog (#101);
- Removing PEER classes (#359 and a lot of commits);
- Moved
Base*
classes to a better location, with a better name (Om/BaseBook.php
=>Base/Book.php
for instance) (#175); - Removing the old validation system, and use a behavior to integrate the Symfony2 Validator component (#96, #156, #227).
That was the plan I announced at Symfony Live 2012. In the meantime, we changed our mind, and decided to embrace PHP 5.4. But we actually did a lot more, closing more than 300 issues.
First of all, the Connection part has been
rewritten, introducing a new Profiler
logic, allowing not only
PDO adapters, and adding new abstraction layers such as a
DataFetcher
.
Then, we wrote more unit tests to make Propel more stable. We also adopted the Symfony2 Filesystem component, and contributed to the Symfony2 framework by creating this standalone component. Propel2 relies on five Symfony2 components: Yaml, Console, Finder, Validator, and Filesystem.
We introduced some traits as well as a Service Container. However, that one is not configurable yet, see it as a compiled service container. It was our first step to decouple the Propel code base.
We also took care of all patches applied to Propel 1.6, and ported them to Propel2.
Last but not least, Propel2 is PSR-0, PSR-1, PSR-2, and PSR-3 compliant.
We still have a few things to ship before a first alpha release like a Transaction API, a new Pager, and some other things to clean up. This first release is scheduled for the 1st of June. Then, we will ship a beta version, probably in two months. Depending on users feedback, we will be able to release a first stable version in September.
By now, our most important work in progress is the documentation we want to reorganize. By the way, Robin Dupret is our new documentation lead for Propel2.
I could not imagine how complicated it was to refactor such a project, we did a lot but we could be even better, especially now that we have a cleaner code base. I would like to apologize for the delay, it took more time than I thought. Rome wasn’t built in a day, they said.
My final thoughts go out to all Propel contributors, you are really awesome, thank you!