PSR, Namespaces and PHP5.3
Hi I realiced that you require php5.3 for this version of magento
i also realized that you want to use dinamic loading classes but you don't use namespaces on any of them.
You try to use the PSR specification for php 5.2 but you don't support it anymore so I think the best is to start implementing namespaces.
Do you plan to implement namespaces since you require php5.3 for this version of magento?
I see into autoloader core and see that it contains this code:
if (strpos($class, self::NS_SEPARATOR) !== false) {
$class = ltrim(str_replace(self::NS_SEPARATOR, '_', $class), '_');
}
https://github.com/magento/magento2/blob/master/lib/Magento/Autoload/IncludePath.php#L54-L56
So I think you can use namespaces in your code.
Yes I can use namespaces on my code but I meant to add namespaces to magento2.
Also if I relly on magento autoloader that means I must set all my classes on the same folder. Not separated form third party libraries and my libraries for example
I think we need answer from @mage2-team for that.
I can confirm that Magento 2 will be PSR-0, 1 and 2 compliant (which implies that formal namespaces will be used). Minimum supported PHP version will be 5.4.
We are working on both tasks at this moment and should be able to roll out updates soon.
Thats wonderful. Can I help?
Is there a PSR branch I can send commits?
@Faryshta
We don't have a mechanism of exposing all dev branches yet, but you can help by forking what you see on the GitHub and submitting pull request.
Why don't you just use GitHub as your developing platform for Magento 2?
@FiveDigital Primarily because we are yet to figure out how to segregate community edition code base in the most efficient way. That is, the code base for other product editions has different publishing strategy.
I agree, why don't you use Github for your dev platform? I mean since it's opensource wouldn't it help if you took community contributions?
The source is open, the development process is not, and that is eBay's prerogative. I cannot imagine trying to build out the platform and the application features by committee. eBay is taking feedback, issues, PRs, etc. via this channel though:
"issues & pull requests will be reviewed and answered." - Elena Leonova, Magento Product Manager