{"action":"created","issue":{"url":"https://api.github.com/repos/modxcms/revolution/issues/13900","repository_url":"https://api.github.com/repos/modxcms/revolution","labels_url":"https://api.github.com/repos/modxcms/revolution/issues/13900/labels{/name}","comments_url":"https://api.github.com/repos/modxcms/revolution/issues/13900/comments","events_url":"https://api.github.com/repos/modxcms/revolution/issues/13900/events","html_url":"https://github.com/modxcms/revolution/pull/13900","id":322614733,"number":13900,"title":"MODX 3 refactoring","user":{"login":"bezumkin","id":1257284,"avatar_url":"https://avatars0.githubusercontent.com/u/1257284?v=4","gravatar_id":"","url":"https://api.github.com/users/bezumkin","html_url":"https://github.com/bezumkin","followers_url":"https://api.github.com/users/bezumkin/followers","following_url":"https://api.github.com/users/bezumkin/following{/other_user}","gists_url":"https://api.github.com/users/bezumkin/gists{/gist_id}","starred_url":"https://api.github.com/users/bezumkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bezumkin/subscriptions","organizations_url":"https://api.github.com/users/bezumkin/orgs","repos_url":"https://api.github.com/users/bezumkin/repos","events_url":"https://api.github.com/users/bezumkin/events{/privacy}","received_events_url":"https://api.github.com/users/bezumkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/modxcms/revolution/milestones/39","html_url":"https://github.com/modxcms/revolution/milestone/39","labels_url":"https://api.github.com/repos/modxcms/revolution/milestones/39/labels","id":554949,"number":39,"title":"v3.0.0-alpha","description":"List of things for Revolution v3.0.0-alpha","creator":{"login":"opengeek","id":232812,"avatar_url":"https://avatars0.githubusercontent.com/u/232812?v=4","gravatar_id":"","url":"https://api.github.com/users/opengeek","html_url":"https://github.com/opengeek","followers_url":"https://api.github.com/users/opengeek/followers","following_url":"https://api.github.com/users/opengeek/following{/other_user}","gists_url":"https://api.github.com/users/opengeek/gists{/gist_id}","starred_url":"https://api.github.com/users/opengeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opengeek/subscriptions","organizations_url":"https://api.github.com/users/opengeek/orgs","repos_url":"https://api.github.com/users/opengeek/repos","events_url":"https://api.github.com/users/opengeek/events{/privacy}","received_events_url":"https://api.github.com/users/opengeek/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":35,"state":"open","created_at":"2013-06-17T15:57:18Z","updated_at":"2018-05-28T06:23:55Z","due_on":"2018-05-15T07:00:00Z","closed_at":null},"comments":29,"created_at":"2018-05-13T18:05:23Z","updated_at":"2018-05-28T07:38:38Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/modxcms/revolution/pulls/13900","html_url":"https://github.com/modxcms/revolution/pull/13900","diff_url":"https://github.com/modxcms/revolution/pull/13900.diff","patch_url":"https://github.com/modxcms/revolution/pull/13900.patch"},"body":"### What does it do?\r\n- PSR-4 autoloading\r\n- Core model updated to xPDO 3.0\r\n- Refactored processors\r\n- Removed modXMLRPCResource and modJSONRPCResource (and also their Response classes)\r\n- Replaced MagpieRSS to SimplePie\r\n- Core files formatted to PSR-2\r\n- Updated build, setup, model generator, tests, etc. Everything needed to make it work.\r\n\r\n### Why is it needed?\r\nTo make MODX modern again.\r\n\r\n### Related issue(s)/PR(s)\r\n#11272 \r\n\r\n### How to test\r\n1. `composer create-project modx/revolution www 3.x-dev` where `www` is the directory to install.\r\nWhen it will ask `Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?` answer **n**.\r\n2. Fetch this PR: `cd www && git fetch origin pull/13900/head:3x-refactoring`.\r\n3. Checkout to the new branch: `git checkout 3x-refactoring`\r\n4. Update composer: `composer update`\r\n5. Build core files: `php ./_build/transport.core.php`\r\n6. Open your website in browser and run Setup.\r\n7. Login to manager and disable system setting `compress_js`. Clear browser cache and after this you will see no more errors about wrong processors paths.\r\n\r\n### Compatibility\r\nSorry, but after moving MODX to namespace, we will need to update all complicated extras to this modern codebase. \r\n\r\nOf course, there are some compatibility workarounds like `MODX::loadClass()` method and automatic aliases to old class names, but there can't be 100% support of old codebase.\r\n\r\nFor now it was tested with:\r\n- [x] Ace\r\n- [x] pdoTools\r\n- [x] Theme.Bootstrap\r\n- [x] MinifyX\r\n- [ ] ms2Gallery - installs, but can't work with `modMediaSource` to generate previews\r\n- [ ] miniShop2 - installs, but can't extend `modResource`\r\n- [ ] mSearch2 - installs, but cant't index resources.\r\n- [ ] Office - installs and can authentificate users, but can't register them, because of extending `modUserCreateProcessor`\r\n\r\nI think that `modResource` extending packages will require more work (Articles, Collections, Tickets, miniShop2, etc). Because now they should extend `MODX\\modResource`, but not `modResource` and it will require to change their model to version 3.0\r\n \r\n### Whats next?\r\nI didn't finished yet, but now I want to show and discuss this changes. Then I want to move further:\r\n- Remove all `getService()` calls from the core\r\n- Rewrite all `getObject('modResource')` to `getObject('MODX\\modResource')` because it will not require to get correct class name with `MODX::loadClass()`.\r\n- ? \r\n- Update all necessary extras."},"comment":{"url":"https://api.github.com/repos/modxcms/revolution/issues/comments/392445849","html_url":"https://github.com/modxcms/revolution/pull/13900#issuecomment-392445849","issue_url":"https://api.github.com/repos/modxcms/revolution/issues/13900","id":392445849,"user":{"login":"OptimusCrime","id":2326278,"avatar_url":"https://avatars0.githubusercontent.com/u/2326278?v=4","gravatar_id":"","url":"https://api.github.com/users/OptimusCrime","html_url":"https://github.com/OptimusCrime","followers_url":"https://api.github.com/users/OptimusCrime/followers","following_url":"https://api.github.com/users/OptimusCrime/following{/other_user}","gists_url":"https://api.github.com/users/OptimusCrime/gists{/gist_id}","starred_url":"https://api.github.com/users/OptimusCrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OptimusCrime/subscriptions","organizations_url":"https://api.github.com/users/OptimusCrime/orgs","repos_url":"https://api.github.com/users/OptimusCrime/repos","events_url":"https://api.github.com/users/OptimusCrime/events{/privacy}","received_events_url":"https://api.github.com/users/OptimusCrime/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T07:38:38Z","updated_at":"2018-05-28T07:38:38Z","author_association":"CONTRIBUTOR","body":"@bezumkin Could we place the code in `core/src`, and then have the old files just include the ones in `core/src` for BC? E.g. have `core/model/modx/modAccess.class.php` just include `core/src/modAccess.php`? Additionally, could it not be possible to use `class_alias` for all the xpdo classes in the project? That way both classes with and without the MODX namespace should work.\r\n\r\nI would love to have autoloading in MODX, and I would also love to have it with a proper namespace, but if this means that every single extra (or close to that) needs to be rewritten, then I have a hard time justifying that. Is there any way we can have that _and_ not break everything? Can my suggestions above solve that?\r\n\r\nPeople talk about 2.7 and giving people more time. The MODX code base is already ancient, and writing on it in 2018 feels like a drag. I have already suggested that 2.6 is the last 2.x release, as these releases tend to take more than a year to finish, and takes up a whole lot of our resources. I was under the impression that 2.7 would not happen.\r\n\r\nWe have the chance to improve the code base drastically with the 3.x release. Please use this chance to improve things that needs to be improved. Autoloading should be one of those things in my opinion.\r\n\r\nMy five cents on the matter."}}
{"actor":{"display_login":"OptimusCrime"}}