[PHP-BUG] Req #61495 [NEW]: SoapClient::getNameSpace
From: Operating system: ALL PHP version: Irrelevant Package: SOAP related Bug Type: Feature/Change Request Bug description:SoapClient::getNameSpace Description: --- >From manual page: http://www.php.net/soapheader.soapheader --- SoapHeader::SoapHeader ( string $namespace , <- we need to pass the $namespace!!! string $name [, mixed $data [, bool $mustunderstand = false [, string $actor ]]] ) SoapHeader requires passing the namespace for the header. The namespace would normally be specified in the wsdl file which is passed to the SoapClient constructor. If the wsdl file changes its namespace (which is allowed) there is no way to know without first downloading and parsing the file. This is counter productive since we need to pass the link to SoapClient anyway. My feature request is to be able to call a new SoapClient method (maybe called getNameSpace) that will return the namespace specified in the parsed wsdl file. Obviously this is only for wsdl based SoapClients. Test script: --- No test script since the feature is not implemented yet.. Expected result: $client = new SoapClient($pathToWsdlFile); $client->__soapCall("SomeFunction", array($a, $b, $c), NULL, new SoapHeader($client->getNameSpace, 'echoMeStringRequest', 'hello world')); Actual result: -- $client = new SoapClient($pathToWsdlFile); $client->__soapCall("SomeFunction", array($a, $b, $c), NULL, new SoapHeader('namespace', 'echoMeStringRequest', 'hello world')); -- Edit bug report at https://bugs.php.net/bug.php?id=61495&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61495&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61495&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61495&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61495&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61495&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61495&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61495&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61495&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61495&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61495&r=support Expected behavior: https://bugs.php.net/fix.php?id=61495&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61495&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61495&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61495&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61495&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61495&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61495&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61495&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61495&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61495&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61495&r=mysqlcfg
[PHP-BUG] Bug #61642 [NEW]: modify("+5 weekdays") returns Sunday
From: Operating system: Fedora 14 and Windows 7 PHP version: Irrelevant Package: Date/time related Bug Type: Bug Bug description:modify("+5 weekdays") returns Sunday Description: Tested on Windows 7: Apache/2.2.16 (Win32) PHP/5.3.5 Tested on Fedora 14: Fedora release 14 (Laughlin) Linux 2.6.35.4-rscloud x86_64 php.x86_64 5.3.8-3.fc14 These are the latest stable versions I can find for these two systems. (Especially since V6 binaries are no longer available for Windows.) The Linux system is a live server using a framework that has not been tested with any later versions than 5.3.8 When modifying a DateTime instance with "+5 weekdays" it will return a date for a Sunday and not a weekday. Running the Test script you note that the section for "5" returns Sunday. All the other numbers are correct. Note the pattern for skipping the weekends is always for Friday, Saturday and Sunday. However for "+5" weekends should be skipped for Saturday, Sunday and Monday, which is different than for any other number. Test script: --- $days = array(1,2,3,4,5,6,7,8,); $dates = array('2012-03-29','2012-03-30','2012-03-31','2012-04-01','2012-04-02','2012-04-03','2012-04-04','2012-04-05',); foreach ($days as $businessdays) { foreach ($dates as $startdate) { $start = new DateTime($startdate); $date = new DateTime($startdate); echo ''.$businessdays.' : '.$date->format('l').' : '.$date->format('Y-m-d'); $date->modify("+{$businessdays} weekdays"); echo ' : '.$date->format('Y-m-d').' : '.$date->format('l'); } echo ''; } Expected result: ... 5 : Thursday : 2012-03-29 : 2012-04-05 : Thursday 5 : Friday : 2012-03-30 : 2012-04-06 : Friday 5 : Saturday : 2012-03-31 : 2012-04-09 : Monday 5 : Sunday : 2012-04-01 : 2012-04-09 : Monday 5 : Monday : 2012-04-02 : 2012-04-09 : Monday 5 : Tuesday : 2012-04-03 : 2012-04-10 : Tuesday 5 : Wednesday : 2012-04-04 : 2012-04-11 : Wednesday 5 : Thursday : 2012-04-05 : 2012-04-12 : Thursday ... Actual result: -- ... 5 : Thursday : 2012-03-29 : 2012-04-05 : Thursday 5 : Friday : 2012-03-30 : 2012-04-08 : Sunday 5 : Saturday : 2012-03-31 : 2012-04-08 : Sunday 5 : Sunday : 2012-04-01 : 2012-04-08 : Sunday 5 : Monday : 2012-04-02 : 2012-04-09 : Monday 5 : Tuesday : 2012-04-03 : 2012-04-10 : Tuesday 5 : Wednesday : 2012-04-04 : 2012-04-11 : Wednesday 5 : Thursday : 2012-04-05 : 2012-04-12 : Thursday ... -- Edit bug report at https://bugs.php.net/bug.php?id=61642&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61642&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61642&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61642&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61642&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61642&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61642&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61642&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61642&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61642&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61642&r=support Expected behavior: https://bugs.php.net/fix.php?id=61642&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61642&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61642&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61642&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61642&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61642&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61642&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61642&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61642&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61642&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61642&r=mysqlcfg
Bug #61642 [Opn]: modify("+5 weekdays") returns Sunday
Edit report at https://bugs.php.net/bug.php?id=61642&edit=1 ID: 61642 User updated by:jeff at nd4c dot com Reported by:jeff at nd4c dot com Summary:modify("+5 weekdays") returns Sunday Status: Open Type: Bug Package:Date/time related Operating System: Fedora 14 and Windows 7 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: The documentation is at: http://www.php.net/manual/en/datetime.formats.relative.php That page is linked to from: http://www.php.net/manual/en/datetime.formats.php Which is linked to from: http://www.php.net/manual/en/datetime.modify.php Previous Comments: [2012-04-11 15:56:41] zhanglijiu at gmail dot com I check the php manual, there is no weekdays parameter for modify. So you have to use modify(+ n day) or modify(+ n week). [2012-04-05 18:01:12] jeff at nd4c dot com Description: Tested on Windows 7: Apache/2.2.16 (Win32) PHP/5.3.5 Tested on Fedora 14: Fedora release 14 (Laughlin) Linux 2.6.35.4-rscloud x86_64 php.x86_64 5.3.8-3.fc14 These are the latest stable versions I can find for these two systems. (Especially since V6 binaries are no longer available for Windows.) The Linux system is a live server using a framework that has not been tested with any later versions than 5.3.8 When modifying a DateTime instance with "+5 weekdays" it will return a date for a Sunday and not a weekday. Running the Test script you note that the section for "5" returns Sunday. All the other numbers are correct. Note the pattern for skipping the weekends is always for Friday, Saturday and Sunday. However for "+5" weekends should be skipped for Saturday, Sunday and Monday, which is different than for any other number. Test script: --- $days = array(1,2,3,4,5,6,7,8,); $dates = array('2012-03-29','2012-03-30','2012-03-31','2012-04-01','2012-04-02','2012-04-03','2012-04-04','2012-04-05',); foreach ($days as $businessdays) { foreach ($dates as $startdate) { $start = new DateTime($startdate); $date = new DateTime($startdate); echo ''.$businessdays.' : '.$date->format('l').' : '.$date->format('Y-m-d'); $date->modify("+{$businessdays} weekdays"); echo ' : '.$date->format('Y-m-d').' : '.$date->format('l'); } echo ''; } Expected result: ... 5 : Thursday : 2012-03-29 : 2012-04-05 : Thursday 5 : Friday : 2012-03-30 : 2012-04-06 : Friday 5 : Saturday : 2012-03-31 : 2012-04-09 : Monday 5 : Sunday : 2012-04-01 : 2012-04-09 : Monday 5 : Monday : 2012-04-02 : 2012-04-09 : Monday 5 : Tuesday : 2012-04-03 : 2012-04-10 : Tuesday 5 : Wednesday : 2012-04-04 : 2012-04-11 : Wednesday 5 : Thursday : 2012-04-05 : 2012-04-12 : Thursday ... Actual result: -- ... 5 : Thursday : 2012-03-29 : 2012-04-05 : Thursday 5 : Friday : 2012-03-30 : 2012-04-08 : Sunday 5 : Saturday : 2012-03-31 : 2012-04-08 : Sunday 5 : Sunday : 2012-04-01 : 2012-04-08 : Sunday 5 : Monday : 2012-04-02 : 2012-04-09 : Monday 5 : Tuesday : 2012-04-03 : 2012-04-10 : Tuesday 5 : Wednesday : 2012-04-04 : 2012-04-11 : Wednesday 5 : Thursday : 2012-04-05 : 2012-04-12 : Thursday ... -- Edit this bug report at https://bugs.php.net/bug.php?id=61642&edit=1