Skip to content
This repository

[Composer] Add zendframework/zendframework1 as conflict #1536

Closed
wants to merge 1 commit into from

4 participants

Maks Dolf Schimmel Matthew Weier O'Phinney prolic
Maks
Collaborator
Maks3w commented June 20, 2012

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

Maks [Composer] Add zendframework/zendframework1 as conflict
zendframework/zendframework1 is incompatible with zendframework/zendframework because both register the same vendor name preffix (Zend)
9a273c6
Dolf Schimmel
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?

Matthew Weier O'Phinney
Owner

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

Maks
Collaborator
Maks3w commented June 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 June 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.

Matthew Weier O'Phinney
Owner

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

Matthew Weier O'Phinney weierophinney closed this June 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 20, 2012
Maks [Composer] Add zendframework/zendframework1 as conflict
zendframework/zendframework1 is incompatible with zendframework/zendframework because both register the same vendor name preffix (Zend)
9a273c6
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  composer.json
5  composer.json
@@ -18,6 +18,9 @@
18 18
     "config": {
19 19
         "bin-dir": "bin"
20 20
     },
  21
+    "conflict": {
  22
+        "zendframework/zendframework1": "*"
  23
+    },
21 24
     "replace": {
22 25
         "zendframework/zend-acl": "self.version",
23 26
         "zendframework/zend-amf": "self.version",
@@ -108,4 +111,4 @@
108 111
             "dev-master": "2.0-dev"
109 112
         }
110 113
     }
111  
-}
  114
+}
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.