PHPackages                             mijo/gae-flow - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. mijo/gae-flow

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

mijo/gae-flow
=============

Use composer.json to deploy to Google App Engine and serve in development with the same logic.

1.0.2(6y ago)030MITPHP

Since Oct 27Pushed 4y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

php-gae-flow
============

[](#php-gae-flow)

Deploy and devserver for Google App Engine for PHP. This is not a general liberary, but an opinionated way of doing "things". Google App Engine have no good way of storing secrets out of the box. I have choosen to add environment variables to `app.yaml` at deploy-time. This would work both from your local machine and from a pipeline. The secrets I store in a normal propfile stored at users home-directory. This way it could be shared between applications which is deployed in the same Google App Engine project.

To have a consistent way between the production environment and the development environment we do the same with variables used during local development.

Needless to say, this approach will work best for soloprojects, or projects with few developers.

Environment variables
---------------------

[](#environment-variables)

These are stored in standard [INI files](https://en.wikipedia.org/wiki/INI_file) which has to be placed in the users home directory outside of the current project.

- `~/.{{myprojectkey}}/prod.env` for the production deploys.
- `~/.{{myprojectkey}}/dev.env` for the devserver.

This way they can be shared between applications in the same project and is kept relatively secure outside the project. Not ideally, but at least you don't have to check in files in the project.

Scripts
-------

[](#scripts)

This liberary contains two scripts, `deploy` and `serve`. They are configured with using the "extra" field of composer.json.a

### Deploy (to Google App Engine)

[](#deploy-to-google-app-engine)

This uses the [gcloud command-line tool](https://cloud.google.com/sdk/gcloud/) for deploying. This has to be on the PATH for this to work.

#### Configuration

[](#configuration)

In composer.json add the following to the [extra data fields](https://getcomposer.org/doc/04-schema.md#extra).

```
{
  "extra": {
    "gcloud:project": "myprojectkey",
  }
}
```

### Serve (with the build in server)

[](#serve-with-the-build-in-server)

This is just a simple wrapper around that the [PHP built-in webserver](https://www.php.net/manual/en/features.commandline.webserver.php). But it does call a router script which is configured to mimic the default behaviour when you deploy an application with Google App Engine. This does not read app.yaml to resolve static routes. But if you have a fairly simple setup that should not be a problem.

#### Configuration

[](#configuration-1)

In composer.json add the following to the [extra data fields](https://getcomposer.org/doc/04-schema.md#extra).

```
{
  "extra": {
    "serve:addr": "0.0.0.0",
    "serve:docroot": "/",
    "serve:entrypoint": "entrypoint.php",
    "serve:port": 2004
  }
}
```

In the script section you could/should add the deploy-command.

```
{
  "scripts": {
    "deploy": "GaeFlow\\Script::deploy",
    "serve": "GaeFlow\\Script::serve"
  }
}
```

If you want to run scripts before the deploy-script. For instance build an frontend, that can be done by passing an array of commands like this:

```
{
  "scripts": {
    "deploy": [
      "yarn build",
      "GaeFlow\\Script::deploy"
    ]
  }
}
```

Tests
-----

[](#tests)

Test can be ran with `composer test` and the project is using phpunit as a testrunner.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~19 days

Total

3

Last Release

2352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7bbaac8c405bc506a2e4d91cb8b62f335dfffdebff9be6c7798902f469b2274?d=identicon)[mijohansen](/maintainers/mijohansen)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mijo-gae-flow/health.svg)

```
[![Health](https://phpackages.com/badges/mijo-gae-flow/health.svg)](https://phpackages.com/packages/mijo-gae-flow)
```

###  Alternatives

[wsdltophp/packagegenerator

Generate hierarchical PHP classes based on a WSDL

4351.9M19](/packages/wsdltophp-packagegenerator)[in2code/in2publish_core

Content publishing extension to connect stage and production server

40135.8k](/packages/in2code-in2publish-core)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[fortrabbit/craft-copy

Tooling for Craft on fortrabbit

7617.2k1](/packages/fortrabbit-craft-copy)[phpfastcgi/speedfony-bundle

A bundle to integrate a FastCGI daemon with the symfony2 framework

909.5k](/packages/phpfastcgi-speedfony-bundle)

PHPackages © 2026

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