diff --git a/appengine/flexible/analytics/app.yaml b/appengine/flexible/analytics/app.yaml index 5ccf142254..db289fcae2 100644 --- a/appengine/flexible/analytics/app.yaml +++ b/appengine/flexible/analytics/app.yaml @@ -1,5 +1,5 @@ runtime: php -env: flex +vm: true runtime_config: - document_root: web + document_root: web \ No newline at end of file diff --git a/appengine/flexible/analytics/tests/DeployTest.php b/appengine/flexible/analytics/tests/DeployTest.php deleted file mode 100644 index e48c4b4322..0000000000 --- a/appengine/flexible/analytics/tests/DeployTest.php +++ /dev/null @@ -1,34 +0,0 @@ -client->get('/'); - $this->assertEquals('200', $resp->getStatusCode(), - 'top page status code'); - $this->assertContains('returned 200', (string) $resp->getBody(), - 'top page content'); - } -} diff --git a/appengine/flexible/analytics/tests/LocalTest.php b/appengine/flexible/analytics/tests/LocalTest.php index 739b769ebf..a6163ef215 100644 --- a/appengine/flexible/analytics/tests/LocalTest.php +++ b/appengine/flexible/analytics/tests/LocalTest.php @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -namespace Google\Cloud\Samples\AppEngine\Analytics; +namespace Google\Cloud\Test; use Silex\WebTestCase; diff --git a/appengine/flexible/cloudsql/README.md b/appengine/flexible/cloudsql/README.md index 95f4cf4522..e2c4b8a321 100644 --- a/appengine/flexible/cloudsql/README.md +++ b/appengine/flexible/cloudsql/README.md @@ -19,41 +19,43 @@ composer install Before you can run or deploy the sample, you will need to do the following: -1. Create a [Second Generation Cloud SQL](https://cloud.google.com/sql/docs/create-instance) instance. You can do this from the [Cloud Console](https://console.developers.google.com) or via the [Cloud SDK](https://cloud.google.com/sdk). To create it via the SDK use the following command: +1. Create a [First Generation Cloud SQL](https://cloud.google.com/sql/docs/create-instance) instance. You can do this from the [Cloud Console](https://console.developers.google.com) or via the [Cloud SDK](https://cloud.google.com/sdk). To create it via the SDK use the following command: - $ gcloud beta sql instances create YOUR_INSTANCE_NAME --tier=db-f1-micro --activation-policy=ALWAYS + $ gcloud sql instances create YOUR_INSTANCE_NAME - > Note: the `--tier` option is required to create a `Second Generation` instance. See the - full list of available tiers by running `gcloud sql tiers list` - -2. Set the root password on your Cloud SQL instance: +1. Set the root password on your Cloud SQL instance: $ gcloud sql instances set-root-password YOUR_INSTANCE_NAME --password YOUR_INSTANCE_ROOT_PASSWORD -3. Install and run the [CloudSQL Proxy](https://cloud.google.com/sql/docs/mysql-connect-proxy) +1. Update the connection string in `app.yaml` with your configuration values. These values are used when the application is deployed. -4. Create a database for this example +## Run locally - $ mysql -h 127.0.0.1 -u root -p -e "CREATE DATABASE ;" +To run locally, you can either run your own MySQL server locally and set the connection string in `app.yaml`, or you can [connect to your CloudSQL instance externally](https://cloud.google.com/sql/docs/external#appaccess). +```sh +cd php-docs-samples/appengine/standard/cloudsql -## Deploy to App Engine +# set local mysql connection parameters +export MYSQL_DSN="mysql:host=127.0.0.1;port=3306;dbname=guestbook" +export MYSQL_USERNAME=root +export MYSQL_PASSWORD= -**Prerequisites** +php -S localhost:8080 +``` -- Install the [Google Cloud SDK](https://developers.google.com/cloud/sdk/). +> be sure the `MYSQL_` environment variables are appropriate for your mysql instance -**Deploy with gcloud** +Now you can view the app running at [http://localhost:8080](http://localhost:8080) +in your browser. -1. Update `app.yaml` with the configuration values for `USER`, `PASSWORD`, and - `DATABASE` with the values you used during setup. +## Deploy to App Engine -1. Get the CloudSQL connection name +**Prerequisites** - $ gcloud beta sql instances describe YOUR_INSTANCE_NAME | grep connectionName +- Install the [Google Cloud SDK](https://developers.google.com/cloud/sdk/). -1. Update `app.yaml` with the configuration value for `CONNECTION_NAME` you retrieved - at the end up setup. +**Deploy with gcloud** ``` gcloud config set project YOUR_PROJECT_ID @@ -63,28 +65,3 @@ gcloud app browse The last command will open `https://{YOUR_PROJECT_ID}.appspot.com/` in your browser. - -## Run locally - -1. Ensure the [CloudSQL Proxy](https://cloud.google.com/sql/docs/external#proxy) is - installed and running. - -1. Set the following environment variables with the configuration values for - `USER`, `PASSWORD`, and `DATABASE` you used during setup: - - ```sh - # set local mysql connection parameters - export MYSQL_DSN="mysql:host=127.0.0.1;port=3306;dbname=DATABASE" - export MYSQL_USERNAME=USER - export MYSQL_PASSWORD=PASSWORD - ``` - -1. Run the application - - ```sh - cd php-docs-samples/appengine/standard/cloudsql - php -S localhost:8080 - ``` - -Now you can view the app running at [http://localhost:8080](http://localhost:8080) -in your browser. diff --git a/appengine/flexible/cloudsql/app.yaml b/appengine/flexible/cloudsql/app.yaml index e5d5091391..db289fcae2 100644 --- a/appengine/flexible/cloudsql/app.yaml +++ b/appengine/flexible/cloudsql/app.yaml @@ -1,17 +1,5 @@ runtime: php -env: flex +vm: true -#[START env] -env_variables: - # Replace USER, PASSWORD, DATABASE, and CONNECTION_NAME with the - # values obtained when configuring your Cloud SQL instance. - MYSQL_DSN: mysql:dbname=DATABASE;unix_socket=/cloudsql/CONNECTION_NAME - MYSQL_USER: USER - MYSQL_PASSWORD: PASSWORD -#[END env] - -#[START cloudsql_settings] -# Use the connection name obtained when configuring your Cloud SQL instance. -beta_settings: - cloud_sql_instances: "CONNECTION_NAME" -#[END cloudsql_settings] \ No newline at end of file +runtime_config: + document_root: web \ No newline at end of file diff --git a/appengine/flexible/cloudsql/composer.json b/appengine/flexible/cloudsql/composer.json index 54e48b63d1..48deb1ee12 100644 --- a/appengine/flexible/cloudsql/composer.json +++ b/appengine/flexible/cloudsql/composer.json @@ -5,7 +5,6 @@ }, "require-dev": { "google/cloud-tools": "<=1.0", - "paragonie/random_compat": "^2.0", "phpunit/phpunit": "~4" } } diff --git a/appengine/flexible/cloudsql/composer.lock b/appengine/flexible/cloudsql/composer.lock index 4352f1e402..0fb32bb359 100644 --- a/appengine/flexible/cloudsql/composer.lock +++ b/appengine/flexible/cloudsql/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c38db7a1e50b3eb1e1d8266fafcc4109", - "content-hash": "af097efd1218239a6b3d650be132c216", + "hash": "cab8f37ba4d937f5a7f5a06543d8c2a8", + "content-hash": "b1542efc811f21f6a65c92410484e5da", "packages": [ { "name": "firebase/php-jwt", @@ -52,22 +52,22 @@ }, { "name": "google/apiclient", - "version": "v2.0.3", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/google/google-api-php-client.git", - "reference": "37adb8a6f4d4b27b9900d62d67bf1d54995a755c" + "reference": "18dd5534280318598e8770cb7929e9a542e91c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client/zipball/37adb8a6f4d4b27b9900d62d67bf1d54995a755c", - "reference": "37adb8a6f4d4b27b9900d62d67bf1d54995a755c", + "url": "https://api.github.com/repos/google/google-api-php-client/zipball/18dd5534280318598e8770cb7929e9a542e91c0d", + "reference": "18dd5534280318598e8770cb7929e9a542e91c0d", "shasum": "" }, "require": { "firebase/php-jwt": "~2.0|~3.0", - "google/apiclient-services": "^0.7", - "google/auth": "0.10", + "google/apiclient-services": "^0.5", + "google/auth": "0.9", "guzzlehttp/guzzle": "~5.2|~6.0", "guzzlehttp/psr7": "^1.2", "monolog/monolog": "^1.17", @@ -107,20 +107,21 @@ "keywords": [ "google" ], - "time": "2016-09-14 19:33:35" + "time": "2016-07-21 18:41:10" }, { "name": "google/apiclient-services", - "version": "v0.7", + "version": "v0.5", + "target-dir": "Google/Service", "source": { "type": "git", "url": "https://github.com/google/google-api-php-client-services.git", - "reference": "c07a8a9d424024f1a9fc5d62da8ed5467ed25909" + "reference": "a2d43f4c7eace8c7aa16c5ea83191344c63b4526" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/c07a8a9d424024f1a9fc5d62da8ed5467ed25909", - "reference": "c07a8a9d424024f1a9fc5d62da8ed5467ed25909", + "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/a2d43f4c7eace8c7aa16c5ea83191344c63b4526", + "reference": "a2d43f4c7eace8c7aa16c5ea83191344c63b4526", "shasum": "" }, "require": { @@ -129,7 +130,7 @@ "type": "library", "autoload": { "psr-0": { - "Google_Service_": "src" + "Google_Service_": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -141,20 +142,20 @@ "keywords": [ "google" ], - "time": "2016-09-14 19:12:27" + "time": "2016-07-21 18:01:41" }, { "name": "google/auth", - "version": "v0.10", + "version": "v0.9", "source": { "type": "git", "url": "https://github.com/google/google-auth-library-php.git", - "reference": "760e3fbe4064c0525c22e27e5374eada3c103da8" + "reference": "47c3c6bece495e58381a21fed13a735bd23a51cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/760e3fbe4064c0525c22e27e5374eada3c103da8", - "reference": "760e3fbe4064c0525c22e27e5374eada3c103da8", + "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/47c3c6bece495e58381a21fed13a735bd23a51cc", + "reference": "47c3c6bece495e58381a21fed13a735bd23a51cc", "shasum": "" }, "require": { @@ -189,20 +190,20 @@ "google", "oauth2" ], - "time": "2016-08-02 22:00:48" + "time": "2016-06-01 22:07:52" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.2", + "version": "6.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", "shasum": "" }, "require": { @@ -251,7 +252,7 @@ "rest", "web service" ], - "time": "2016-10-08 15:01:37" + "time": "2016-07-15 17:22:37" }, { "name": "guzzlehttp/promises", @@ -364,16 +365,16 @@ }, { "name": "monolog/monolog", - "version": "1.21.0", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952" + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952", - "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", "shasum": "" }, "require": { @@ -438,20 +439,20 @@ "logging", "psr-3" ], - "time": "2016-07-29 03:23:52" + "time": "2016-07-02 14:02:10" }, { "name": "phpseclib/phpseclib", - "version": "2.0.4", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3d265f7c079f5b37d33475f996d7a383c5fc8aeb", + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb", "shasum": "" }, "require": { @@ -530,7 +531,7 @@ "x.509", "x509" ], - "time": "2016-10-04 00:57:04" + "time": "2016-05-13 01:15:21" }, { "name": "pimple/pimple", @@ -580,16 +581,16 @@ }, { "name": "psr/cache", - "version": "1.0.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "9e66031f41fbbdda45ee11e93c45d480ccba3eb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/9e66031f41fbbdda45ee11e93c45d480ccba3eb3", + "reference": "9e66031f41fbbdda45ee11e93c45d480ccba3eb3", "shasum": "" }, "require": { @@ -622,20 +623,20 @@ "psr", "psr-6" ], - "time": "2016-08-06 20:24:11" + "time": "2015-12-11 02:52:07" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", "shasum": "" }, "require": { @@ -663,7 +664,6 @@ } ], "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", @@ -672,34 +672,26 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2015-05-04 20:22:00" }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "php": ">=5.3.0" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "psr-0": { + "Psr\\Log\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -713,13 +705,12 @@ } ], "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2012-12-21 11:40:51" }, { "name": "silex/silex", @@ -800,16 +791,16 @@ }, { "name": "symfony/debug", - "version": "v3.1.5", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8" + "reference": "06e2d52e307ef880ac739f44ee6c2418ca9e3283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", - "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", + "url": "https://api.github.com/repos/symfony/debug/zipball/06e2d52e307ef880ac739f44ee6c2418ca9e3283", + "reference": "06e2d52e307ef880ac739f44ee6c2418ca9e3283", "shasum": "" }, "require": { @@ -853,20 +844,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com/", - "time": "2016-09-06 11:02:40" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/event-dispatcher", - "version": "v3.0.9", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "54da3ff63dec3c9c0e32ec3f95a7d94ef64baa00" + "reference": "43e9a14f71db135da5c75dd5d383ecff6ada920e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/54da3ff63dec3c9c0e32ec3f95a7d94ef64baa00", - "reference": "54da3ff63dec3c9c0e32ec3f95a7d94ef64baa00", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/43e9a14f71db135da5c75dd5d383ecff6ada920e", + "reference": "43e9a14f71db135da5c75dd5d383ecff6ada920e", "shasum": "" }, "require": { @@ -913,20 +904,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com/", - "time": "2016-07-19 10:44:15" + "time": "2016-06-29 05:40:00" }, { "name": "symfony/http-foundation", - "version": "v3.0.9", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82" + "reference": "1341139f906d295baa4f4abd55293d07e25a065a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/49ba00f8ede742169cb6b70abe33243f4d673f82", - "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1341139f906d295baa4f4abd55293d07e25a065a", + "reference": "1341139f906d295baa4f4abd55293d07e25a065a", "shasum": "" }, "require": { @@ -966,20 +957,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com/", - "time": "2016-07-17 13:54:30" + "time": "2016-06-29 07:02:21" }, { "name": "symfony/http-kernel", - "version": "v3.0.9", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3" + "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d97ba4425e36e79c794e7d14ff36f00f081b37b3", - "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", + "reference": "177b63b2d50b63fa6d82ea41359ed9928cc7a1fb", "shasum": "" }, "require": { @@ -1048,7 +1039,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com/", - "time": "2016-07-30 09:10:37" + "time": "2016-06-30 16:30:17" }, { "name": "symfony/polyfill-mbstring", @@ -1111,7 +1102,7 @@ }, { "name": "symfony/routing", - "version": "v3.0.9", + "version": "v3.0.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", @@ -1242,16 +1233,16 @@ }, { "name": "google/cloud-tools", - "version": "v0.5.0", + "version": "v0.4.0", "source": { "type": "git", "url": "https://github.com/GoogleCloudPlatform/php-tools.git", - "reference": "79317583835061e4f4bf981376be84c41a4f4534" + "reference": "5bbdd075efcfc07d13e364b9d6b7697344c6914d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GoogleCloudPlatform/php-tools/zipball/79317583835061e4f4bf981376be84c41a4f4534", - "reference": "79317583835061e4f4bf981376be84c41a4f4534", + "url": "https://api.github.com/repos/GoogleCloudPlatform/php-tools/zipball/5bbdd075efcfc07d13e364b9d6b7697344c6914d", + "reference": "5bbdd075efcfc07d13e364b9d6b7697344c6914d", "shasum": "" }, "require": { @@ -1288,55 +1279,7 @@ "gcp", "test" ], - "time": "2016-10-07 22:03:44" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.3", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "c0125896dbb151380ab47e96c621741e79623beb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c0125896dbb151380ab47e96c621741e79623beb", - "reference": "c0125896dbb151380ab47e96c621741e79623beb", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com/" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2016-10-17 15:23:22" + "time": "2016-07-11 17:18:10" }, { "name": "phpdocumentor/reflection-common", @@ -1394,16 +1337,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "shasum": "" }, "require": { @@ -1435,7 +1378,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-06-10 09:48:41" }, { "name": "phpdocumentor/type-resolver", @@ -2035,23 +1978,23 @@ }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { @@ -2081,7 +2024,7 @@ "environment", "hhvm" ], - "time": "2016-08-18 05:49:44" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", @@ -2291,16 +2234,16 @@ }, { "name": "symfony/browser-kit", - "version": "v3.1.5", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "901319a31c9b3cee7857b4aeeb81b5d64dfa34fc" + "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/901319a31c9b3cee7857b4aeeb81b5d64dfa34fc", - "reference": "901319a31c9b3cee7857b4aeeb81b5d64dfa34fc", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dcf41ed026b0499254385b5c88f03247b2ba010b", + "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b", "shasum": "" }, "require": { @@ -2344,20 +2287,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com/", - "time": "2016-09-06 11:02:40" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/dom-crawler", - "version": "v3.1.5", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7" + "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/bb7395e8b1db3654de82b9f35d019958276de4d7", - "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0", + "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0", "shasum": "" }, "require": { @@ -2400,20 +2343,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com/", - "time": "2016-08-05 08:37:39" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/process", - "version": "v3.1.5", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "66de154ae86b1a07001da9fbffd620206e4faf94" + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/66de154ae86b1a07001da9fbffd620206e4faf94", - "reference": "66de154ae86b1a07001da9fbffd620206e4faf94", + "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", "shasum": "" }, "require": { @@ -2449,20 +2392,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com/", - "time": "2016-09-29 14:13:09" + "time": "2016-06-29 05:42:25" }, { "name": "symfony/yaml", - "version": "v3.1.5", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "368b9738d4033c8b93454cb0dbd45d305135a6d3" + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/368b9738d4033c8b93454cb0dbd45d305135a6d3", - "reference": "368b9738d4033c8b93454cb0dbd45d305135a6d3", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", "shasum": "" }, "require": { @@ -2498,33 +2441,32 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2016-09-25 08:27:07" + "time": "2016-06-29 05:41:56" }, { "name": "webmozart/assert", - "version": "1.1.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2548,7 +2490,7 @@ "check", "validate" ], - "time": "2016-08-09 15:02:57" + "time": "2015-08-24 13:29:44" } ], "aliases": [], diff --git a/appengine/flexible/cloudsql/nginx-app.conf b/appengine/flexible/cloudsql/nginx-app.conf new file mode 100644 index 0000000000..634c60a7d7 --- /dev/null +++ b/appengine/flexible/cloudsql/nginx-app.conf @@ -0,0 +1,6 @@ +# [START static-config] +location / { + # try to serve file directly, fallback to front controller + try_files $uri /index.php$is_args$args; +} +# [END static-config] diff --git a/appengine/flexible/cloudsql/tests/DeployTest.php b/appengine/flexible/cloudsql/tests/DeployTest.php deleted file mode 100644 index e68e39b6aa..0000000000 --- a/appengine/flexible/cloudsql/tests/DeployTest.php +++ /dev/null @@ -1,57 +0,0 @@ -client->request('GET', '/'); - - $this->assertEquals('200', $resp->getStatusCode()); - $this->assertContains("Last 10 visits:", (string) $resp->getBody()); - } - - public function beforeDeploy() - { - $tmpDir = FileUtil::cloneDirectoryIntoTmp(__DIR__ . '/..'); - self::$gcloudWrapper->setDir($tmpDir); - chdir($tmpDir); - - $connectionName = getenv('CLOUDSQL_CONNECTION_NAME'); - $user = getenv('MYSQL_USER'); - $password = getenv('MYSQL_PASSWORD'); - - $appYaml = Yaml::parse(file_get_contents('app.yaml')); - $appYaml['env_variables']['MYSQL_USER'] = $user; - $appYaml['env_variables']['MYSQL_PASSWORD'] = $password; - $appYaml['beta_settings']['cloud_sql_instances'] = $connectionName; - $appYaml['env_variables']['MYSQL_DSN'] = str_replace( - ['DATABASE', 'CONNECTION_NAME'], - ['cloud_samples_tests_php', $connectionName], - $appYaml['env_variables']['MYSQL_DSN'] - ); - - file_put_contents('app.yaml', Yaml::dump($appYaml)); - } -} diff --git a/appengine/flexible/cloudsql/tests/bootstrap.php b/appengine/flexible/cloudsql/tests/bootstrap.php index be234bb16a..855a955f73 100644 --- a/appengine/flexible/cloudsql/tests/bootstrap.php +++ b/appengine/flexible/cloudsql/tests/bootstrap.php @@ -15,4 +15,3 @@ * limitations under the License. */ require __DIR__ . '/../vendor/autoload.php'; -require_once __DIR__ . '/../../../../testing/FileUtil.php'; diff --git a/appengine/flexible/cloudsql/index.php b/appengine/flexible/cloudsql/web/index.php similarity index 91% rename from appengine/flexible/cloudsql/index.php rename to appengine/flexible/cloudsql/web/index.php index 9c4a8931de..12d15b8f37 100644 --- a/appengine/flexible/cloudsql/index.php +++ b/appengine/flexible/cloudsql/web/index.php @@ -17,9 +17,9 @@ // Install composer dependencies with "composer install" // @see http://getcomposer.org for more information. -require __DIR__ . '/vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; -$app = require __DIR__ . '/app.php'; +$app = require __DIR__ . '/../app.php'; // Run the app! // use "gcloud app deploy"