{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/20441","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/20441/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/20441/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/20441/events","html_url":"https://github.com/symfony/symfony/pull/20441","id":187808058,"number":20441,"title":"[Workflow] Added DefinitionInterface","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"labels":[{"id":231677,"url":"https://api.github.com/repos/symfony/symfony/labels/BC%20Break","name":"BC Break","color":"e10c02","default":false},{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":237003792,"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false},{"id":397995968,"url":"https://api.github.com/repos/symfony/symfony/labels/Workflow","name":"Workflow","color":"dddddd","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-07T19:43:37Z","updated_at":"2016-11-08T14:01:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/20441","html_url":"https://github.com/symfony/symfony/pull/20441","diff_url":"https://github.com/symfony/symfony/pull/20441.diff","patch_url":"https://github.com/symfony/symfony/pull/20441.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | yes\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | -\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nThis PR adds an interface for the `Definition`. Following up on the discussions here: https://github.com/symfony/symfony/pull/19629#discussion_r86739886\r\n\r\nThe Definition of a Workflow should not be changed after the workflow has been created. That means we should always consider the Definition as immutable after this point. By introducing this interface, we have the possibility create an `ImmutableDefinition` and make the `workflow.[name].definition` service public. \r\n\r\nPing @lyrixx \r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/259143475","html_url":"https://github.com/symfony/symfony/pull/20441#issuecomment-259143475","issue_url":"https://api.github.com/repos/symfony/symfony/issues/20441","id":259143475,"user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T14:01:14Z","updated_at":"2016-11-08T14:01:14Z","body":"So is this how we recommend people to dump the Definition?\r\n\r\n```php\r\n$workflow = $this->get('workflow.xxx');\r\n$reflWorkflow = new ReflectionClass(workflow);\r\n$reflProp = $reflWorkflow->getProperty('definition');\r\n\r\n$reflProp->setAccessable(true);\r\n$definition = $reflBaz->getValue(workflow);\r\n\r\n$output = (new GraphvizDumper())->dump($definition);\r\n```"}}
{"actor":{"display_login":"Nyholm"}}