This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214769 - [SaaS][PHP] Google - code generation is deprecated
Summary: [SaaS][PHP] Google - code generation is deprecated
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.2
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Denis Anisimov
URL: http://netbeans.org/kb/docs/php/php-s...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-26 10:42 UTC by efremmc2
Modified: 2012-09-19 03:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description efremmc2 2012-06-26 10:42:28 UTC
SaaS in PHP: Google Map Service

The code that is being generated is using "deprecated" references as shown below.  This was found from http://netbeans.org/kb/docs/php/php-saas-googlemap.html SaaS in PHP: Google Map Service Tutorial.


This does not work because Google has upgraded the API from version 2 to version 3.   It does show a map after all these error at the end.

Errors on stating:


Deprecated: Assigning the return value of new by reference is deprecated in
C:\xampp\htdocs\GoogleMapApp\org_netbeans_saas\RestConnection.php on line 47

Deprecated: Assigning the return value of new by reference is deprecated in
C:\xampp\php\PEAR\HTTP\Request.php on line 412

Deprecated: Assigning the return value of new by reference is deprecated in
C:\xampp\php\PEAR\HTTP\Request.php on line 736

Deprecated: Assigning the return value of new by reference is deprecated in
C:\xampp\php\PEAR\HTTP\Request.php on line 749

Deprecated: Assigning the return value of new by reference is deprecated in
C:\xampp\php\PEAR\HTTP\Request.php on line 794

Strict Standards: Redefining already defined constructor for class Net_URL in
C:\xampp\php\PEAR\Net\URL.php on line 124

Just a few listed here
Comment 1 efremmc2 2012-06-26 10:44:46 UTC
Walk through the Tutorial as noted: http://netbeans.org/kb/docs/php/php-saas-googlemap.html

There might be other related services that require some testing.
Comment 2 Denis Anisimov 2012-09-18 12:09:29 UTC
I'm not an expert in PHP but I see here only "Deprecated" notifications.
Are they fatal ?
Anyway, they have no relation to upgrading Google API.

I've just checked the REST service used in the generated code and it works fine.
It is true that Google has upgraded the API but it doesn't means that 
previous version doesn't work. It perfectly works.

I see only one "Deprecated" reference that has relation to code generated by NB:
it is very first warning :
....RestConnection.php on line 47

All other are about your PHP PEAR classes. I have no idea how did you get them.

As a result : there are not problems with used Google API version.
All "Deprected" warnings looks like PHP version inconsistency, see f.e.
http://php.net/manual/en/migration53.deprecated.php

To avoid "Deprecated" notifications you could use error_reporting() function  excluding E_DEPRECATED.

I'm going to fix RestConnection.php generation respectively on PHP 
project version. That's all what can I do here in WS area.
I'm not able to fix all other "Deprecated" notifications because this is 
not WS area.
Comment 3 Denis Anisimov 2012-09-18 16:25:35 UTC
This is the fix for NB generated code:
web-main#fa157ab9e910
All other errors are PEAR file errors and out of scope WS area.
Comment 4 Quality Engineering 2012-09-19 03:02:23 UTC
Integrated into 'main-golden', will be available in build *201209190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fa157ab9e910
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#214769 - [SaaS][PHP] Google - code generation is deprecated (