Skip to content

Commit 24fd559

Browse files
authored
Merge pull request #375 from Liturgical-Calendar/development
Prepare v5.1 release
2 parents 6c4fc41 + 15db24c commit 24fd559

53 files changed

Lines changed: 9479 additions & 625 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/new_bug_report.yml

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,79 @@
1-
name: Bug Report
1+
name: 🐞 Bug Report
22
description: File a bug report
3-
title: "[Bug]: "
3+
title: "[Bug]: <title>"
44
labels: ["bug"]
55
assignees:
66
- JohnRDOrazio
7+
projects:
8+
- Liturgical-Calendar/1
79
body:
810
- type: markdown
911
attributes:
1012
value: |
1113
Thanks for taking the time to fill out this bug report!
14+
- type: checkboxes
15+
attributes:
16+
label: Is there an existing issue for this?
17+
description: Please search to see if an issue already exists for the bug you encountered.
18+
options:
19+
- label: I have searched the existing issues
20+
required: true
1221
- type: textarea
13-
id: what-happened
1422
attributes:
15-
label: What happened?
16-
description: Also tell us, what did you expect to happen?
17-
placeholder: Tell us what you see!
18-
value: "A bug happened!"
23+
label: Current Behavior
24+
description: A concise description of what you're experiencing.
1925
validations:
20-
required: true
26+
required: false
27+
- type: textarea
28+
attributes:
29+
label: Expected Behavior
30+
description: A concise description of what you expected to happen.
31+
validations:
32+
required: false
33+
- type: textarea
34+
attributes:
35+
label: Steps To Reproduce
36+
description: Steps to reproduce the behavior.
37+
placeholder: |
38+
1. In this environment...
39+
1. With this config...
40+
1. Run '...'
41+
1. See error...
42+
validations:
43+
required: false
44+
- type: textarea
45+
attributes:
46+
label: Environment
47+
description: |
48+
examples:
49+
- **OS**: Ubuntu 24.04
50+
- **PHP**: 8.4
51+
value: |
52+
- **OS**:
53+
- **PHP**:
54+
render: markdown
55+
validations:
56+
required: false
57+
- type: textarea
58+
attributes:
59+
label: Anything else?
60+
description: |
61+
Links? References? Anything that will give us more context about the issue you are encountering!
62+
63+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
64+
render: markdown
65+
validations:
66+
required: false
2167
- type: dropdown
2268
id: version
2369
attributes:
2470
label: Version
2571
description: What version of the API where you using when you noticed the bug?
2672
options:
2773
- v3
28-
- v4 (Default)
29-
- dev (Edge)
74+
- v4
75+
- v5 (Latest)
76+
- dev (Unstable)
77+
default: 3
3078
validations:
3179
required: true
32-
- type: dropdown
33-
id: browsers
34-
attributes:
35-
label: Which browser or browsers are you seeing the problem on? (can select more than one, or N/A if not applicable)
36-
multiple: true
37-
options:
38-
- Chrome
39-
- Edge
40-
- Firefox
41-
- Safari
42-
- N/A
43-
- type: textarea
44-
id: error-messages
45-
attributes:
46-
label: Relevant error messages
47-
description: If there are any error messages related to the bug, please add them here. This will be automatically formatted into code, so no need for backticks.
48-
render: shell
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 🚀 Feature request
2+
description: File a feature request
3+
title: "[Feature]: <title>"
4+
labels: ["enhancement"]
5+
assignees:
6+
- JohnRDOrazio
7+
projects:
8+
- Liturgical-Calendar/1
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this feature request!
14+
- type: checkboxes
15+
attributes:
16+
label: Is there an existing issue for this?
17+
description: Please search to see if an issue already exists for the feature you are requesting.
18+
options:
19+
- label: I have searched the existing issues
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Current Behavior
24+
description: A concise description of what you're experiencing.
25+
validations:
26+
required: false
27+
- type: textarea
28+
attributes:
29+
label: Wanted Behavior
30+
description: A concise description of what you would like to happen.
31+
validations:
32+
required: false
33+
- type: textarea
34+
attributes:
35+
label: Anything else?
36+
description: |
37+
Links? References? Anything that will give us more context about the feature you are requesting!
38+
39+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
40+
render: markdown
41+
validations:
42+
required: false
Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
1-
# Issue being addressed
2-
*(add a reference to an issue by typing the hash character, a dropdown list of issues should appear)*
1+
# Pull Request
32

4-
# Summary of changes
5-
*(please make a summary of the changes in this PR, if not already clearly indicated in the commit message)*
3+
## Description
64

7-
# Mentions of persons or teams responsible for reviewing proposed changes
8-
*(if there is more than one person to be credited for this change, or to get the attention of a reviewer, mention them using the @ character followed by their username)*
5+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
6+
7+
Fixes #(issue number)
8+
9+
## Type of change
10+
11+
Please delete options that are not relevant.
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
- [ ] Documentation update
17+
18+
## How Has This Been Tested?
19+
20+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
21+
22+
- [ ] Test A
23+
- [ ] Test B
24+
25+
## Checklist
26+
27+
- [ ] My code follows the style guidelines of this project
28+
- [ ] I have performed a self-review of my own code
29+
- [ ] I have commented my code, particularly in hard-to-understand areas
30+
- [ ] I have made corresponding changes to the documentation
31+
- [ ] My changes generate no new warnings
32+
- [ ] I have added tests that prove my fix is effective or that my feature works
33+
- [ ] New and existing unit tests pass locally with my changes
34+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/workflows/cldr_cron.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Update CLDR
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 1" # every Monday at 3AM UTC
6+
workflow_dispatch: # manual trigger
7+
8+
jobs:
9+
update-cldr:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Get latest CLDR release tag
16+
id: cldr
17+
run: |
18+
latest=$(curl -fsSL -H "Authorization: Bearer ${{ github.token }}" \
19+
https://api.github.com/repos/unicode-org/cldr-json/releases/latest \
20+
| jq -r .tag_name)
21+
if [ -z "$latest" ] || [ "$latest" = "null" ]; then
22+
echo "Failed to get latest CLDR release tag"
23+
exit 1
24+
fi
25+
echo "tag=$latest" >> $GITHUB_OUTPUT
26+
27+
- name: Check current version in repo
28+
id: local
29+
run: |
30+
if [ -f jsondata/likelySubtags.json ]; then
31+
local_version=$(jq -r '.supplemental.version._cldrVersion // "none"' jsondata/likelySubtags.json 2>/dev/null || echo "none")
32+
else
33+
local_version="none"
34+
fi
35+
echo "version=$local_version" >> $GITHUB_OUTPUT
36+
37+
- name: Compare versions
38+
id: compare
39+
run: |
40+
remote_tag="${{ steps.cldr.outputs.tag }}"
41+
remote_version="${remote_tag#v}" # strip leading v in shell
42+
local_version="${{ steps.local.outputs.version }}"
43+
44+
echo "Remote: $remote_version"
45+
echo "Local: $local_version"
46+
47+
if [ "$remote_version" = "$local_version" ]; then
48+
echo "up_to_date=true" >> $GITHUB_OUTPUT
49+
else
50+
echo "up_to_date=false" >> $GITHUB_OUTPUT
51+
echo "remote_version=$remote_version" >> $GITHUB_OUTPUT
52+
fi
53+
54+
- name: Download likelySubtags.json
55+
if: steps.compare.outputs.up_to_date == 'false'
56+
run: |
57+
url="https://raw.githubusercontent.com/unicode-org/cldr-json/refs/tags/${{ steps.cldr.outputs.tag }}/cldr-core/supplemental/likelySubtags.json"
58+
curl -fsSL "$url" -o jsondata/likelySubtags.json
59+
# Validate downloaded file is valid JSON
60+
if ! jq empty jsondata/likelySubtags.json 2>/dev/null; then
61+
echo "Downloaded likelySubtags.json is not valid JSON"
62+
exit 1
63+
fi
64+
65+
- name: Commit changes
66+
if: steps.compare.outputs.up_to_date == 'false'
67+
uses: peter-evans/create-pull-request@v6
68+
with:
69+
commit-message: "Update CLDR likelySubtags to ${{ steps.cldr.outputs.tag }}"
70+
title: "Update CLDR likelySubtags to ${{ steps.cldr.outputs.tag }}"
71+
body: |
72+
This PR updates the CLDR likelySubtags data from version ${{ steps.local.outputs.version }} to ${{ steps.compare.outputs.remote_version }}.
73+
74+
Release notes: https://github.com/unicode-org/cldr-json/releases/tag/${{ steps.cldr.outputs.tag }}
75+
labels: dependencies, automated
76+
branch: update-cldr
77+
delete-branch: true

.github/workflows/phpunit.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
3232

33-
3433
- name: Setup PHP with PECL extensions
3534
uses: shivammathur/setup-php@v2
3635
with:
@@ -54,7 +53,7 @@ jobs:
5453
restore-keys: phpunit-
5554

5655
- name: Install Composer dependencies
57-
run: composer install --no-interaction --prefer-dist --optimize-autoloader --no-progress
56+
run: composer install --no-interaction --prefer-dist --optimize-autoloader --classmap-authoritative --no-progress
5857

5958
- name: Copy env file
6059
run: cp .env.example .env.local
@@ -84,15 +83,28 @@ jobs:
8483
exit 1
8584
fi
8685
87-
for i in {1..30}; do
88-
if curl -fsS http://localhost:8000/ > /dev/null; then
86+
# wait for the server to actually bind
87+
MAX_TRIES=30
88+
for i in $(seq 1 $MAX_TRIES); do
89+
if nc -z localhost 8000; then
90+
echo "Server is ready."
8991
exit 0
9092
fi
9193
sleep 1
9294
done
95+
96+
echo "Server did not respond on localhost:8000 after $MAX_TRIES seconds."
9397
exit 1
9498
9599
- name: Run tests
100+
run: time composer test
101+
102+
- name: Show logs on failure
103+
if: failure()
96104
run: |
97-
composer dump-autoload --optimize
98-
time composer test
105+
echo "=== Dumping logs ==="
106+
if [ -d logs ]; then
107+
find logs -type f -name "*.log" -print -exec cat {} \;
108+
else
109+
echo "No logs directory found"
110+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ phpunit.xml
1919
public/*.php
2020
!public/index.php
2121
!public/LitCalTestServer.php
22+
/.aider*
23+
.DS_Store

0 commit comments

Comments
 (0)