brick / money

A money and currency library for PHP
MIT License
1.61k stars 96 forks source link

Use a Composer post-package-install script to initiate data #12

Closed raphaelstolt closed 6 years ago

raphaelstolt commented 6 years ago

By adding such a Composer script the library user will always start with a brand-new data set; and the /data directory can be removed from the release and if not a test dependency also from the repository.

BenMorel commented 6 years ago

Definitely not: I can't guarantee that the URL the currency data is downloaded from will not change or will always be available (and thus don't want to make it a dependency on install), nor can I guarantee that the script will always perform well with an upstream change, so I want to keep the control over the generation on such data.

Plus, this would mean that if the upstream data changes, two users with the exact same brick/money version could have different data files, which would make it very hard to track bugs.

Updated data files = new brick/money version!