summaryrefslogtreecommitdiffstats
path: root/php-google-apiclient-1.1.2-move_autoloader.patch
blob: 35bc716f3396dc48d0b756eef9a621965071664b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
diff --git a/examples/appengineauth.php b/examples/appengineauth.php
index 4300c70..7b147e9 100644
--- a/examples/appengineauth.php
+++ b/examples/appengineauth.php
@@ -21,7 +21,7 @@ include_once "templates/base.php";
   Make an API request authenticated via the 
   AppIdentity service on AppEngine.
  ************************************************/
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 echo pageHeader("AppIdentity Account Access");
 
diff --git a/examples/batch.php b/examples/batch.php
index 3a51ab9..5183e58 100644
--- a/examples/batch.php
+++ b/examples/batch.php
@@ -22,7 +22,7 @@ echo pageHeader("Batching Queries");
   books API again as an example, but this time we
   will batch up two queries into a single call.
  ************************************************/
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   We create the client and set the simple API
diff --git a/examples/fileupload.php b/examples/fileupload.php
index 0940e1c..6a20390 100644
--- a/examples/fileupload.php
+++ b/examples/fileupload.php
@@ -17,7 +17,7 @@
 include_once "templates/base.php";
 session_start();
 
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   We'll setup an empty 20MB file to upload.
diff --git a/examples/idtoken.php b/examples/idtoken.php
index 963f35b..e3991e9 100644
--- a/examples/idtoken.php
+++ b/examples/idtoken.php
@@ -17,7 +17,7 @@
 include_once "templates/base.php";
 session_start();
 
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   ATTENTION: Fill in these values! Make sure
diff --git a/examples/multi-api.php b/examples/multi-api.php
index 3780287..86f682c 100644
--- a/examples/multi-api.php
+++ b/examples/multi-api.php
@@ -17,7 +17,7 @@
 include_once "templates/base.php";
 session_start();
 
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   ATTENTION: Fill in these values! Make sure
diff --git a/examples/service-account.php b/examples/service-account.php
index 4cc0840..45dc75c 100644
--- a/examples/service-account.php
+++ b/examples/service-account.php
@@ -21,7 +21,7 @@ include_once "templates/base.php";
   Make an API request authenticated with a service
   account.
  ************************************************/
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   ATTENTION: Fill in these values! You can get
diff --git a/examples/simple-query.php b/examples/simple-query.php
index e22790b..b3fd128 100644
--- a/examples/simple-query.php
+++ b/examples/simple-query.php
@@ -25,7 +25,7 @@ echo pageHeader("Simple API Access");
   should use our quota, which is higher than the
   anonymous quota (which is limited per IP).
  ************************************************/
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   We create the client and set the simple API
diff --git a/examples/simplefileupload.php b/examples/simplefileupload.php
index 1d8fbda..40f14f2 100644
--- a/examples/simplefileupload.php
+++ b/examples/simplefileupload.php
@@ -17,7 +17,7 @@
 include_once "templates/base.php";
 session_start();
 
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   We'll setup an empty 1MB file to upload.
diff --git a/examples/user-example.php b/examples/user-example.php
index 4370b08..9cfd3d2 100644
--- a/examples/user-example.php
+++ b/examples/user-example.php
@@ -17,7 +17,7 @@
 include_once "templates/base.php";
 session_start();
 
-require_once realpath(dirname(__FILE__) . '/../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
 
 /************************************************
   ATTENTION: Fill in these values! Make sure
diff --git a/src/Google/Auth/Abstract.php b/src/Google/Auth/Abstract.php
index c1e36dc..d099937 100644
--- a/src/Google/Auth/Abstract.php
+++ b/src/Google/Auth/Abstract.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Abstract class for the Authentication in the API client
diff --git a/src/Google/Auth/AppIdentity.php b/src/Google/Auth/AppIdentity.php
index ff96a9d..c40b37d 100644
--- a/src/Google/Auth/AppIdentity.php
+++ b/src/Google/Auth/AppIdentity.php
@@ -22,7 +22,7 @@
  */
 use google\appengine\api\app_identity\AppIdentityService;
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Authentication via the Google App Engine App Identity service.
diff --git a/src/Google/Auth/AssertionCredentials.php b/src/Google/Auth/AssertionCredentials.php
index 2b92c57..97ef4e0 100644
--- a/src/Google/Auth/AssertionCredentials.php
+++ b/src/Google/Auth/AssertionCredentials.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
diff --git a/src/Google/Auth/Exception.php b/src/Google/Auth/Exception.php
index 81c795a..be43955 100644
--- a/src/Google/Auth/Exception.php
+++ b/src/Google/Auth/Exception.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_Auth_Exception extends Google_Exception
 {
diff --git a/src/Google/Auth/LoginTicket.php b/src/Google/Auth/LoginTicket.php
index b29abdf..6415533 100644
--- a/src/Google/Auth/LoginTicket.php
+++ b/src/Google/Auth/LoginTicket.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Class to hold information about an authenticated login.
diff --git a/src/Google/Auth/OAuth2.php b/src/Google/Auth/OAuth2.php
index 58e86e5..0c72a64 100644
--- a/src/Google/Auth/OAuth2.php
+++ b/src/Google/Auth/OAuth2.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Authentication class that deals with the OAuth 2 web-server authentication flow
diff --git a/src/Google/Auth/Simple.php b/src/Google/Auth/Simple.php
index 3c85ae3..5514cf5 100644
--- a/src/Google/Auth/Simple.php
+++ b/src/Google/Auth/Simple.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Simple API access implementation. Can either be used to make requests
diff --git a/src/Google/Cache/Apc.php b/src/Google/Cache/Apc.php
index 7c9a075..72eeb10 100644
--- a/src/Google/Cache/Apc.php
+++ b/src/Google/Cache/Apc.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * A persistent storage class based on the APC cache, which is not
diff --git a/src/Google/Cache/Exception.php b/src/Google/Cache/Exception.php
index a1d2d7a..9a73a82 100644
--- a/src/Google/Cache/Exception.php
+++ b/src/Google/Cache/Exception.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_Cache_Exception extends Google_Exception
 {
diff --git a/src/Google/Cache/File.php b/src/Google/Cache/File.php
index e4c99ad..4ad53bf 100644
--- a/src/Google/Cache/File.php
+++ b/src/Google/Cache/File.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /*
  * This class implements a basic on disk storage. While that does
diff --git a/src/Google/Cache/Memcache.php b/src/Google/Cache/Memcache.php
index c9fb4bc..2afce67 100644
--- a/src/Google/Cache/Memcache.php
+++ b/src/Google/Cache/Memcache.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * A persistent storage class based on the memcache, which is not
diff --git a/src/Google/Cache/Null.php b/src/Google/Cache/Null.php
index 0cd24c5..56c6edb 100644
--- a/src/Google/Cache/Null.php
+++ b/src/Google/Cache/Null.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * A blank storage class, for cases where caching is not
diff --git a/src/Google/Client.php b/src/Google/Client.php
index 1de6c59..98794b2 100644
--- a/src/Google/Client.php
+++ b/src/Google/Client.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/autoload.php');
 
 /**
  * The Google API Client
diff --git a/src/Google/Collection.php b/src/Google/Collection.php
index dbb2855..eebe56b 100644
--- a/src/Google/Collection.php
+++ b/src/Google/Collection.php
@@ -1,6 +1,6 @@
 <?php
 
-require_once realpath(dirname(__FILE__) . '/../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/autoload.php');
 
 /**
  * Extension to the regular Google_Model that automatically
diff --git a/src/Google/Http/Batch.php b/src/Google/Http/Batch.php
index 543ac57..a78c38d 100644
--- a/src/Google/Http/Batch.php
+++ b/src/Google/Http/Batch.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * @author Chirag Shah <chirags@google.com>
diff --git a/src/Google/Http/CacheParser.php b/src/Google/Http/CacheParser.php
index 298317c..2fea46f 100644
--- a/src/Google/Http/CacheParser.php
+++ b/src/Google/Http/CacheParser.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Implement the caching directives specified in rfc2616. This
diff --git a/src/Google/Http/MediaFileUpload.php b/src/Google/Http/MediaFileUpload.php
index 87f3762..7d6d5f1 100644
--- a/src/Google/Http/MediaFileUpload.php
+++ b/src/Google/Http/MediaFileUpload.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * @author Chirag Shah <chirags@google.com>
diff --git a/src/Google/Http/REST.php b/src/Google/Http/REST.php
index 6ac9f07..3adfede 100644
--- a/src/Google/Http/REST.php
+++ b/src/Google/Http/REST.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * This class implements the RESTful transport of apiServiceRequest()'s
diff --git a/src/Google/Http/Request.php b/src/Google/Http/Request.php
index 9811c14..1c302a7 100644
--- a/src/Google/Http/Request.php
+++ b/src/Google/Http/Request.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * HTTP Request to be executed by IO classes. Upon execution, the
diff --git a/src/Google/IO/Abstract.php b/src/Google/IO/Abstract.php
index fc8edbe..cb8e619 100644
--- a/src/Google/IO/Abstract.php
+++ b/src/Google/IO/Abstract.php
@@ -19,7 +19,7 @@
  * Abstract IO base class
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 abstract class Google_IO_Abstract
 {
diff --git a/src/Google/IO/Curl.php b/src/Google/IO/Curl.php
index 8bd6738..8bf1213 100644
--- a/src/Google/IO/Curl.php
+++ b/src/Google/IO/Curl.php
@@ -21,7 +21,7 @@
  * @author Stuart Langley <slangley@google.com>
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_IO_Curl extends Google_IO_Abstract
 {
diff --git a/src/Google/IO/Exception.php b/src/Google/IO/Exception.php
index 98e9d25..cb0b6ec 100644
--- a/src/Google/IO/Exception.php
+++ b/src/Google/IO/Exception.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_IO_Exception extends Google_Exception
 {
diff --git a/src/Google/IO/Stream.php b/src/Google/IO/Stream.php
index 35f9d90..5345544 100644
--- a/src/Google/IO/Stream.php
+++ b/src/Google/IO/Stream.php
@@ -21,7 +21,7 @@
  * @author Stuart Langley <slangley@google.com>
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_IO_Stream extends Google_IO_Abstract
 {
diff --git a/src/Google/Logger/Abstract.php b/src/Google/Logger/Abstract.php
index 571918c..9d07e58 100644
--- a/src/Google/Logger/Abstract.php
+++ b/src/Google/Logger/Abstract.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Abstract logging class based on the PSR-3 standard.
diff --git a/src/Google/Logger/Exception.php b/src/Google/Logger/Exception.php
index 7c828e6..f1a7927 100644
--- a/src/Google/Logger/Exception.php
+++ b/src/Google/Logger/Exception.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_Logger_Exception extends Google_Exception
 {
diff --git a/src/Google/Logger/File.php b/src/Google/Logger/File.php
index f337471..a9efa4d 100644
--- a/src/Google/Logger/File.php
+++ b/src/Google/Logger/File.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * File logging class based on the PSR-3 standard.
diff --git a/src/Google/Logger/Null.php b/src/Google/Logger/Null.php
index 9c5f64a..0feb24f 100644
--- a/src/Google/Logger/Null.php
+++ b/src/Google/Logger/Null.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Null logger based on the PSR-3 standard.
diff --git a/src/Google/Logger/Psr.php b/src/Google/Logger/Psr.php
index d577244..da565ca 100644
--- a/src/Google/Logger/Psr.php
+++ b/src/Google/Logger/Psr.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Psr logging class based on the PSR-3 standard.
diff --git a/src/Google/Service/Exception.php b/src/Google/Service/Exception.php
index 65c1fcc..502229c 100644
--- a/src/Google/Service/Exception.php
+++ b/src/Google/Service/Exception.php
@@ -1,6 +1,6 @@
 <?php
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 class Google_Service_Exception extends Google_Exception
 {
diff --git a/src/Google/Service/Resource.php b/src/Google/Service/Resource.php
index 29bc06e..3d64942 100644
--- a/src/Google/Service/Resource.php
+++ b/src/Google/Service/Resource.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Implements the actual methods/resources of the discovered Google API using magic function
diff --git a/src/Google/Signer/P12.php b/src/Google/Signer/P12.php
index 92ccbc8..ae0e047 100644
--- a/src/Google/Signer/P12.php
+++ b/src/Google/Signer/P12.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Signs data.
diff --git a/src/Google/Verifier/Pem.php b/src/Google/Verifier/Pem.php
index 563553b..f217c92 100644
--- a/src/Google/Verifier/Pem.php
+++ b/src/Google/Verifier/Pem.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
  
-require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
+require_once realpath(dirname(__FILE__) . '/../autoload.php');
 
 /**
  * Verifies signatures using PEM encoded certificates.
diff --git a/tests/OAuthHelper.php b/tests/OAuthHelper.php
index e83e3e5..1e36a4f 100644
--- a/tests/OAuthHelper.php
+++ b/tests/OAuthHelper.php
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require_once dirname(__FILE__) . '/../autoload.php';
+require_once dirname(__FILE__) . '/../src/Google/autoload.php';
 
 $client = new Google_Client();
 $client->setScopes(
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index e1783a0..327b974 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-require_once dirname(__FILE__) . '/../autoload.php';
+require_once dirname(__FILE__) . '/../src/Google/autoload.php';
 require_once dirname(__FILE__) . '/BaseTest.php';
 
 date_default_timezone_set('UTC');
diff --git a/README.md b/README.md
index 7508aeb..752dad9 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ See the examples/ directory for examples of the key client features.
 ```PHP
 <?php
 
-  require_once 'google-api-php-client/autoload.php'; // or wherever autoload.php is located
+  require_once 'google-api-php-client/src/Google/autoload.php'; // or wherever autoload.php is located
   
   $client = new Google_Client();
   $client->setApplicationName("Client_Library_Examples");
diff --git a/autoload.php b/autoload.php
index 3815c52..25af272 100644
--- a/autoload.php
+++ b/autoload.php
@@ -15,19 +15,12 @@
  * limitations under the License.
  */
 
-function google_api_php_client_autoload($className) {
-  $classPath = explode('_', $className);
-  if ($classPath[0] != 'Google') {
-    return;
-  }
-  if (count($classPath) > 3) {
-    // Maximum class file path depth in this project is 3.
-    $classPath = array_slice($classPath, 0, 3);
-  }
-  $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php';
-  if (file_exists($filePath)) {
-    require_once($filePath);
-  }
+// PHP 5.2 compatibility: E_USER_DEPRECATED was added in 5.3
+if (!defined('E_USER_DEPRECATED')) {
+  define('E_USER_DEPRECATED', E_USER_WARNING);
 }
 
-spl_autoload_register('google_api_php_client_autoload');
+$error = "google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This ";
+$error .= "redirect will be removed in 1.2. Please adjust your code to use the new location.";
+trigger_error($error, E_USER_DEPRECATED);
+require_once 'src/Google/autoload.php';
diff --git a/src/Google/autoload.php b/src/Google/autoload.php
new file mode 100644
index 0000000..debdd27
--- /dev/null
+++ b/src/Google/autoload.php
@@ -0,0 +1,32 @@
+<?php
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function google_api_php_client_autoload($className) {
+  $classPath = explode('_', $className);
+  if ($classPath[0] != 'Google') {
+    return;
+  }
+  // Drop 'Google', and maximum class file path depth in this project is 3.
+  $classPath = array_slice($classPath, 1, 2);
+
+  $filePath = dirname(__FILE__) . '/' . implode('/', $classPath) . '.php';
+  if (file_exists($filePath)) {
+    require_once($filePath);
+  }
+}
+
+spl_autoload_register('google_api_php_client_autoload');