2017 © Pedro Peláez
 

project appengine-symfony-starter-project

A Symfony hello world for App Engine

image

google/appengine-symfony-starter-project

A Symfony hello world for App Engine

  • Tuesday, June 13, 2017
  • by bshaffer
  • Repository
  • 15 Watchers
  • 34 Stars
  • 929 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 9 Open issues
  • 4 Versions
  • 7 % Grown

The README.md

status: inactive, (*1)

This project is no longer actively developed or maintained., (*2)

Please check out Running Symfony on App Engine for PHP 7.2 instead., (*3)

Symfony for Google App Engine

This repository contains a Symfony app for Google App Engine, based off the Symfony Standard Edition., (*4)

See How to Run Symfony Hello World on App Engine Standard Environment for the full tutorial., (*5)

Installation

Install this via composer. Follow the installation instructions if you do not already have composer installed., (*6)

Once composer is installed, execute the following command to create this project:, (*7)

composer create-project google/appengine-symfony-starter-project

Set Up

To run the starter app, be sure to authorize gcloud for your project., (*8)

gcloud auth login

Run Locally

composer run-script server --timeout=0

Now browse to http://localhost:8080 in your browser to view your running application. This builds the cache for the "dev" environment and runs the dev_appserver.py script, which will be available if you've installed the Google App Engine Launcher. The command for this is defined in scripts/deploy.php., (*9)

Deployment

Deploy to your App Engine instance by running the following command:, (*10)

composer run-script deploy --timeout=0

This builds the cache for the "prod" environment and runs gcloud app deploy, which will be available if you've installed the Google Cloud SDK. The command for this is defined in scripts/deploy.php., (*11)

See also the Symfony Hello World tutorial, (*12)

Using Twig

It should be noted this example application uses a subclass of Twig_Environment, defined in src/Twig/Environment.php and configured in app/config/services.yml. The reason for this subclass is to customize the getOptionsHash method. Without this, the cache cannot be warmed up outside of the PHP version being used in App Engine., (*13)

Troubleshooting

  1. If Composer fails to download the dependencies, make sure that your local PHP installation satisfies Composer's system requirements. Specifically, cURL support is required., (*14)

  2. If you see errors about missing the default Cloud Storage bucket, follow the cloud integration instructions to create a default bucket for your project., (*15)

Contributing

Have a patch that will benefit this project? Awesome! Follow these steps to have it accepted., (*16)

  1. Please sign our Contributor License Agreement.
  2. Fork this Git repository and make your changes.
  3. Create a Pull Request
  4. Incorporate review feedback to your changes.
  5. Accepted!

License

All files in this repository are under the MIT License unless noted otherwise., (*17)

The Versions