Bug#670242: [php-maint] Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
On 04/25/2012 05:08 PM, TreeBoy wrote: Package: php-db Version: 1.7.13-2 Followup-For: Bug #670242 Dear Maintainer, I'm sorry, I did the diff after I had made the changes: I added the static in order to remove the problems about calls to DB::isManip() and DB::isError(). So the diff is of the altered file. (As an aside, I should have said that my error_reporting is as follows: error_reporting = E_ALL ) Regards, Peter FYI, I prepared an update for php-db. It currently sits in the Git in Alioth: Vcs-Browser: http://git.debian.org/?p=pkg-php/php-db.git Vcs-Git: http://git.debian.org/git/pkg-php/php-db.git It'd be great if you could test it with your application, and confirm that the new package is working correctly before I upload. Note that this includes the static declaration of isError and isManip as you told us. Cheers, Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
Package: php-db Version: 1.7.13-2 Followup-For: Bug #670242 Dear Maintainer, I'm afraid that I do not know how to carry out this test. I have the repo cloed down to my machine, but I do not know how to build the package: can you tell me where I can find instructions, please ? Sorry for my ignorance. -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages php-db depends on: ii php-pear 5.4.1~rc1-1 php-db recommends no packages. php-db suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
Package: php-db Followup-For: Bug #670242 Dear Thomas, I'm glad to be able to say that I have built the package by downloading DB-1.7.14.tgz, renaming it tp php-db-1.7.14.tar.gz and then running: dpkg-buildpackage -us -uc This produced the following output which I hope is correct: $ dpkg-buildpackage -us -uc dpkg-buildpackage: source package php-db dpkg-buildpackage: source version 1.7.14-1 dpkg-buildpackage: source changed by Thomas Goirand z...@debian.org dpkg-buildpackage: host architecture amd64 dpkg-source --before-build php-db dpkg-source: info: patches are not applied, applying them now dpkg-source: info: applying static-function-for-isError-and-isManip fakeroot debian/rules clean dh clean --buildsystem=phppear --with phppear dh_testdir -O--buildsystem=phppear dh_auto_clean -O--buildsystem=phppear dh_clean -O--buildsystem=phppear dpkg-source -b php-db dpkg-source: info: using source format `3.0 (quilt)' dpkg-source: info: building php-db using existing ./php-db_1.7.14.orig.tar.gz dpkg-source: info: building php-db in php-db_1.7.14-1.debian.tar.gz dpkg-source: info: building php-db in php-db_1.7.14-1.dsc debian/rules build dh build --buildsystem=phppear --with phppear dh_testdir -O--buildsystem=phppear dh_auto_configure -O--buildsystem=phppear dh_auto_build -O--buildsystem=phppear dh_auto_test -O--buildsystem=phppear fakeroot debian/rules binary dh binary --buildsystem=phppear --with phppear dh_testroot -O--buildsystem=phppear dh_prep -O--buildsystem=phppear dh_installdirs -O--buildsystem=phppear dh_auto_install -O--buildsystem=phppear warning: pear/DB requires package pear/PEAR (version = 1.0b1) install ok: channel://pear.php.net/DB-1.7.14 PHP Notice: Undefined index: changelog in /usr/share/pkg-php-tools/scripts/phppkginfo on line 244 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/share/pkg-php-tools/scripts/phppkginfo on line 245 PHP Warning: array_reverse() expects parameter 1 to be array, null given in /usr/share/pkg-php-tools/scripts/phppkginfo on line 248 PHP Warning: Invalid argument supplied for foreach() in /usr/share/pkg-php-tools/scripts/phppkginfo on line 249 dh_install -O--buildsystem=phppear dh_installdocs -O--buildsystem=phppear dh_installchangelogs -O--buildsystem=phppear dh_installexamples -O--buildsystem=phppear dh_installman -O--buildsystem=phppear dh_installcatalogs -O--buildsystem=phppear dh_installcron -O--buildsystem=phppear dh_installdebconf -O--buildsystem=phppear dh_installemacsen -O--buildsystem=phppear dh_installifupdown -O--buildsystem=phppear dh_installinfo -O--buildsystem=phppear dh_pysupport -O--buildsystem=phppear dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide: http://deb.li/dhs2p dh_installinit -O--buildsystem=phppear dh_installmenu -O--buildsystem=phppear dh_installmime -O--buildsystem=phppear dh_installmodules -O--buildsystem=phppear dh_installlogcheck -O--buildsystem=phppear dh_installlogrotate -O--buildsystem=phppear dh_installpam -O--buildsystem=phppear dh_installppp -O--buildsystem=phppear dh_installudev -O--buildsystem=phppear dh_installwm -O--buildsystem=phppear dh_installxfonts -O--buildsystem=phppear dh_installgsettings -O--buildsystem=phppear dh_bugfiles -O--buildsystem=phppear dh_ucf -O--buildsystem=phppear dh_lintian -O--buildsystem=phppear dh_gconf -O--buildsystem=phppear dh_icons -O--buildsystem=phppear dh_perl -O--buildsystem=phppear dh_usrlocal -O--buildsystem=phppear dh_phppear -O--buildsystem=phppear dh_link -O--buildsystem=phppear dh_compress -O--buildsystem=phppear dh_fixperms -O--buildsystem=phppear dh_installdeb -O--buildsystem=phppear dh_gencontrol -O--buildsystem=phppear dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:Debian-Depends} dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:summary} dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:description} dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:channel} dh_md5sums -O--buildsystem=phppear dh_builddeb -O--buildsystem=phppear dpkg-deb: building package `php-db' in `../php-db_1.7.14-1_all.deb'. dpkg-genchanges ../php-db_1.7.14-1_amd64.changes dpkg-genchanges: including full source code in upload dpkg-source --after-build php-db dpkg-source: info: unapplying static-function-for-isError-and-isManip dpkg-buildpackage: full upload (original source is included) I then installed the package which has now removed the problem. Bear in mind that my script is not too advanced at the moment: it merely does a username and sha1 lookup and then a list of a single table, without using prepared statements or anything, so I cannot call this a complete coverage test, but it has removed the problem I originally
Bug#670242: [php-maint] Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
On 04/26/2012 10:26 PM, TreeBoy wrote: Package: php-db Followup-For: Bug #670242 Dear Thomas, I'm glad to be able to say that I have built the package by downloading DB-1.7.14.tgz, renaming it tp php-db-1.7.14.tar.gz and then running: dpkg-buildpackage -us -uc This produced the following output which I hope is correct: $ dpkg-buildpackage -us -uc [...] Well, you'd normally run git-buildpackage, but what you did is a valid way to build as well, even though it may leave dirt in your local Git repository (which you may don't care about anyway). I then installed the package which has now removed the problem. Cool. I'll wait for Ondrej and Thijs agreement about uploading, since I was not the origin maintainer (just out of respect for their past work), then I'll upload the fixed package. Bear in mind that my script is not too advanced at the moment: it merely does a username and sha1 lookup and then a list of a single table, without using prepared statements or anything, so I cannot call this a complete coverage test, but it has removed the problem I originally reported. Well, it's still better than me doing zero functional testing of the package, and your tests are helping and saving my time, so thanks for doing it. Please note that building the package in Squeeze will *fail*, as the version of PEAR isn't high enough to handle the package.xml correctly. So a version depends will be needed, which I will add before uploading. Cheers, Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
Package: php-db Version: 1.7.13-2 Followup-For: Bug #670242 Dear Maintainer, I'm sorry, I did the diff after I had made the changes: I added the static in order to remove the problems about calls to DB::isManip() and DB::isError(). So the diff is of the altered file. (As an aside, I should have said that my error_reporting is as follows: error_reporting = E_ALL ) Regards, Peter -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages php-db depends on: ii php-pear 5.4.1~rc1-1 php-db recommends no packages. php-db suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
Package: php-db Version: 1.7.13-2 Severity: minor Dear Maintainer, When running PHP in strict mode, I get lots of warnings from the parser telling me that there are non-static functions in DB.php that are being called statically from common.php. Although the code appears to work, it makes catching problems in our apache logs very difficult. These functions are isManip and isError. I have altered the declaration of these two functions and I no longer get the warnings filling my apache error logs and my code still works as expected: would you be able make the same changes to the real code, please ? My changes are: 592c592 static function isError($value) --- function isError($value) 628c628 static function isManip($query) --- function isManip($query) Many thanks, -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages php-db depends on: ii php-pear 5.4.1~rc1-1 php-db recommends no packages. php-db suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#670242: [php-maint] Bug#670242: php-db: Warnings about static calls to non-static methods from common.php
On 04/24/2012 07:13 PM, TreeBoy wrote: My changes are: 592c592 static function isError($value) --- function isError($value) 628c628 static function isManip($query) --- function isManip($query) Hi, I did some greps in the code, and didn't see any function declared as static at all. Are you sure that this is coming from this package? Cheers, Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org