Edit report at http://pear.php.net/bugs/bug.php?id=17592&edit=1
ID: 17592
Updated by: [email protected]
Reported By: warnar at dmmw dot nl
Summary: Pyrus: \PEAR2\Pyrus\Package exception
-Status: Open
+Status: Closed
Type: Bug
Package: PEAR
Operating System: Windows 7 x64
PHP Version: 5.3.1
-Assigned To:
+Assigned To: cweiske
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cweiske
moved to https://github.com/pear2/PEAR2_Pyrus/issues/30
Previous Comments:
------------------------------------------------------------------------
[2010-07-19 09:19:22] boekkooi
Okee so what your saying is don't use Package for getting information
about a package that's allready installed? but use Registry::package and
Registry::exists?
------------------------------------------------------------------------
[2010-07-16 21:08:19] saltybeagle
Hmm, I think in this case the exception is to be expected.
To retrieve information about remote packages, pass $forceremote = true
to Package::__construct so it won't look at the local registry before
comparing against remote packages.
------------------------------------------------------------------------
[2010-07-14 15:00:55] boekkooi
Description:
------------
When creating a new instance of a package that is all ready in the
rgistry a exception occures.
Test script:
---------------
<?php
require_once 'PEAR2\Autoload.php';
\PEAR2\Pyrus\Config::setCurrent('d:/pear/testRepo');
// The will work like a charm
$pkg = new \PEAR2\Pyrus\Package('pear2.php.net/PEAR2_Pyrus');
// This will throw a 'PEAR2\Pyrus\Package\InstalledException'
$pkg = new \PEAR2\Pyrus\Package('pear2.php.net/PEAR2_Pyrus-2.0.0a1');
Expected result:
----------------
- No exception (since the Package object can also be used to retrieve
information).
Actual result:
--------------
Fatal error: Uncaught exception 'PEAR2\Pyrus\Package\InstalledException'
with message 'channel://pear2.php.net/PEAR2_Pyrus-2.0.0a1 is already
installed and is newer than detected release version 2.0.0a1' in
D:\pear\repo\php\PEAR2\Pyrus\Package\Remote.php:282
Stack trace:
#0 D:\pear\repo\php\PEAR2\Pyrus\Package\Remote.php(47):
PEAR2\Pyrus\Package\Remote->fromString('pear2.php.net/P...')
#1 D:\pear\repo\php\PEAR2\Pyrus\Package.php(55):
PEAR2\Pyrus\Package\Remote->__construct('pear2.php.net/P...',
Object(PEAR2\Pyrus\Package))
#2 D:\pear\packages\PackageManager\tests\u.php(7):
PEAR2\Pyrus\Package->__construct('pear2.php.net/P...')
#3 {main}
thrown in D:\pear\repo\php\PEAR2\Pyrus\Package\Remote.php on line 282
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17592&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.