{"action":"opened","number":31943,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/31943","id":286326588,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2MzI2NTg4","html_url":"https://github.com/symfony/symfony/pull/31943","diff_url":"https://github.com/symfony/symfony/pull/31943.diff","patch_url":"https://github.com/symfony/symfony/pull/31943.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/31943","number":31943,"state":"open","locked":false,"title":"Define default priority inside service class","user":{"login":"pcabreus","id":8780578,"node_id":"MDQ6VXNlcjg3ODA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/8780578?v=4","gravatar_id":"","url":"https://api.github.com/users/pcabreus","html_url":"https://github.com/pcabreus","followers_url":"https://api.github.com/users/pcabreus/followers","following_url":"https://api.github.com/users/pcabreus/following{/other_user}","gists_url":"https://api.github.com/users/pcabreus/gists{/gist_id}","starred_url":"https://api.github.com/users/pcabreus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcabreus/subscriptions","organizations_url":"https://api.github.com/users/pcabreus/orgs","repos_url":"https://api.github.com/users/pcabreus/repos","events_url":"https://api.github.com/users/pcabreus/events{/privacy}","received_events_url":"https://api.github.com/users/pcabreus/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | 4.4 for features / 3.4, 4.2 or 4.3 for bug fixes <!-- see below -->\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no     \r\n| Deprecations? | no\r\n| Tests pass?   | yes   \r\n| Fixed tickets | #...   \r\n| License       | MIT\r\n\r\nWith autoconfigure functions we don't have to do much to inject tagged services into a collector using interfaces, using `!tagged` is the easy way. But if we need some order we have to use priority, the problem is that priority only can be set by configuration file when it is a simple value.\r\nThis PR take a look if the static method `getDefaultPriority` exists in the service class and return its default value for the service instead of current 0 by defualt.\r\n\r\nExample of a service with default priority:\r\n\r\n    <?php\r\n    namespace App;\r\n    use App\\ServiceTagged;\r\n    class Service implement ServiceTagged\r\n    {\r\n        public static function getDefaultPriority(): int\r\n        {\r\n            return 50; //This will be the default priority if it's not defined in a configuration file\r\n        }\r\n    }\r\n    ?>\r\n\r\nPD: First PR please by nice!","created_at":"2019-06-07T20:40:13Z","updated_at":"2019-06-07T20:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/31943/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/31943/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/31943/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/e2138ada239621e9e8f1c12a2ba91af096938454","head":{"label":"pcabreus:patch-1","ref":"patch-1","sha":"e2138ada239621e9e8f1c12a2ba91af096938454","user":{"login":"pcabreus","id":8780578,"node_id":"MDQ6VXNlcjg3ODA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/8780578?v=4","gravatar_id":"","url":"https://api.github.com/users/pcabreus","html_url":"https://github.com/pcabreus","followers_url":"https://api.github.com/users/pcabreus/followers","following_url":"https://api.github.com/users/pcabreus/following{/other_user}","gists_url":"https://api.github.com/users/pcabreus/gists{/gist_id}","starred_url":"https://api.github.com/users/pcabreus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcabreus/subscriptions","organizations_url":"https://api.github.com/users/pcabreus/orgs","repos_url":"https://api.github.com/users/pcabreus/repos","events_url":"https://api.github.com/users/pcabreus/events{/privacy}","received_events_url":"https://api.github.com/users/pcabreus/received_events","type":"User","site_admin":false},"repo":{"id":190801869,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA4MDE4Njk=","name":"symfony","full_name":"pcabreus/symfony","private":false,"owner":{"login":"pcabreus","id":8780578,"node_id":"MDQ6VXNlcjg3ODA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/8780578?v=4","gravatar_id":"","url":"https://api.github.com/users/pcabreus","html_url":"https://github.com/pcabreus","followers_url":"https://api.github.com/users/pcabreus/followers","following_url":"https://api.github.com/users/pcabreus/following{/other_user}","gists_url":"https://api.github.com/users/pcabreus/gists{/gist_id}","starred_url":"https://api.github.com/users/pcabreus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcabreus/subscriptions","organizations_url":"https://api.github.com/users/pcabreus/orgs","repos_url":"https://api.github.com/users/pcabreus/repos","events_url":"https://api.github.com/users/pcabreus/events{/privacy}","received_events_url":"https://api.github.com/users/pcabreus/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pcabreus/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/pcabreus/symfony","forks_url":"https://api.github.com/repos/pcabreus/symfony/forks","keys_url":"https://api.github.com/repos/pcabreus/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcabreus/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcabreus/symfony/teams","hooks_url":"https://api.github.com/repos/pcabreus/symfony/hooks","issue_events_url":"https://api.github.com/repos/pcabreus/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/pcabreus/symfony/events","assignees_url":"https://api.github.com/repos/pcabreus/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/pcabreus/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/pcabreus/symfony/tags","blobs_url":"https://api.github.com/repos/pcabreus/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcabreus/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcabreus/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcabreus/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcabreus/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/pcabreus/symfony/languages","stargazers_url":"https://api.github.com/repos/pcabreus/symfony/stargazers","contributors_url":"https://api.github.com/repos/pcabreus/symfony/contributors","subscribers_url":"https://api.github.com/repos/pcabreus/symfony/subscribers","subscription_url":"https://api.github.com/repos/pcabreus/symfony/subscription","commits_url":"https://api.github.com/repos/pcabreus/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcabreus/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcabreus/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcabreus/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcabreus/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/pcabreus/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcabreus/symfony/merges","archive_url":"https://api.github.com/repos/pcabreus/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcabreus/symfony/downloads","issues_url":"https://api.github.com/repos/pcabreus/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/pcabreus/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/pcabreus/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/pcabreus/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcabreus/symfony/labels{/name}","releases_url":"https://api.github.com/repos/pcabreus/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/pcabreus/symfony/deployments","created_at":"2019-06-07T20:02:42Z","updated_at":"2019-06-07T20:03:05Z","pushed_at":"2019-06-07T20:29:37Z","git_url":"git://github.com/pcabreus/symfony.git","ssh_url":"git@github.com:pcabreus/symfony.git","clone_url":"https://github.com/pcabreus/symfony.git","svn_url":"https://github.com/pcabreus/symfony","homepage":"https://symfony.com","size":138783,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"4.4"}},"base":{"label":"symfony:4.4","ref":"4.4","sha":"02a792a3137a67329d04efe5ad111554b27b6a9c","user":{"login":"symfony","id":143937,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzkzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"node_id":"MDEwOlJlcG9zaXRvcnk0NTgwNTg=","name":"symfony","full_name":"symfony/symfony","private":false,"owner":{"login":"symfony","id":143937,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzkzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2019-06-07T19:23:00Z","pushed_at":"2019-06-07T18:53:51Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"https://symfony.com","size":138783,"stargazers_count":20925,"watchers_count":20925,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6954,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":842,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6954,"open_issues":842,"watchers":20925,"default_branch":"4.4"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/31943"},"html":{"href":"https://github.com/symfony/symfony/pull/31943"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/31943"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/31943/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/31943/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/31943/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/e2138ada239621e9e8f1c12a2ba91af096938454"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"pcabreus"}}