PHPackages                             namshi/google-doc-configuration-bundle - 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. namshi/google-doc-configuration-bundle

ActiveLibrary

namshi/google-doc-configuration-bundle
======================================

Configure the dependency injection container of your Symfony2 applications with a Google Doc. Crazy, ahm?

0.1.0(11y ago)09.0kMITPHP

Since Aug 16Pushed 11y ago32 watchersCompare

[ Source](https://github.com/namshi/google-doc-configuration-bundle)[ Packagist](https://packagist.org/packages/namshi/google-doc-configuration-bundle)[ RSS](/packages/namshi-google-doc-configuration-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

GoogleDocConfigurationBundle
============================

[](#googledocconfigurationbundle)

[![](https://camo.githubusercontent.com/b654dfa07b29249c0b94420a99f32f25a9d012c3c1a4cf035c8c55c99424d2e9/687474703a2f2f727331696d672e6d656d6563646e2e636f6d2f68652d646f65736e742d6b6e6f772d746861742d6665656c2d6c6f6f6b2d61742d68696d2d616e642d6c617567685f6f5f3839303931372e6a7067)](https://camo.githubusercontent.com/b654dfa07b29249c0b94420a99f32f25a9d012c3c1a4cf035c8c55c99424d2e9/687474703a2f2f727331696d672e6d656d6563646e2e636f6d2f68652d646f65736e742d6b6e6f772d746861742d6665656c2d6c6f6f6b2d61742d68696d2d616e642d6c617567685f6f5f3839303931372e6a7067)

> Configure your Symfony2 container from a Google Doc. Sounds crazy but it's even worse.

This bundle will let you use a Google Doc to store key-value pairs and re-use them within your Symfony2 app: this means that any human capable with interacting with a spreadsheet can play around and configure your app.

The values are "public", in the sense that you will need to share the Google Doc ("[Publish to the web](https://support.google.com/docs/answer/37579?hl=en)") so anyone with the link can access it, even though guessing the URL of the doc isn't trivial.

In any case, you should use this tecnique to store things like

- cache TTL
- products per page
- banner URLs

and so on and so fort. **Do not** store passwords or sensitive data there.

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

[](#installation)

You can easily install this library through [composer](https://packagist.org/packages/namshi/google-doc-configuration-bundle):

```
"namshi/google-doc-configuration-bundle": "dev-master"

```

Configuration
-------------

[](#configuration)

Simply define the config service, here we are using Redis and gvalue to store config values from Google Docs to Redis and read the cached values from a redis hash for performances:

```
parameters:
  namshi_google_doc_configuration.config.google_doc_key: 123456

services:
  config:
    class: Namshi\GoogleDocConfigurationBundle\Config\RedisConfig
    arguments: [@namshi_google_doc_configuration.predis, 'namshi.config', true]
```

The Google Doc key can be found from the URL of your Google Doc, which is something like `https://docs.google.com/a/namshi.com/spreadsheet/ccc?key=123456&usp=drive_web#gid=0`, where `123456` is the key of the document.

To check the format of the doc have a look at the [example one](https://docs.google.com/spreadsheet/ccc?key=0Au4X4OwTcvrSdG5oZkFXMXM5SUl4YVF5bDV2NmZiSmc&usp=sharing).

Then secure the 2 routes that the bundle exposes, in the `security.yml`:

```
utility:
  pattern:    (^/namshi/update-config)|(^/namshi/config)
  http_basic:
    provider: ...
```

You can then check `http://domain.example/namshi/config` to check your configuration and `http://domain.example/namshi/update-config` to update it from the Google Doc.

Storing the config in different ways
------------------------------------

[](#storing-the-config-in-different-ways)

We use [Redis](https://github.com/namshi/google-doc-configuration-bundle/blob/127a9df511437764d2e33f8fc8d36c38d9ac5f5a/src/Namshi/GoogleDocConfigurationBundle/Config/RedisConfig.php)but you are free to implement the [ConfigInterface](https://github.com/namshi/google-doc-configuration-bundle/blob/127a9df511437764d2e33f8fc8d36c38d9ac5f5a/src/Namshi/GoogleDocConfigurationBundle/Config/ConfigInterface.php)and have fun with it.

Transforming values
-------------------

[](#transforming-values)

If you need to process / transform values out of the Google Do, ie. transforming `"false"` to `false` you can simply define a `namshi_google_doc_configuration.transformer`service and let it implement the [TransformerInterface](https://github.com/namshi/google-doc-configuration-bundle/blob/127a9df511437764d2e33f8fc8d36c38d9ac5f5a/src/Namshi/GoogleDocConfigurationBundle/Config/TransformerInterface.php).

This is probably not so clean but you can live with it, for now :)

Tests
-----

[](#tests)

[![b****-please](https://camo.githubusercontent.com/adca7d65720ceabc1a1eead637654bab5c93a73f98b2eb84d1ce39b9b918c191/687474703a2f2f67616c657269322e756c75646167736f7a6c756b2e636f6d2f3334322f62697463682d706c656173655f3435393239322e6a7067)](https://camo.githubusercontent.com/adca7d65720ceabc1a1eead637654bab5c93a73f98b2eb84d1ce39b9b918c191/687474703a2f2f67616c657269322e756c75646167736f7a6c756b2e636f6d2f3334322f62697463682d706c656173655f3435393239322e6a7067)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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

Unknown

Total

1

Last Release

4248d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/328420?v=4)[Alex Nadalin](/maintainers/odino)[@odino](https://github.com/odino)

---

Top Contributors

[![odino](https://avatars.githubusercontent.com/u/328420?v=4)](https://github.com/odino "odino (12 commits)")[![cirpo](https://avatars.githubusercontent.com/u/51252?v=4)](https://github.com/cirpo "cirpo (2 commits)")[![hossam-fares](https://avatars.githubusercontent.com/u/1850565?v=4)](https://github.com/hossam-fares "hossam-fares (1 commits)")

### Embed Badge

![Health badge](/badges/namshi-google-doc-configuration-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/namshi-google-doc-configuration-bundle/health.svg)](https://phpackages.com/packages/namshi-google-doc-configuration-bundle)
```

PHPackages © 2026

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