Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8631a2a

Browse filesBrowse files
committed
[Emoji] Fix build of gitlab emoji + update them
1 parent 89a9e9e commit 8631a2a
Copy full SHA for 8631a2a

File tree

Expand file treeCollapse file tree

6 files changed

+7732
-1745
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+7732
-1745
lines changed

‎src/Symfony/Component/Emoji/Resources/bin/Makefile

Copy file name to clipboardExpand all lines: src/Symfony/Component/Emoji/Resources/bin/Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
update: ## Update sources
55
@composer update
66
@curl https://api.github.com/emojis > vendor/github-emojis.json
7-
@curl https://gitlab.com/gitlab-org/gitlab/-/raw/master/fixtures/emojis/index.json > vendor/gitlab-emojis.json
7+
@curl https://gitlab.com/gitlab-org/gitlab/-/raw/master/fixtures/emojis/digests.json > vendor/gitlab-emojis.json
88
@curl https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji.json > vendor/slack-emojis.json
99
@curl -L https://unicode.org/Public/emoji/latest/emoji-test.txt > vendor/emoji-test.txt
1010

‎src/Symfony/Component/Emoji/Resources/bin/build.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Emoji/Resources/bin/build.php
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,10 @@ public static function buildGitlabMaps(array $emojisCodePoints): array
149149
$emojis = json_decode((new Filesystem())->readFile(__DIR__.'/vendor/gitlab-emojis.json'), true, flags: JSON_THROW_ON_ERROR);
150150
$maps = [];
151151

152-
foreach ($emojis as $emojiItem) {
152+
foreach ($emojis as $shortName => $emojiItem) {
153153
$emoji = $emojiItem['moji'];
154154
$emojiPriority = mb_strlen($emoji) << 1;
155-
$maps[$emojiPriority + 1][$emojiItem['shortname']] = $emoji;
156-
157-
foreach ($emojiItem['aliases'] as $alias) {
158-
$maps[$emojiPriority][$alias] = $emoji;
159-
}
155+
$maps[$emojiPriority + 1][":$shortName:"] = $emoji;
160156
}
161157

162158
return $maps;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.