Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[Composer] Add zendframework/zendframework1 as conflict #1536

Closed
wants to merge 1 commit into from

4 participants

@Maks3w
Collaborator

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
Collaborator

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

@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
Collaborator

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

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

@weierophinney

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
Commits on Jun 20, 2012
  1. @Maks3w

    [Composer] Add zendframework/zendframework1 as conflict

    Maks3w authored
    zendframework/zendframework1 is incompatible with zendframework/zendframework because both register the same vendor name preffix (Zend)
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 composer.json
View
5 composer.json
@@ -18,6 +18,9 @@
"config": {
"bin-dir": "bin"
},
+ "conflict": {
+ "zendframework/zendframework1": "*"
+ },
"replace": {
"zendframework/zend-acl": "self.version",
"zendframework/zend-amf": "self.version",
@@ -108,4 +111,4 @@
"dev-master": "2.0-dev"
}
}
-}
+}
Something went wrong with that request. Please try again.