PHPackages                             mijohansen/php-gae-util - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mijohansen/php-gae-util

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mijohansen/php-gae-util
=======================

Utility belt for common tasks in Google App Engine for PHP.

0.8.15(7y ago)021911MITPHPPHP &gt;=5.5

Since Nov 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mijohansen/php-gae-util)[ Packagist](https://packagist.org/packages/mijohansen/php-gae-util)[ RSS](/packages/mijohansen-php-gae-util/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (10)Versions (8)Used By (1)

php-gae-util
============

[](#php-gae-util)

Utility belt for common tasks and patterns on Google App Engine for PHP. The goal is to make development of microservices on Google App Engine go fast and smooth. Handling common GAE scenarios with less code.

Modules
-------

[](#modules)

- **Auth:** Handles several issues around getting users autenticated.
- **Cached:** Just a simple wrapper for memcache for easier testing.
- **Conf:** A wrapper around `hassankhan/config` which provides a lightweighhed library for handling config.
- **Fetch:** Simple module to ensure service to service communication.
- **JWT:** A module to handle JWT-tokens. Wrapper around `firebase/php-jwt`
- **Secrets:** Module to handle keeping secrets secret. Using Google KMS to secure passwords and tokens.
- **Workflow:** Module to handle the running of scheduled tasks on GAE its main contribution is to store the state of the job running. Saves State to DataStore.

### Login in to provide service account credentials in development

[](#login-in-to-provide-service-account-credentials-in-development)

For local developent its important to get [Application Default Credentials](https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login)if you want to use resources on the Google Cloud platform. You log in by running this command:

```
$ gcloud auth application-default login
```

You need to restart the devserver to get this working as the credentials get set on startup time.

Testing and development
-----------------------

[](#testing-and-development)

### Testing

[](#testing)

Test-coverage is an important part of creating reusable, reliable code. The goal of this testing is to use phpunit as this is the most used PHP test framework. As several methods are dependent on Cloud Datastore installing understanding and being able to test against the emulator is quite important. The emulator is not the same as the built in emulator that is running inside the GAE devserver emulator.

#### Cloud datastore setup for testing

[](#cloud-datastore-setup-for-testing)

```
$ gcloud components install cloud-datastore-emulator
$ gcloud beta emulators datastore start --no-store-on-disk
```

or alternatively with docker:

```
$ docker run -d -p 8282:8282 --name datastore egymgmbh/datastore-emulator:latest
```

### For local development of packages

[](#for-local-development-of-packages)

My strategy for developing packages for packagist is as following.

- Create a local folder where you symlink packages

In `~/composer/config.json` add, this also works with using the projects composer.json file, but then you might get problems on other developers computers and in pipelines.

```
{
  "repositories": [
    {
      "type": "path",
      "url": "~/path/to/liberary/root",
      "options": {
        "symlink": true
      }
    }
  ]
}
```

This will now create a link. Two tricks for getting a more problem free start of development is to add your liberary with "\*" for and set minimum stability in the local composer.json for the liberary that requires your packages:

```
{
  "minimum-stability": "dev",
  "require": {
    "mijohansen/php-gae-util": "*"
  }
}
```

### Coding style

[](#coding-style)

The liberary consist of several separate Classes that really just form a set of functions which should be fairly simple to introduce to code. From version 0.7.0 every static method and function is written in camelCase. And I try to follow [PSR-1](https://www.php-fig.org/psr/psr-1/) and [PSR-2](https://www.php-fig.org/psr/psr-2/)

### Contributing

[](#contributing)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~11 days

Total

6

Last Release

2716d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/589907?v=4)[Michael](/maintainers/mijohansen)[@mijohansen](https://github.com/mijohansen)

---

Top Contributors

[![mijohansen](https://avatars.githubusercontent.com/u/589907?v=4)](https://github.com/mijohansen "mijohansen (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mijohansen-php-gae-util/health.svg)

```
[![Health](https://phpackages.com/badges/mijohansen-php-gae-util/health.svg)](https://phpackages.com/packages/mijohansen-php-gae-util)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[akeneo/pim-community-dev

Akeneo PIM, the future of catalog management is open!

1.0k620.8k86](/packages/akeneo-pim-community-dev)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

84735.1k](/packages/flow-php-flow)

PHPackages © 2026

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