Re: PHP proposal on modular systems

From: Date: Mon, 15 Jul 2013 10:07:55 +0000
Subject: Re: PHP proposal on modular systems
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-68118@lists.php.net to get a copy of this message
Am 15.07.2013 11:14, schrieb Johannes Schlüter: > Besides the pure compatibility issue "traditionally" we also had a > distribution problem in PHP - if a module requires a generic library > either the library had to be bundled or the user had to be sent for a > hunt and manually do it, which became complicated if there are further > dependencies and different libraries have the same dependencies ... for > that Composer <http://getcomposer.org/> is a quite good > solution which > does a great job in handling projects and its dependencies. The original poster described a situation where an application uses component A and component B each of which depend on different versions of component C. Unless I missed a corresponding feature so far, Composer does not solve this problem. This problem could be solved, however, by encoding the version number in the namespace name: namespace vendor\component\v100 { class foo {} } namespace vendor\component\v110 { class foo {} } This would allow the usage of two versions of a component inside the same PHP process. -- Sebastian Bergmann Co-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/

« previous php.internals (#68118) next »