Hi,
I'm trying to use the Google App Engine Flex with PHP 7.2 (Beta).
When I'm uploading my project I got the following error :
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 16900 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.beta.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app.
fieldViolations:
- description: This deployment has too many files. New versions are limited to 10000
files for this app.
field: version.deployment.files[...]
2019/01/19 14:39:23 Received TERM signal. Waiting up to 0s before terminating.
Updated property [core/project].
While if I look inside a previous version that runs PHP7.1, I can see that most of the files are from Google library, with a count of file already exceeding the limit : 11821 !
root@e7486400bc7d:/app/server/vendor# for i in $(ls -a); do echo -n "$i : "; find $i | wc -l; done
. : 14922
.. : 15175
autoload.php : 1
bin : 3
composer : 10
container-interop : 21
firebase : 10
fzaninotto : 718
google : 11821
grpc : 20
guzzlehttp : 100
lcobucci : 99
monolog : 205
nesbot : 90
nikic : 50
paragonie : 14
phpmailer : 117
phpseclib : 43
pimple : 64
psr : 49
ralouphie : 11
ramsey : 65
rize : 35
robmorgan : 197
sendgrid : 198
slim : 72
symfony : 908
root@e7486400bc7d:/app/server/vendor#
And most of the files are from
root@e7486400bc7d:/app/server/vendor/google# for i in $(ls -a); do echo -n "$i : "; find $i | wc -l; done
. : 11821
.. : 14922
apiclient : 34
apiclient-services : 8801
auth : 93
cloud-core : 152
cloud-pubsub : 84
cloud-storage : 26
gax : 394
grpc-gcp : 29
protobuf : 2207
root@e7486400bc7d:/app/server/vendor/google#
This guy has a dirty workaround :
$ cd laravel
$ mv vendor/google/apiclient-services/src/Google/Service/Gmail /tmp
$ mv vendor/google/apiclient-services/src/Google/Service/Gmail.php /tmp
$ rm -rf vendor/google/apiclient-services/src/Google/Service/*
$ mv /tmp/Gmail vendor/google/apiclient-services/src/Google/Service/
$ mv /tmp/Gmail.php vendor/google/apiclient-services/src/Google/Service/
$ ls -FR | grep -v / | grep -v "^$" | wc -l
5832
(previous count was above 10'000)
Do you know if there's a cleaner way to handle that ?
Regards,
Thomas.