Skip to content

[Composer] Add zendframework/zendframework1 as conflict #1536

Closed
wants to merge 1 commit into from

4 participants

@Maks3w
Zend Framework member
Maks3w commented Jun 20, 2012

zendframework/zendframework1 is incompatible with zendframework/zendframework because both register the same vendor name preffix (Zend)

@Maks3w Maks3w [Composer] Add zendframework/zendframework1 as conflict
zendframework/zendframework1 is incompatible with zendframework/zendframework because both register the same vendor name preffix (Zend)
9a273c6
@Freeaqingme
Zend Framework member

Why would ZF1 be a conflict to ZF2? I have projects that run both simultaneously, am wondering what technical reason there would be to prohibit this?

@weierophinney
Zend Framework member

@Freeaqingme If I understand correctly, it's due to how composer is creating PSR-0 autoloaders -- it evidently doesn't differentiate well between vendor prefixes and namespaces.

@Maks3w
Zend Framework member
Maks3w commented Jun 20, 2012

The problem is that with the actual configuration if you have the both frameworks enabled at the sametime may have collisions at the moment of locate the php file in the filesystem.

For example: Zend_Acl_Acl vs Zend\Acl\Acl. Both packages register the same vendor preffix (Zend) What version will load?

PSR-0 don't have any specification about the precedence between PEAR and namespace.

IMHO all packages are in conflict conclict with his counterpart at the framework version and with the parent package if any.

For example:

  • I don't see any problem in have Zend_Acl and Zend\Http at the sametime because don't share the same directory paths.

  • I see problems in have Zend_Acl and Zend\Acl or ZendFramework 1 & Zend\Acl

  • I don't see problems in have ZendFramework 1 & Zend\ServiceManager

@prolic
prolic commented Jun 25, 2012

Problem could also be solved by changing the composer, so that the vendor prefix is "Zend" for namespaces and "Zend_" for underscore_version.

@weierophinney
Zend Framework member

Going to close this. We need to simply change the composer definitions in ZF1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.