[fw-core] Composer packages for 2.0.0-rc1 are unusable

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[fw-core] Composer packages for 2.0.0-rc1 are unusable

Christian Kaps
Hi,

the composer.json files for version 2.0.0-rc1 contains the target-dir
property. For the package Zend/Json the target-dir property is set to
Zend/Json. This ends in a directory structure similar to:
vendor/zendframework/zend-json/Zend/Json/Zend/Json

The problem is that the Autoloader cannot anymore load the packages.
Because in the autoload_namespaces.php the aliases are defined in the
form: 'Zend\\Json' => $vendorDir . '/zendframework/zend-json/'. I think
when using target-dir it must be defined as: 'Zend\\Json' => $vendorDir
. '/zendframework/zend-json/Zend/Json'.

So I think either the target-dir property should be removed or the
autoload path should be adapted.

Cheers,
Christian

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

weierophinney
Administrator
-- Christian Kaps <[hidden email]> wrote
(on Thursday, 26 July 2012, 12:41 PM +0200):

> the composer.json files for version 2.0.0-rc1 contains the
> target-dir property. For the package Zend/Json the target-dir
> property is set to Zend/Json. This ends in a directory structure
> similar to: vendor/zendframework/zend-json/Zend/Json/Zend/Json
>
> The problem is that the Autoloader cannot anymore load the packages.
> Because in the autoload_namespaces.php the aliases are defined in
> the form: 'Zend\\Json' => $vendorDir . '/zendframework/zend-json/'.
> I think when using target-dir it must be defined as: 'Zend\\Json' =>
> $vendorDir . '/zendframework/zend-json/Zend/Json'.
>
> So I think either the target-dir property should be removed or the
> autoload path should be adapted.

I've confirmed. I'll get this fixed for RC2, but also fix the
packages.json on the composer repo immediately to resolve this.


--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

weierophinney
Administrator
-- Matthew Weier O'Phinney <[hidden email]> wrote
(on Thursday, 26 July 2012, 09:12 AM -0500):

> -- Christian Kaps <[hidden email]> wrote
> (on Thursday, 26 July 2012, 12:41 PM +0200):
> > the composer.json files for version 2.0.0-rc1 contains the
> > target-dir property. For the package Zend/Json the target-dir
> > property is set to Zend/Json. This ends in a directory structure
> > similar to: vendor/zendframework/zend-json/Zend/Json/Zend/Json
> >
> > The problem is that the Autoloader cannot anymore load the packages.
> > Because in the autoload_namespaces.php the aliases are defined in
> > the form: 'Zend\\Json' => $vendorDir . '/zendframework/zend-json/'.
> > I think when using target-dir it must be defined as: 'Zend\\Json' =>
> > $vendorDir . '/zendframework/zend-json/Zend/Json'.
> >
> > So I think either the target-dir property should be removed or the
> > autoload path should be adapted.
>
> I've confirmed. I'll get this fixed for RC2, but also fix the
> packages.json on the composer repo immediately to resolve this.

This is now fixed. You may need to delete your vendor directory and/or
your composer.lock file in order to get the updated packages.

I also discovered that the various service packages were created
incorrectly, and I've re-deployed those as well.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

Christian Kaps
Am 26.07.2012 17:42, schrieb Matthew Weier O'Phinney:

>> I've confirmed. I'll get this fixed for RC2, but also fix the
>> packages.json on the composer repo immediately to resolve this.
>
> This is now fixed. You may need to delete your vendor directory
> and/or
> your composer.lock file in order to get the updated packages.
>
> I also discovered that the various service packages were created
> incorrectly, and I've re-deployed those as well.
>

Thanks, now it works.

But it seems that the package dependencies will not be properly
resolved. I have the following packages in my composer.json file.

"zendframework/zend-http": "2.0.*"
"zendframework/zend-json": "2.0.*"
"zendframework/zend-registry": "2.0.*"

Now I get the error that the interface
Zend\I18n\Translator\TranslatorAwareInterface cannot be found. If I add
the package zendframework/zend-i18n manually, then the package gets
installed. But the interface isn't available in this package.

Cheers,
Christian

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

weierophinney
Administrator
-- Christian Kaps <[hidden email]> wrote
(on Friday, 27 July 2012, 09:23 AM +0200):

> Am 26.07.2012 17:42, schrieb Matthew Weier O'Phinney:
> > > I've confirmed. I'll get this fixed for RC2, but also fix the
> > > packages.json on the composer repo immediately to resolve this.
> >
> > This is now fixed. You may need to delete your vendor directory
> > and/or
> > your composer.lock file in order to get the updated packages.
> >
> > I also discovered that the various service packages were created
> > incorrectly, and I've re-deployed those as well.
>
> Thanks, now it works.
>
> But it seems that the package dependencies will not be properly
> resolved. I have the following packages in my composer.json file.
>
> "zendframework/zend-http": "2.0.*"
> "zendframework/zend-json": "2.0.*"
> "zendframework/zend-registry": "2.0.*"
>
> Now I get the error that the interface
> Zend\I18n\Translator\TranslatorAwareInterface cannot be found. If I
> add the package zendframework/zend-i18n manually, then the package
> gets installed. But the interface isn't available in this package.

What class are you trying to use when this error is raised?

Likely, the zend-i18n component is listed as a "suggest" in the package
-- however, if it's required for normal operation, we should fix that. I
just need to know what component you're trying to use, exactly. :)

BTW, Zend\Registry was removed for RC1, so I'd not rely on that in the
future.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

Christian Kaps
Am 27.07.2012 16:13, schrieb Matthew Weier O'Phinney:

> -- Christian Kaps <[hidden email]> wrote
> (on Friday, 27 July 2012, 09:23 AM +0200):
>> Am 26.07.2012 17:42, schrieb Matthew Weier O'Phinney:
>>>> I've confirmed. I'll get this fixed for RC2, but also fix the
>>>> packages.json on the composer repo immediately to resolve this.
>>> This is now fixed. You may need to delete your vendor directory
>>> and/or
>>> your composer.lock file in order to get the updated packages.
>>>
>>> I also discovered that the various service packages were created
>>> incorrectly, and I've re-deployed those as well.
>> Thanks, now it works.
>>
>> But it seems that the package dependencies will not be properly
>> resolved. I have the following packages in my composer.json file.
>>
>> "zendframework/zend-http": "2.0.*"
>> "zendframework/zend-json": "2.0.*"
>> "zendframework/zend-registry": "2.0.*"
>>
>> Now I get the error that the interface
>> Zend\I18n\Translator\TranslatorAwareInterface cannot be found. If I
>> add the package zendframework/zend-i18n manually, then the package
>> gets installed. But the interface isn't available in this package.
> What class are you trying to use when this error is raised?
I'm in holiday for the next two weeks, so I cannot look into the code.
But I think the i18n component will be used by a validator, which will
on the other hand be used by the Zend\Http component.

> Likely, the zend-i18n component is listed as a "suggest" in the package
> -- however, if it's required for normal operation, we should fix that. I
> just need to know what component you're trying to use, exactly. :)
>
> BTW, Zend\Registry was removed for RC1, so I'd not rely on that in the
> future.
>

Good to know, but this was also an unresolved dependency from
2.0.0-beta4 I think.

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

codevarun
In reply to this post by Christian Kaps
I also got error


Fatal error: Interface 'Zend\I18n\Translator\TranslatorAwareInterface' not found in ***\vendor\zendframework\zend-validator\Zend\Validator\AbstractValidator.php on line 24

I am simply trying to use Http module of Zend

Curl needs to validate URL and this requires Validator which uses TranslatorAwareInterface.

In zend_i18n package this isn't yet present.

Codes which should reproduce this problem


use Zend\Http\Request;
use Zend\Http\Client;

$request = new Request();
$request->setUri('http://www.deftinfotech.com');
$request->setMethod('POST');
$request->getPost()->set('foo', 'bar');

$client = new Client();
$response = $client->dispatch($request);

if ($response->isSuccess()) {
        //  the POST was successful
}


Thanks
Christian Kaps wrote
Hi,

the composer.json files for version 2.0.0-rc1 contains the target-dir
property. For the package Zend/Json the target-dir property is set to
Zend/Json. This ends in a directory structure similar to:
vendor/zendframework/zend-json/Zend/Json/Zend/Json

The problem is that the Autoloader cannot anymore load the packages.
Because in the autoload_namespaces.php the aliases are defined in the
form: 'Zend\\Json' => $vendorDir . '/zendframework/zend-json/'. I think
when using target-dir it must be defined as: 'Zend\\Json' => $vendorDir
. '/zendframework/zend-json/Zend/Json'.

So I think either the target-dir property should be removed or the
autoload path should be adapted.

Cheers,
Christian

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]
Regards Varun Batra IT Consultant www.VarunBatra.com
Reply | Threaded
Open this post in threaded view
|

Re: [fw-core] Composer packages for 2.0.0-rc1 are unusable

weierophinney
Administrator
On Nov 29, 2012 7:02 AM, "codevarun" <[hidden email]> wrote:
>
> I also got error
>
>
> Fatal error: Interface 'Zend\I18n\Translator\TranslatorAwareInterface' not
> found in
>
***\vendor\zendframework\zend-validator\Zend\Validator\AbstractValidator.php
> on line 24
>
> I am simply trying to use Http module of Zend
>
> Curl needs to validate URL and this requires Validator which uses
> TranslatorAwareInterface.
>
> In zend_i18n package this isn't yet present.

Are we still talking about v2.0.0rc1, per the subject line? If so, this is
a non-issue, as the stable packages definitely have that class available.

>
> Codes which should reproduce this problem
>
>
> use Zend\Http\Request;
> use Zend\Http\Client;
>
> $request = new Request();
> $request->setUri('http://www.deftinfotech.com');
> $request->setMethod('POST');
> $request->getPost()->set('foo', 'bar');
>
> $client = new Client();
> $response = $client->dispatch($request);
>
> if ($response->isSuccess()) {
>         //  the POST was successful
> }
>
>
> Thanks
> Christian Kaps wrote
> > Hi,
> >
> > the composer.json files for version 2.0.0-rc1 contains the target-dir
> > property. For the package Zend/Json the target-dir property is set to
> > Zend/Json. This ends in a directory structure similar to:
> > vendor/zendframework/zend-json/Zend/Json/Zend/Json
> >
> > The problem is that the Autoloader cannot anymore load the packages.
> > Because in the autoload_namespaces.php the aliases are defined in the
> > form: 'Zend\\Json' => $vendorDir . '/zendframework/zend-json/'. I think
> > when using target-dir it must be defined as: 'Zend\\Json' => $vendorDir
> > . '/zendframework/zend-json/Zend/Json'.
> >
> > So I think either the target-dir property should be removed or the
> > autoload path should be adapted.
> >
> > Cheers,
> > Christian
> >
> > --
> > List:
>
> > fw-core@.zend
>
> > Info: http://framework.zend.com/archives
> > Unsubscribe:
>
> > fw-core-unsubscribe@.zend
>
>
>
>
>
> --
> View this message in context:
http://zend-framework-community.634137.n4.nabble.com/fw-core-Composer-packages-for-2-0-0-rc1-are-unusable-tp4655949p4658273.html
> Sent from the Zend Core mailing list archive at Nabble.com.
>
> --
> List: [hidden email]
> Info: http://framework.zend.com/archives
> Unsubscribe: [hidden email]
>
>