{"action":"created","issue":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/1890","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/1890/labels{/name}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/1890/comments","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/1890/events","html_url":"https://github.com/Yoast/wordpress-seo/issues/1890","id":54030954,"number":1890,"title":"Composer roadmap","user":{"login":"Rarst","id":737584,"avatar_url":"https://avatars.githubusercontent.com/u/737584?v=3","gravatar_id":"","url":"https://api.github.com/users/Rarst","html_url":"https://github.com/Rarst","followers_url":"https://api.github.com/users/Rarst/followers","following_url":"https://api.github.com/users/Rarst/following{/other_user}","gists_url":"https://api.github.com/users/Rarst/gists{/gist_id}","starred_url":"https://api.github.com/users/Rarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rarst/subscriptions","organizations_url":"https://api.github.com/users/Rarst/orgs","repos_url":"https://api.github.com/users/Rarst/repos","events_url":"https://api.github.com/users/Rarst/events{/privacy}","received_events_url":"https://api.github.com/users/Rarst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-01-12T08:50:17Z","updated_at":"2015-01-29T15:29:34Z","closed_at":null,"body":"Hi! I am your resident Composer menace.\r\n\r\nI am working to make WP SEO have awesome Composer support. Because Composer is what keeps developers happy and managing dependencies reliable (_audience cheers_).\r\n\r\nAs well as hopefully simplifying development and build processes away from Git Submodules (_audience moans_).\r\n\r\n## The current state\r\n\r\n1. Present `composer.json` in main plugin, but broken due to submodule use\r\n2. Two submodules without Composer support\r\n\r\n## Decision points\r\n\r\n### Is it time for submodules to go?\r\n\r\nShould the submodules be retained in parallel? Or should Composer become main and preferable mechanism with submodule structure deprecated?\r\n\r\n### How will we handle autoload?\r\n\r\nThe tricky part is to enable end result to work seamlessly with PHP 5.2 (_audience moans_).\r\n\r\nWhile you can use Composer to build for PHP 5.2 target without issue, its autoload is inherently 5.3.\r\n\r\nFrom my research so far I see two approaches:\r\n\r\n1. Ignore Composer autoload, rely on known dependency locations in tree to load files. Vendor directory can be discarded in build process. As part of the site stack the built in load should be ignored in favor of global Composer autoload.\r\n2. Use the intermediary classmap, generated by Composer. While that \"magic\" autoload in Composer requires 5.3, it also generates intermediary files which seem not too. One of those can provide classmap, mapping classes to their filesystem locations. This file can be used in internal autoloader, over hardcoding the locations.\r\n3. [composer-php52](https://bitbucket.org/xrstf/composer-php52) was brought to my attention as an option for autoload compatibility layer, h/t @coenjacobs\r\n\r\nThere might be more options to explore here as well.\r\n\r\n## Progress\r\n\r\n- [x] implement Composer in libraries used\r\n- [x] add libraries to Packagist\r\n- [x] require libraries in plugin\r\n- [x] fix Composer installation to work\r\n- [x] document\r\n- [ ] update build process\r\n\r\n### Relevant pull requests\r\n - [x] https://github.com/Yoast/wordpress-seo/pull/1912\r\n - [x] https://github.com/Yoast/License-Manager/pull/57\r\n - [x] https://github.com/Yoast/i18n-module/pull/2\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments/72043645","html_url":"https://github.com/Yoast/wordpress-seo/issues/1890#issuecomment-72043645","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/1890","id":72043645,"user":{"login":"jdevalk","id":487629,"avatar_url":"https://avatars.githubusercontent.com/u/487629?v=3","gravatar_id":"","url":"https://api.github.com/users/jdevalk","html_url":"https://github.com/jdevalk","followers_url":"https://api.github.com/users/jdevalk/followers","following_url":"https://api.github.com/users/jdevalk/following{/other_user}","gists_url":"https://api.github.com/users/jdevalk/gists{/gist_id}","starred_url":"https://api.github.com/users/jdevalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdevalk/subscriptions","organizations_url":"https://api.github.com/users/jdevalk/orgs","repos_url":"https://api.github.com/users/jdevalk/repos","events_url":"https://api.github.com/users/jdevalk/events{/privacy}","received_events_url":"https://api.github.com/users/jdevalk/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T15:29:34Z","updated_at":"2015-01-29T15:29:34Z","body":"I currently get this:\r\n\r\n```\r\n[UnexpectedValueException]\r\n  Could not parse version constraint ^1.0.16: Invalid version string \"^1.0.16\r\n  \"\r\n```\r\n\r\nWhen I merge trunk into my pull #1923 "}}