{"action":"created","comment":{"url":"https://api.github.com/repos/container-interop/fig-standards/pulls/comments/48260038","id":48260038,"diff_hunk":"@@ -29,10 +29,70 @@ The way a framework can automatically **discover the container definitions** of\n \n ## 4. Approaches\n \n-### 4.1. The format\n+### 4.1. Features\n \n-TODO\n+First of all, a word of caution. Container configuration is shared between the application developer and the packages bringing some configuration. Ultimately, container configuration is the responsibility of the application developer. Packages should however be able to bring a \"default\" configuration to help the developer getting started with sensible defaults (container configuration can be quite complex sometimes). This configuration should be both optional (possibility to bypass it completely), and overwritable (possibility to changes bits of the configuration).\n+\n+In this section, we will describe the list of features that we can consider to fulfill the goal of this PSR: packages registering container entries. Let's list all possible features and later, we can vote on the features we want to keep or not.\n+\n+1. Ability to create a container entry using the `new` keyword.\n+\n+1. Ability to call methods (setters or otherwise) on a container entry.\n+\n+1. Ability to set public properties of a container entry.\n+\n+1. Ability to set private and protected properties of a container entry.\n+\n+1. Ability to create a container entry using a static factory method.\n+\n+1. Ability to create a container entry using a factory method from a container service.\n+\n+1. Ability to create a container entry using a closure.\n+\n+1. Ability to compile all container entries into a single container for maximum performance.\n+\n+1. Ability to alias a container entry to another.\n+\n+1. Ability to modify an entry defined outside of the \"module\" before it is returned by the container. For instance: ability for a package providing a `Twig_Extension` to modify the `Twig_Environment` by calling `$environment->addExtension($extension)`, even if the `Twig_Environment` entry was not declared by the package itself.\n+\n+1. Ability to create container entries for scalar values.\n+\n+1. Ability to create container entries for constants (from the `define` keyword or the `const` keyword).\n+\n+1. Ability to create container entries that are numerically indexed arrays. Values of the array can be any valid container entry (i.e. objects, scalars, another array...)\n \n-### 4.2. Features\n+1. Ability to create container entries that are associative arrays (maps). Values of the array can be any valid container entry (i.e. objects, scalars, another array...)\n+\n+1. Ability for a package to extend those arrays (add elements to the arrays). Think about a package adding a PSR-7 middleware to the list of available middlewares.\n+\n+1. Ability for a package to manage priority in those arrays (add a service at the beginning, at the end, in the middle, or give a priority...).\n+\n+1. Ability to provide a default service that should be used when binding an interface.\n+\n+1. Ability to declare \"lazy\" services (services that are wrapped into proxy objects and instanciated only when needed).\n+\n+1. Ability to have several services for the same class or interface (for instance, several services representing a database connections)\n+\n+1. Ability to declare objects that are not services (for instance, ability to manage the menu of an application through `MenuItem` container entries that would be added to a `Menu` entry).","path":"proposed/container-configuration-meta.md","position":51,"original_position":51,"commit_id":"a66d0d56500865b8f0933a4ecac13c11c895b465","original_commit_id":"beafa64d6cd48f6a568e947f1a9d2a0abf5721ff","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"body":"I think this is something different. This is essentially an anonymous service: You want to use a service as reference that cannot be used alone.","created_at":"2015-12-22T14:56:33Z","updated_at":"2015-12-22T14:56:33Z","html_url":"https://github.com/container-interop/fig-standards/pull/8#discussion_r48260038","pull_request_url":"https://api.github.com/repos/container-interop/fig-standards/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/comments/48260038"},"html":{"href":"https://github.com/container-interop/fig-standards/pull/8#discussion_r48260038"},"pull_request":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/container-interop/fig-standards/pulls/8","id":54303968,"html_url":"https://github.com/container-interop/fig-standards/pull/8","diff_url":"https://github.com/container-interop/fig-standards/pull/8.diff","patch_url":"https://github.com/container-interop/fig-standards/pull/8.patch","issue_url":"https://api.github.com/repos/container-interop/fig-standards/issues/8","number":8,"state":"open","locked":false,"title":"[WIP] Proposing a first list of features","user":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"body":"This is a first list of features. This is not a list I personally endorse, I tried to put here absolutely everything that was said on the mailing lists and on Gitter. We can later do some tidying a decide what we want to keep and what we want to throw away.","created_at":"2015-12-21T21:17:00Z","updated_at":"2015-12-22T14:56:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6b5922bef91a4f74a21eae9c40198f71266de78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/container-interop/fig-standards/pulls/8/commits","review_comments_url":"https://api.github.com/repos/container-interop/fig-standards/pulls/8/comments","review_comment_url":"https://api.github.com/repos/container-interop/fig-standards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/container-interop/fig-standards/issues/8/comments","statuses_url":"https://api.github.com/repos/container-interop/fig-standards/statuses/a66d0d56500865b8f0933a4ecac13c11c895b465","head":{"label":"container-interop:features-proposal","ref":"features-proposal","sha":"a66d0d56500865b8f0933a4ecac13c11c895b465","user":{"login":"container-interop","id":6066761,"avatar_url":"https://avatars.githubusercontent.com/u/6066761?v=3","gravatar_id":"","url":"https://api.github.com/users/container-interop","html_url":"https://github.com/container-interop","followers_url":"https://api.github.com/users/container-interop/followers","following_url":"https://api.github.com/users/container-interop/following{/other_user}","gists_url":"https://api.github.com/users/container-interop/gists{/gist_id}","starred_url":"https://api.github.com/users/container-interop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/container-interop/subscriptions","organizations_url":"https://api.github.com/users/container-interop/orgs","repos_url":"https://api.github.com/users/container-interop/repos","events_url":"https://api.github.com/users/container-interop/events{/privacy}","received_events_url":"https://api.github.com/users/container-interop/received_events","type":"Organization","site_admin":false},"repo":{"id":33235964,"name":"fig-standards","full_name":"container-interop/fig-standards","owner":{"login":"container-interop","id":6066761,"avatar_url":"https://avatars.githubusercontent.com/u/6066761?v=3","gravatar_id":"","url":"https://api.github.com/users/container-interop","html_url":"https://github.com/container-interop","followers_url":"https://api.github.com/users/container-interop/followers","following_url":"https://api.github.com/users/container-interop/following{/other_user}","gists_url":"https://api.github.com/users/container-interop/gists{/gist_id}","starred_url":"https://api.github.com/users/container-interop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/container-interop/subscriptions","organizations_url":"https://api.github.com/users/container-interop/orgs","repos_url":"https://api.github.com/users/container-interop/repos","events_url":"https://api.github.com/users/container-interop/events{/privacy}","received_events_url":"https://api.github.com/users/container-interop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/container-interop/fig-standards","description":"Standards either proposed or approved by the Framework Interop Group","fork":true,"url":"https://api.github.com/repos/container-interop/fig-standards","forks_url":"https://api.github.com/repos/container-interop/fig-standards/forks","keys_url":"https://api.github.com/repos/container-interop/fig-standards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/container-interop/fig-standards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/container-interop/fig-standards/teams","hooks_url":"https://api.github.com/repos/container-interop/fig-standards/hooks","issue_events_url":"https://api.github.com/repos/container-interop/fig-standards/issues/events{/number}","events_url":"https://api.github.com/repos/container-interop/fig-standards/events","assignees_url":"https://api.github.com/repos/container-interop/fig-standards/assignees{/user}","branches_url":"https://api.github.com/repos/container-interop/fig-standards/branches{/branch}","tags_url":"https://api.github.com/repos/container-interop/fig-standards/tags","blobs_url":"https://api.github.com/repos/container-interop/fig-standards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/container-interop/fig-standards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/container-interop/fig-standards/git/refs{/sha}","trees_url":"https://api.github.com/repos/container-interop/fig-standards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/container-interop/fig-standards/statuses/{sha}","languages_url":"https://api.github.com/repos/container-interop/fig-standards/languages","stargazers_url":"https://api.github.com/repos/container-interop/fig-standards/stargazers","contributors_url":"https://api.github.com/repos/container-interop/fig-standards/contributors","subscribers_url":"https://api.github.com/repos/container-interop/fig-standards/subscribers","subscription_url":"https://api.github.com/repos/container-interop/fig-standards/subscription","commits_url":"https://api.github.com/repos/container-interop/fig-standards/commits{/sha}","git_commits_url":"https://api.github.com/repos/container-interop/fig-standards/git/commits{/sha}","comments_url":"https://api.github.com/repos/container-interop/fig-standards/comments{/number}","issue_comment_url":"https://api.github.com/repos/container-interop/fig-standards/issues/comments{/number}","contents_url":"https://api.github.com/repos/container-interop/fig-standards/contents/{+path}","compare_url":"https://api.github.com/repos/container-interop/fig-standards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/container-interop/fig-standards/merges","archive_url":"https://api.github.com/repos/container-interop/fig-standards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/container-interop/fig-standards/downloads","issues_url":"https://api.github.com/repos/container-interop/fig-standards/issues{/number}","pulls_url":"https://api.github.com/repos/container-interop/fig-standards/pulls{/number}","milestones_url":"https://api.github.com/repos/container-interop/fig-standards/milestones{/number}","notifications_url":"https://api.github.com/repos/container-interop/fig-standards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/container-interop/fig-standards/labels{/name}","releases_url":"https://api.github.com/repos/container-interop/fig-standards/releases{/id}","created_at":"2015-04-01T08:33:59Z","updated_at":"2015-12-20T11:37:52Z","pushed_at":"2015-12-22T13:25:28Z","git_url":"git://github.com/container-interop/fig-standards.git","ssh_url":"git@github.com:container-interop/fig-standards.git","clone_url":"https://github.com/container-interop/fig-standards.git","svn_url":"https://github.com/container-interop/fig-standards","homepage":"http://www.php-fig.org/","size":1825,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":5,"default_branch":"master"}},"base":{"label":"container-interop:container-configuration","ref":"container-configuration","sha":"c8b412d1181bbfed58874fd588a6578f0c9731dc","user":{"login":"container-interop","id":6066761,"avatar_url":"https://avatars.githubusercontent.com/u/6066761?v=3","gravatar_id":"","url":"https://api.github.com/users/container-interop","html_url":"https://github.com/container-interop","followers_url":"https://api.github.com/users/container-interop/followers","following_url":"https://api.github.com/users/container-interop/following{/other_user}","gists_url":"https://api.github.com/users/container-interop/gists{/gist_id}","starred_url":"https://api.github.com/users/container-interop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/container-interop/subscriptions","organizations_url":"https://api.github.com/users/container-interop/orgs","repos_url":"https://api.github.com/users/container-interop/repos","events_url":"https://api.github.com/users/container-interop/events{/privacy}","received_events_url":"https://api.github.com/users/container-interop/received_events","type":"Organization","site_admin":false},"repo":{"id":33235964,"name":"fig-standards","full_name":"container-interop/fig-standards","owner":{"login":"container-interop","id":6066761,"avatar_url":"https://avatars.githubusercontent.com/u/6066761?v=3","gravatar_id":"","url":"https://api.github.com/users/container-interop","html_url":"https://github.com/container-interop","followers_url":"https://api.github.com/users/container-interop/followers","following_url":"https://api.github.com/users/container-interop/following{/other_user}","gists_url":"https://api.github.com/users/container-interop/gists{/gist_id}","starred_url":"https://api.github.com/users/container-interop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/container-interop/subscriptions","organizations_url":"https://api.github.com/users/container-interop/orgs","repos_url":"https://api.github.com/users/container-interop/repos","events_url":"https://api.github.com/users/container-interop/events{/privacy}","received_events_url":"https://api.github.com/users/container-interop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/container-interop/fig-standards","description":"Standards either proposed or approved by the Framework Interop Group","fork":true,"url":"https://api.github.com/repos/container-interop/fig-standards","forks_url":"https://api.github.com/repos/container-interop/fig-standards/forks","keys_url":"https://api.github.com/repos/container-interop/fig-standards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/container-interop/fig-standards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/container-interop/fig-standards/teams","hooks_url":"https://api.github.com/repos/container-interop/fig-standards/hooks","issue_events_url":"https://api.github.com/repos/container-interop/fig-standards/issues/events{/number}","events_url":"https://api.github.com/repos/container-interop/fig-standards/events","assignees_url":"https://api.github.com/repos/container-interop/fig-standards/assignees{/user}","branches_url":"https://api.github.com/repos/container-interop/fig-standards/branches{/branch}","tags_url":"https://api.github.com/repos/container-interop/fig-standards/tags","blobs_url":"https://api.github.com/repos/container-interop/fig-standards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/container-interop/fig-standards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/container-interop/fig-standards/git/refs{/sha}","trees_url":"https://api.github.com/repos/container-interop/fig-standards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/container-interop/fig-standards/statuses/{sha}","languages_url":"https://api.github.com/repos/container-interop/fig-standards/languages","stargazers_url":"https://api.github.com/repos/container-interop/fig-standards/stargazers","contributors_url":"https://api.github.com/repos/container-interop/fig-standards/contributors","subscribers_url":"https://api.github.com/repos/container-interop/fig-standards/subscribers","subscription_url":"https://api.github.com/repos/container-interop/fig-standards/subscription","commits_url":"https://api.github.com/repos/container-interop/fig-standards/commits{/sha}","git_commits_url":"https://api.github.com/repos/container-interop/fig-standards/git/commits{/sha}","comments_url":"https://api.github.com/repos/container-interop/fig-standards/comments{/number}","issue_comment_url":"https://api.github.com/repos/container-interop/fig-standards/issues/comments{/number}","contents_url":"https://api.github.com/repos/container-interop/fig-standards/contents/{+path}","compare_url":"https://api.github.com/repos/container-interop/fig-standards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/container-interop/fig-standards/merges","archive_url":"https://api.github.com/repos/container-interop/fig-standards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/container-interop/fig-standards/downloads","issues_url":"https://api.github.com/repos/container-interop/fig-standards/issues{/number}","pulls_url":"https://api.github.com/repos/container-interop/fig-standards/pulls{/number}","milestones_url":"https://api.github.com/repos/container-interop/fig-standards/milestones{/number}","notifications_url":"https://api.github.com/repos/container-interop/fig-standards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/container-interop/fig-standards/labels{/name}","releases_url":"https://api.github.com/repos/container-interop/fig-standards/releases{/id}","created_at":"2015-04-01T08:33:59Z","updated_at":"2015-12-20T11:37:52Z","pushed_at":"2015-12-22T13:25:28Z","git_url":"git://github.com/container-interop/fig-standards.git","ssh_url":"git@github.com:container-interop/fig-standards.git","clone_url":"https://github.com/container-interop/fig-standards.git","svn_url":"https://github.com/container-interop/fig-standards","homepage":"http://www.php-fig.org/","size":1825,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/8"},"html":{"href":"https://github.com/container-interop/fig-standards/pull/8"},"issue":{"href":"https://api.github.com/repos/container-interop/fig-standards/issues/8"},"comments":{"href":"https://api.github.com/repos/container-interop/fig-standards/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/container-interop/fig-standards/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/container-interop/fig-standards/statuses/a66d0d56500865b8f0933a4ecac13c11c895b465"}}}}