sscarpa / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Use namespaces #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use robot loader from nette framework
2. try to rebuild robot loader cache
3.

What is the expected output? What do you see instead?

expected output is no errors, but i see exceptions about ambiguous classes 
because you have more classes with the same name

What version of the product are you using? On what operating system?

0.4.7 windows 7, debian 6
Please provide any additional information below.

please use namespaces. php 5.3 has been here over 1 year. it is year 2012 
almost. 

Original issue reported on code.google.com by digitask...@gmail.com on 19 Dec 2011 at 3:46

GoogleCodeExporter commented 8 years ago
Is any modern php lib for google API?

Original comment by olegz@default-value.com on 20 Dec 2011 at 9:36

GoogleCodeExporter commented 8 years ago
is there any progress on the namespaces? all modern php libraries use 
namespaces now, this library would only benefit from their use. 

not to mention that i cannot name my doctrine odm documents like for example 
Activity(i don't use namespaces here myself on purpose), because it exists in 
google library.

if you hosted the code on github i could make a patch for it, but since it's on 
google code i can't

Original comment by digitask...@gmail.com on 20 Feb 2012 at 10:03

GoogleCodeExporter commented 8 years ago
Could this be forked to GitHub? This is really irritating and is giving me 
other issues when trying to use along with Doctrine. In my case:

--
[Semantical Error] The class "Annotation" is not annotated with @Annotation. 
Are you sure this class can be used as annotation?
--

Not sure if namespaces would fix this, but either way the namespace thing is an 
issue.

Original comment by wesl...@gmail.com on 23 May 2012 at 12:32

GoogleCodeExporter commented 8 years ago
namespaces would most definitely fix this.  You should use the GData namespace 
and it involves adding 1 line at the top of every file:

namespace GData;

and then prefixing every instance of the Exception class with \Exception.

Original comment by g...@chiaraquartet.net on 18 Jun 2012 at 8:51

GoogleCodeExporter commented 8 years ago
It appears that a good percentage of the client library's usage still comes 
from versions of PHP lower than 5.3, so we're stuck using underscores for 
namespacing.

The underscore implementation of PSR0 
(https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) is 
coming soon.

Original comment by chirags@google.com on 1 Aug 2012 at 4:28

GoogleCodeExporter commented 8 years ago
The client library is now namespaced with "Google_" on trunk as of r474.

Original comment by chirags@google.com on 3 Aug 2012 at 12:25