{"action":"created","issue":{"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/1109","repository_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS","labels_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/1109/labels{/name}","comments_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/1109/comments","events_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/1109/events","html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1109","id":147750033,"number":1109,"title":"[PagePartBundle] refactor `PagePartReader` and `PageTemplateReader` allowing using symfony configuration for storage","user":{"login":"mlebkowski","id":848731,"avatar_url":"https://avatars.githubusercontent.com/u/848731?v=3","gravatar_id":"","url":"https://api.github.com/users/mlebkowski","html_url":"https://github.com/mlebkowski","followers_url":"https://api.github.com/users/mlebkowski/followers","following_url":"https://api.github.com/users/mlebkowski/following{/other_user}","gists_url":"https://api.github.com/users/mlebkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/mlebkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlebkowski/subscriptions","organizations_url":"https://api.github.com/users/mlebkowski/orgs","repos_url":"https://api.github.com/users/mlebkowski/repos","events_url":"https://api.github.com/users/mlebkowski/events{/privacy}","received_events_url":"https://api.github.com/users/mlebkowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-12T13:24:10Z","updated_at":"2016-05-02T15:14:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/1109","html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1109","diff_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1109.diff","patch_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1109.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | yes\r\n| Deprecations? | no\r\n| Fixed tickets | -\r\n\r\n## The Goal\r\n\r\nThis is a general cleanup of the `KunstmaanPagePartBundle` with the main goal of extracting the `PagePartConfigurationReader` into a service implementing an interface (this way it could be easily extended or replaced). \r\n\r\nThere have been instances that I wanted to alter the way the pageTemplate is selected, etc. Having the class instance created in the methods body prevented me from extending it in any way.\r\n\r\n## New configuration method\r\n\r\nThe new feature is the ability to define pageparts and pagetemplates via the symfony configuration (the configuration values are exactly the same as in the `yml` files now), i.e.:\r\n\r\n```yaml\r\n# app/config/config.yml\r\nkunstmaan_page_part:\r\n  pageparts: \r\n     article: … # same content as in `Resources/config/pageparts/article.yml`\r\n   pagetemplates:\r\n      homepage: …\r\n```\r\n\r\nThis of course has the advantage of caching, validation, etc. \r\n\r\n## Breaking changes and stability\r\n\r\nThe *breaking* changes are described in the `UPGRADE-X.X.md` file. It’s hard to tell if they are even breaking, since they only touch on the internals, so I have mixed feelings about them. Anyway, they won’t affect users that didn’t tweak with the bundle mechanisms, i.e. a \"StandardEdition\" website will not break.\r\n\r\nIn the meantime I’m switching to this version in my new under-development website so I can spot any bugs that could be introduced, so this should be battle tested by the time `3.6` will be released. You don’t have a 3.6 branch yet, so I’m merging to master.\r\n\r\n## In closing\r\n\r\nDo you have any feedback for me regarding this type of changes? I’d like to invest more time into cleanups like this — both keeping BC and breaking it for some future 4.0 release — but it would be a shame if they do not align with your roadmap."},"comment":{"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/comments/216263890","html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1109#issuecomment-216263890","issue_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/1109","id":216263890,"user":{"login":"jockri","id":517574,"avatar_url":"https://avatars.githubusercontent.com/u/517574?v=3","gravatar_id":"","url":"https://api.github.com/users/jockri","html_url":"https://github.com/jockri","followers_url":"https://api.github.com/users/jockri/followers","following_url":"https://api.github.com/users/jockri/following{/other_user}","gists_url":"https://api.github.com/users/jockri/gists{/gist_id}","starred_url":"https://api.github.com/users/jockri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jockri/subscriptions","organizations_url":"https://api.github.com/users/jockri/orgs","repos_url":"https://api.github.com/users/jockri/repos","events_url":"https://api.github.com/users/jockri/events{/privacy}","received_events_url":"https://api.github.com/users/jockri/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T15:14:59Z","updated_at":"2016-05-02T15:14:59Z","body":"Hi @mlebkowski , sure we are interested and thankful for your great contributions, let that be clear!\r\nThere is indeed a small PR merged that added an extra feature/option...\r\nCan you rebase so we can merge before there are more conflicts?\r\nThanks!"}}