PHPackages                             wmde/fundraising-store - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wmde/fundraising-store

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

wmde/fundraising-store
======================

Persistence services around the fundraising database

10.5.0(6y ago)316.5k[6 issues](https://github.com/wmde/FundraisingStore/issues)GPL-2.0-or-laterPHPPHP &gt;=7.1

Since Jul 10Pushed 6y ago5 watchersCompare

[ Source](https://github.com/wmde/FundraisingStore)[ Packagist](https://packagist.org/packages/wmde/fundraising-store)[ RSS](/packages/wmde-fundraising-store/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (38)Used By (0)

Persistence Services for WMDE Fundraising
=========================================

[](#persistence-services-for-wmde-fundraising)

[![Build Status](https://camo.githubusercontent.com/fa706ba603e30873b9a87357186350f6e1d0b80e04d69ea2d05fefd56c04dbf8/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f776d64652f46756e6472616973696e6753746f72652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/wmde/FundraisingStore)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3712a60d819e99eab9b3a827d7eab5bbe2ef03002afa35fe8a05a8e72c7573dd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776d64652f46756e6472616973696e6753746f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wmde/FundraisingStore/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e63307cbf24eb4b4deb742f289f8b6f6663c7a8f29363192bb0de8298f9ae93b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776d64652f46756e6472616973696e6753746f72652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wmde/FundraisingStore/?branch=master)[![Download count](https://camo.githubusercontent.com/8b4505774a89b360b80194bf9edad2d5c0baa0a01776da55374a3c00549e9081/68747470733a2f2f706f7365722e707567782e6f72672f776d64652f66756e6472616973696e672d73746f72652f642f746f74616c2e706e67)](https://packagist.org/packages/wmde/fundraising-store)[![License](https://camo.githubusercontent.com/ada54be3e503354f360a75189606334dfaae94e0ebcca943e219f3015d5f2597/68747470733a2f2f706f7365722e707567782e6f72672f776d64652f66756e6472616973696e672d73746f72652f6c6963656e73652e737667)](https://packagist.org/packages/wmde/fundraising-store)

[![Latest Stable Version](https://camo.githubusercontent.com/5fff03c885c20bae1d23b869858b6ac2224d0dd8c42f77d1d2c7eb9aff64d1ec/68747470733a2f2f706f7365722e707567782e6f72672f776d64652f66756e6472616973696e672d73746f72652f76657273696f6e2e706e67)](https://packagist.org/packages/wmde/fundraising-store)[![Latest Unstable Version](https://camo.githubusercontent.com/ee63f0e58cdeceefe213541a91e19cc9eeed67460c239384f158b576879a5217/68747470733a2f2f706f7365722e707567782e6f72672f776d64652f66756e6472616973696e672d73746f72652f762f756e737461626c652e737667)](//packagist.org/packages/wmde/fundraising-store)

**Fundraising Store** contains persistence services for the WMDE fundraising codebase.

Installation
------------

[](#installation)

You can use [Composer](http://getcomposer.org/) 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 `docker-compose.yml`), can be found in `local-db-config.php`. Applications wanting to use this package in conjunction with the Doctrine Console should provide their own `cli-config.php`.

Architecture and Future
-----------------------

[](#architecture-and-future)

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](https://www.entropywins.wtf/blog/2018/08/14/clean-architecture-bounded-contexts/).

For a short history of we ended up with this library, see [Bounded Contexts in the Wikimedia Fundraising Software](https://www.entropywins.wtf/blog/2018/08/14/bounded-contexts-in-the-wikimedia-fundraising-software/)

Development
-----------

[](#development)

In order to create a level playing field for development this project uses [docker](https://docs.docker.com/engine/installation/) &amp; [docker-compose](https://docs.docker.com/compose/install/), as well as [composer](https://getcomposer.org/) for dependency management.

### Provision the system

[](#provision-the-system)

```
docker-compose build

```

### Install dependencies

[](#install-dependencies)

```
docker run -it --rm --user $(id -u):$(id -g) -v "$PWD":/code -v ~/.composer:/composer -w /code composer composer install

```

### Tests

[](#tests)

```
docker-compose run --rm app vendor/bin/phpunit

```

### Running test and code-style checks with composer

[](#running-test-and-code-style-checks-with-composer)

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 `vendor/bin`or use the provided `composer` tasks:

```
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.

Release notes
-------------

[](#release-notes)

### Scheduled for next release (11.x)

[](#scheduled-for-next-release-11x)

- 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.

### Version 10.5.0 (2020-01-31)

[](#version-1050-2020-01-31)

- Add `$additionalMetadataDrivers` parameter to `Factory` to support XML-mapped entities (e.g. in the AddressChange bounded context).

### Version 10.4.1 (2020-01-30)

[](#version-1041-2020-01-30)

- Change `donationReceipt` default to `true`

### Version 10.4.0 (2019-05-29)

[](#version-1040-2019-05-29)

- Add `donationReceipt` to `AddressChange`

### Version 10.3.3 (2019-02-04)

[](#version-1033-2019-02-04)

- Fix address change migration

### Version 10.3.2 (2019-01-31)

[](#version-1032-2019-01-31)

- Allow `getAddress` to return null in `AddressChange`

### Version 10.3.1 (2019-01-30)

[](#version-1031-2019-01-30)

- Fix column names in database for `createdAt` and `modifiedAt` to `AddressChange`

### Version 10.3.0 (2019-01-29)

[](#version-1030-2019-01-29)

- Add `createdAt` and `modifiedAt` to `AddressChange`

### Version 10.2.0 (2019-01-18)

[](#version-1020-2019-01-18)

- Add `exportDate` to `AddressChange`

### Version 10.1.0 (2019-01-16)

[](#version-1010-2019-01-16)

- Remove `thirdPartyIdentifier` from `AddressChange`

### Version 10.0.0 (2019-01-11)

[](#version-1000-2019-01-11)

- Add `addressType` and `thirdPartyIdentifier` to `AddressChange`

### Version 9.0.0 (2018-08-16)

[](#version-900-2018-08-16)

- Remove `User`, `ActionLog`, `BackendBanner`, `BackendImpression` doctrine entity and move them to `fundraising-backend` repository

### Version 8.0.0 (2018-06-06)

[](#version-800-2018-06-06)

- Add `AddressChange` entity for address export functionality

### Version 7.0.1 (2017-12-05)

[](#version-701-2017-12-05)

- Changed default timestamp value from "0" to "current time", prevening errors on newer versions of MySQL

### Version 7.0.0 (2017-11-01)

[](#version-700-2017-11-01)

- Introduced `MembershipApplication::setDonationReceipt()` et al.

### Version 6.1.0 (2017-08-16)

[](#version-610-2017-08-16)

- Introduced constant `Donation::STATUS_EXPORTED` for historical reasons.

### Version 6.0.1 (2017-08-02)

[](#version-601-2017-08-02)

- Updated Doctrine DBAL and ORM min version.

### Version 6.0.0 (2017-07-18)

[](#version-600-2017-07-18)

- Added `DonationPayments\SofortPayment` entity

### Version 5.0.0 (2017-03-30)

[](#version-500-2017-03-30)

#### Breaking changes

[](#breaking-changes)

- Added full text indices for donations and memberships. This breaks backward compatibility for MySQL versions &lt; 5.6.
- Prefixed all indices of donations with `d_`.
- Mark `donation_id` of `MembershipApplication` as 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.

### Version 4.2.0 (2017-01-04)

[](#version-420-2017-01-04)

- Added `MembershipApplication::isDeleted()`

### Version 4.1.0 (2016-12-06)

[](#version-410-2016-12-06)

- Add parameter for setting proxy dir to Factory. For backwards compatibility it's optional and defaults to `/tmp`.

### Version 4.0.0 (2016-11-25)

[](#version-400-2016-11-25)

#### Breaking changes

[](#breaking-changes-1)

- The subscription confirmation code is now a plain string instead of a binary (blob). This makes it easier to read and test.

### Version 3.0.0 (2016-11-16)

[](#version-300-2016-11-16)

#### Breaking changes

[](#breaking-changes-2)

- The Subscription status flags have been removed and usage of setStatus and getStatus is now discouraged
- Changed the minimum PHP version to 7.0

#### New features

[](#new-features)

- Added `source` field to `subscription` table. This field indicates what led to the subscription, for instance the "remind me later" feature.
- Added `Subscription::getSource` and `Subscription::setSource`
- Added `Subscription::markAsConfirmed`
- Added `Subscription::markForModeration`
- Added `Subscription::needsModeration`

#### Bug fixes

[](#bug-fixes)

- `Subscription::isUnconfirmed` now correctly returns true when a subscription has been marked for moderation

### Version 2.1.0 (2016-10-10)

[](#version-210-2016-10-10)

- Schema change: Added `payment_type` field column to the `request` table
- Added `MembershipApplication::setPaymentType` and `MembershipApplication::getPaymentType`
- Ability ro re-ruse the file `cli-config.php` when including `FundraisingStore` in an application is removed.

### Version 2.0.1 (2016-09-28)

[](#version-201-2016-09-28)

By the rules of semantic versioning, this version should have been 2.1 but was tagged wrongly.

- Added `MembershipApplicationData::setPreservedStatus` and `MembershipApplicationData::getPreservedStatus`. This is used to store the previous status when the status changes from a positive to a negative value.

### Version 2.0.0 (2016-08-03)

[](#version-200-2016-08-03)

#### Breaking changes

[](#breaking-changes-3)

- Renamed several entities. Database table names where not changed to remain backwards compatible.
    - `Spenden` =&gt; `Donation`.
    - `Users` =&gt; `User`
    - `BackendImpressions` =&gt; `BackendImpression`
    - `Request` was split into `MembershipApplication` and `Subscription` (the type field was removed)
- The public PHP interfaces of `Donation` and `MembershipApplication` were changed to English.
- Creation timestamps are now added automatically to donations, membership requests and subscriptions. Donation creation timestamp `dt_new` is now mandatory (not nullable).
- The `guid` field of `MembershipApplication` was removed.
- Changed the minimum PHP version to 5.6

#### New features

[](#new-features-1)

- Added `Address` entity
- Added `DonationData` class to provide nicer access to the data field
- Added new methods to `Donation`
    - `setId`
    - `getDecodedData`
    - `encodeAndSetData`
    - `getDataObject`
    - `setDataObject`
    - `modifyDataObject`
- Added `MembershipApplicationData` class to provide nicer access to the data field
- Added new methods to `MembershipApplication`
    - `setId`
    - `getDecodedData`
    - `encodeAndSetData`
    - `getDataObject`
    - `setDataObject`
    - `modifyDataObject`

### Version 1.0 (2016-01-11)

[](#version-10-2016-01-11)

- 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

### Version 0.1 (2015-07-10)

[](#version-01-2015-07-10)

Initial release with `Store\Factory`, `Store\Installer` and these entities:

- ActionLog
- BackendBanner
- BackendImpressions
- Request
- Spenden
- Users

Future Plans
------------

[](#future-plans)

- Migrate the payment metadata from `Donation::data` to specific subclasses of the `DonationPayment` abstract class.

Links
-----

[](#links)

- [Fundraising Store on Packagist](https://packagist.org/packages/wmde/fundraising-store)
- [Fundraising Store on TravisCI](https://travis-ci.org/wmde/FundraisingStore)
- [Fundraising Store on ScrutinizerCI](https://scrutinizer-ci.com/g/wmde/FundraisingStore)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~91 days

Total

34

Last Release

2296d ago

Major Versions

5.0.0 → 6.0.02017-07-18

6.1.0 → 7.0.02017-10-26

7.0.1 → 8.0.0-beta2018-06-11

8.0.1 → 9.0.02018-08-20

9.0.0 → 10.0.02019-01-14

PHP version history (5 changes)v0.1PHP &gt;=5.3.2

1.0.0PHP &gt;=5.5.0

2.0.0PHP &gt;=5.6

3.0.0PHP &gt;=7.0

6.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://www.gravatar.com/avatar/054adb441e7ee248ec924bc45fa793835c284710eb31627587fa5de21bab9e96?d=identicon)[wmde](/maintainers/wmde)

---

Top Contributors

[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (103 commits)")[![gbirke](https://avatars.githubusercontent.com/u/223326?v=4)](https://github.com/gbirke "gbirke (77 commits)")[![manicki](https://avatars.githubusercontent.com/u/3524114?v=4)](https://github.com/manicki "manicki (47 commits)")[![KaiNissen](https://avatars.githubusercontent.com/u/5435996?v=4)](https://github.com/KaiNissen "KaiNissen (39 commits)")[![timEulitz](https://avatars.githubusercontent.com/u/4571512?v=4)](https://github.com/timEulitz "timEulitz (21 commits)")[![wiese](https://avatars.githubusercontent.com/u/167557?v=4)](https://github.com/wiese "wiese (18 commits)")[![moiikana](https://avatars.githubusercontent.com/u/11670701?v=4)](https://github.com/moiikana "moiikana (4 commits)")[![tzhelyazkova](https://avatars.githubusercontent.com/u/24877689?v=4)](https://github.com/tzhelyazkova "tzhelyazkova (2 commits)")[![WMDE-Fisch](https://avatars.githubusercontent.com/u/8479008?v=4)](https://github.com/WMDE-Fisch "WMDE-Fisch (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/wmde-fundraising-store/health.svg)

```
[![Health](https://phpackages.com/badges/wmde-fundraising-store/health.svg)](https://phpackages.com/packages/wmde-fundraising-store)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
