Persistence services around the fundraising database
- dev-master / 10.0.x-dev
This package is auto-updated.
Last update: 2021-11-18 00:09:37 UTC
Fundraising Store contains persistence services for the WMDE fundraising codebase.
You can use Composer to download and install this package as well as its dependencies.
To add this package as a local, per-project dependency to your project, run:
composer require wmde/fundraising-store
This package provides
vendor/bin/cli-config.php file required by the Doctrine Console.
A default database configuration, compatible with the container used for integration tests (see
can be found in
Applications wanting to use this package in conjunction with the Doctrine Console should provide their own
This library and the tables it creates is used by the fundraising Bounded Contexts and by the Fundaising Operation Center application. The idea is to migrate this library away by moving all code specific to a Bounded Context into that Bounded Context and all code specific to an application to that application. This way the Bounded Contexts can have truely private peristance and follow the Clean Architecture + Bounded Contexts architecture rules.
For a short history of we ended up with this library, see Bounded Contexts in the Wikimedia Fundraising Software
docker run -it --rm --user $(id -u):$(id -g) -v "$PWD":/code -v ~/.composer:/composer -w /code composer composer install
docker-compose run --rm app vendor/bin/phpunit
All committed code is checked by our CI against the unit tests and the coding styleguide.
The configuration for these tools can be found in the root directory.
After installation through composer you can either call the tools directly from their location in
or use the provided
composer ci # Run all checks composer cs # Run style checks composer test # Run unit tests
Be aware that the concepts of composer as a script runner and containerization might not work together out-of-the-box.
- Invert relationship of Donation and Membership to AddressChange. WARNING: This gets rid of the "cascade" feature (automatic creation of AddressChange records when creating Donations/memberships). The FundraisingFrontend would have to implement an event handler that does the creation.
Factoryto support XML-mapped entities (e.g. in the AddressChange bounded context).
- Fix address change migration
getAddressto return null in
- Fix column names in database for
BackendImpressiondoctrine entity and move them to
AddressChangeentity for address export functionality
- Changed default timestamp value from "0" to "current time", prevening errors on newer versions of MySQL
- Introduced constant
Donation::STATUS_EXPORTEDfor historical reasons.
- Updated Doctrine DBAL and ORM min version.
- Added full text indices for donations and memberships. This breaks backward compatibility for MySQL versions < 5.6.
- Prefixed all indices of donations with
MembershipApplicationas deprecated. It's no longer written by the fundraising frontend, but still referenced in some places by the backend, so for now we just mark it as deprecated instead of removing it.
- Add parameter for setting proxy dir to Factory. For backwards compatibility it's optional and defaults to
- The subscription confirmation code is now a plain string instead of a binary (blob). This makes it easier to read and test.
- The Subscription status flags have been removed and usage of setStatus and getStatus is now discouraged
- Changed the minimum PHP version to 7.0
subscriptiontable. This field indicates what led to the subscription, for instance the "remind me later" feature.
Subscription::isUnconfirmednow correctly returns true when a subscription has been marked for moderation
- Schema change: Added
payment_typefield column to the
- Ability ro re-ruse the file
FundraisingStorein an application is removed.
By the rules of semantic versioning, this version should have been 2.1 but was tagged wrongly.
MembershipApplicationData::getPreservedStatus. This is used to store the previous status when the status changes from a positive to a negative value.
- Renamed several entities. Database table names where not changed to remain backwards compatible.
Requestwas split into
Subscription(the type field was removed)
- The public PHP interfaces of
MembershipApplicationwere changed to English.
- Creation timestamps are now added automatically to donations, membership requests and subscriptions. Donation creation
dt_newis now mandatory (not nullable).
- Changed the minimum PHP version to 5.6
DonationDataclass to provide nicer access to the data field
- Added new methods to
MembershipApplicationDataclass to provide nicer access to the data field
- Added new methods to
- Added CLI configuration for Doctrine ORM shell commands
- Added request type and status constants
- Automatically set the full name in Request when first or last name is set.
- Changed the minimum PHP version to 5.5
Initial release with
Store\Installer and these entities:
- Migrate the payment metadata from
Donation::datato specific subclasses of the