{"action":"created","issue":{"url":"https://api.github.com/repos/container-interop/definition-interop/issues/24","labels_url":"https://api.github.com/repos/container-interop/definition-interop/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/container-interop/definition-interop/issues/24/comments","events_url":"https://api.github.com/repos/container-interop/definition-interop/issues/24/events","html_url":"https://github.com/container-interop/definition-interop/issues/24","id":121672653,"number":24,"title":"Better definition for ParameterDefinitionInterface","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-11T09:43:11Z","updated_at":"2015-12-11T11:11:27Z","closed_at":null,"body":"So far, the text in the PHPDoc of `ParameterDefinitionInterface` says this:\r\n\r\n```\r\nRepresents a container entry that is a scalar value.\r\n```\r\n\r\nNote: according to [is_scalar](http://php.net/manual/fr/function.is-scalar.php) doc, arrays are NOT \"scalar\" values.\r\n\r\nIn the unit tests, we have this: https://github.com/container-interop/definition-interop-tests/blob/master/src/AbstractDefinitionCompatibilityTest.php#L166-L176\r\n\r\nObviously, our parameter definitions is returning an array. Furthermore, the test adds references in the array, which are not scalar either.\r\n\r\nI think the test is correct, but that means we need to work on the PHPDoc of the `ParameterDefinitionInterface`.\r\n\r\nShall we try something like this:\r\n\r\n```\r\nRepresents a container entry that is a parameter.\r\n\r\nA parameter is a scalar value, a reference, or an array of parameters:\r\n\r\nPARAMETER = [scalar | ReferenceInterface | array<PARAMETER> ]\r\n```\r\n\r\nAlso, since we are allowing `ReferenceInterface` into parameters, shall we not extend it to `DefinitionInterface`?\r\n\r\nIn this case, we would have:\r\n\r\n```\r\nPARAMETER = [scalar | DefinitionInterface | array<PARAMETER> ]\r\n```"},"comment":{"url":"https://api.github.com/repos/container-interop/definition-interop/issues/comments/163912516","html_url":"https://github.com/container-interop/definition-interop/issues/24#issuecomment-163912516","issue_url":"https://api.github.com/repos/container-interop/definition-interop/issues/24","id":163912516,"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},"created_at":"2015-12-11T11:11:27Z","updated_at":"2015-12-11T11:11:27Z","body":"`mixed` is really problematic when it comes to compiled containers (Symfony, Yaco...)\r\nFor those, at the very least, you have to be able to \"serialize\" or \"var_export\" what `ParameterDefinition` is returning.\r\n\r\nSo this rules out *resources* and non serializable objects which are part of \"mixed\".\r\n\r\nAlso, we need Symfony compatibility out of the box, so we might have a look at what Symfony does support for parameters (and restrict ourselves to this subset)"}}