Migrating App Engine php5 with google libraries

133 views
Skip to first unread message

Jukka Hautakorpi

unread,
Aug 11, 2022, 10:59:03 AM8/11/22
to Google App Engine

I have php app with few hundred users made with php5. It is using some google libraries, but Actually I don't have them or composer in my local linux development project, yet they still work. Somehow google environment has those as default:

  require_once 'google/appengine/api/mail/Message.php';
  use \google\appengine\api\mail\Message;

Now I also need to add use Google\Cloud\Storage\StorageClient and also would like to migrate my app to standard php7 evironment with app.py

  1. Do i need the composer libraries the php7 version when running in google's servers ?
  2. Can I upload a second version of my php5 app to run in php7 for testing before making it promoted version ?

Osvaldo Lopez Acuña

unread,
Aug 11, 2022, 6:08:35 PM8/11/22
to Google App Engine
You can start by taking a look at this guide (if you haven't already done it) about Migrating from PHP5.5 to 7.2. In this GCP document you will learn about subjects related to migrating an app to PHP7+ in the App Engine standard environment. And finally, in this other document you will find information about migrating and Apps using legacy bundled services.

Jukka Hautakorpi

unread,
Aug 17, 2022, 8:57:59 AM8/17/22
to Google App Engine
Thanks

Those did help a little and got my test project forward.
Google documentation about this is really painful to read..
For example
"Access legacy bundled services for PHP 7+"
What does lecacy bundled service mean ??

I know i didn't need composer any libraries for example to make the mail work, but with php 7.4 it requires this installed via composer.
Yet if I add
/vendor/
into .gcloudignore
the library functions still works...
Reply all
Reply to author
Forward
0 new messages