Closed hdp617 closed 1 year ago
Asked this to mtraver a while ago. We can't and he said we shouldn't attempt to support it. So as mentioned in the doc just asking users to modify their composer.json should be good enough because what's in the composer.json is installed automatically.
On Fri, Oct 9, 2020 at 4:01 PM Huy Pham notifications@github.com wrote:
In PHP 5.5, users can write code like [0]
// Simple HTTP GET and PUT operators. $app->get('/memcache/{key}', function ($key) {
[START gae_memcache_get]
$memcache = new Memcache; return $memcache->get($key); # [END gae_memcache_get]
});
without importing the Memcache class from the SDK.
Can we achieve this in PHP 7.x with autoloading? @bshaffer https://github.com/bshaffer
cc: @hazemm96 https://github.com/hazemm96
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/appengine-php-sdk/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/APOMUFA3P653POTGXEC2KX3SJ6I3TANCNFSM4SKTXTQA .
Are we talking about the same thing. I'm referring to autoloading the classes provided by the SDK; not installing the SDK on behalf of users if it's not in composer.json
. cc @mtraver
Right, those are different things. Autoloading is fine. What I said is that we shouldn't ship the SDK with the runtime like we do for PHP 5.5. Users must include it in composer.json
.
In PHP 5.5, users can write code like [0]
without importing the
Memcache
class from the SDK.Can we achieve this in PHP 7.x with autoloading? @bshaffer
cc: @hazemm96
[0] https://github.com/GoogleCloudPlatform/php-docs-samples/blob/eec5f5ca0c7757a9ef7afaeeeaa3c60228393f44/appengine/php55/memcache/app.php#L55