Closed ramsey closed 12 years ago
Also, I failed to mention that I cherry-picked commits from other forks to include PostgreSQL support in this branch.
Any thoughts yet on these updates to Phactory?
looks good to me..i might switch to your fork
I am closing this pull request and opening a new one in order to direct it to the next
branch.
WARNING: Accepting this pull request will break backwards compatibility with all previous versions of Phactory, as well as what's currently in master. I am submitting this for review and discussion more than blind acceptance into the Phactory master branch. Following discussion, you may feel that these modifications aren't good for the Phactory project or that they are best-suited in a Phactory2 repository, creating a logical split from the current version of the project. That's up to you.
This pull request introduces namespaces to Phactory. It also removes all static calls and singleton behavior, so that instances of Phactory objects must be created and passed around (dependency injection). These changes were made to solve the following problems I encountered:
As a result of these changes, backwards compatibility is broken with current master and all previous tags of Phactory. However, what is gained is:
Here is an example unit test using MongoDB and these updates to Phactory. This unit test will run as is, provided you have a local MongoDB database with a "testdb" database and a user with username "myuser" and password "mypass". It assumes you have this test in a file in the root of your project and that you have run
composer.phar install
so that there is avendor/
directory with your autoloader in it. Feel free to give it a try.This test will create structures in Mongo DB that look like this:
For Publisher 1:
For Publisher 2:
So, let's discuss! :-)