commerceguys / intl

A PHP internationalization library, powered by CLDR data.
MIT License
361 stars 45 forks source link

Make the formatters stateless #66

Closed bojanz closed 6 years ago

bojanz commented 6 years ago

Right now the formatters have state, you can modify their options, which affects future callers due to the singleton nature of dependency containers. This requires a factory to always be used, which we don't even provide.

Let's move to passing options to format(), making the formatters stateless.

We did the same change in commerceguys/addressing.