Skip to content

Commit 6d906ca

Browse files
committed
Generate stubs for WordPress 5.0.17
1 parent a1dfa9f commit 6d906ca

File tree

4 files changed

+85645
-112216
lines changed

4 files changed

+85645
-112216
lines changed

generate.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,26 @@ fi
3838

3939
# Add ReturnTypeWillChange attribute to PHP 8-incompatible methods.
4040
declare -r -a REQUESTS_V1_METHODS=(
41-
'Requests_Utility_FilteredIterator::unserialize'
42-
'Requests_Utility_FilteredIterator::__unserialize'
43-
'Requests_Utility_FilteredIterator::current'
44-
'Requests_Cookie_Jar::offsetExists'
45-
'Requests_Cookie_Jar::offsetGet'
46-
'Requests_Cookie_Jar::offsetSet'
47-
'Requests_Cookie_Jar::offsetUnset'
48-
'Requests_Cookie_Jar::getIterator'
49-
'Requests_Utility_CaseInsensitiveDictionary::offsetExists'
50-
'Requests_Utility_CaseInsensitiveDictionary::offsetGet'
51-
'Requests_Utility_CaseInsensitiveDictionary::offsetSet'
52-
'Requests_Utility_CaseInsensitiveDictionary::offsetUnset'
53-
'Requests_Utility_CaseInsensitiveDictionary::getIterator'
41+
"Requests_Cookie_Jar::getIterator"
42+
"Requests_Cookie_Jar::offsetExists"
43+
"Requests_Cookie_Jar::offsetGet"
44+
"Requests_Cookie_Jar::offsetSet"
45+
"Requests_Cookie_Jar::offsetUnset"
46+
"Requests_Utility_CaseInsensitiveDictionary::getIterator"
47+
"Requests_Utility_CaseInsensitiveDictionary::offsetExists"
48+
"Requests_Utility_CaseInsensitiveDictionary::offsetGet"
49+
"Requests_Utility_CaseInsensitiveDictionary::offsetSet"
50+
"Requests_Utility_CaseInsensitiveDictionary::offsetUnset"
51+
"Requests_Utility_FilteredIterator::current"
52+
"Requests_Utility_FilteredIterator::__unserialize"
53+
"Requests_Utility_FilteredIterator::unserialize"
5454
)
5555
for METHOD in "${REQUESTS_V1_METHODS[@]}"; do
5656
# Get the line number where the method is defined.
5757
LINE="$(php -r "require 'wordpress-stubs.php'; print (new ReflectionMethod('${METHOD}'))->getStartLine();")"
58+
if [ -z "${LINE}" ]; then
59+
continue
60+
fi
5861
echo "${METHOD} is defined on line ${LINE}."
5962

6063
# Check the previous line forr ReturnTypeWillChange attribute.

release-latest-versions.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ Do_release()
3434
CORE_JSON="$(wget -q -O- "https://packagist.org/packages/johnpbloch/wordpress-core.json")"
3535

3636
# @TODO Use branches!
37-
for MINOR in 4.7 4.8 4.9 \
38-
5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 \
39-
6.0; do
37+
#for MINOR in 4.7 4.8 4.9 \
38+
for MINOR in \
39+
5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 \
40+
6.0 6.1 6.2; do
4041
# Find latest version
4142
printf -v JQ_FILTER '.package.versions[].version | select(test("^%s\\\\.%s\\\\.\\\\d+$"))' "${MINOR%.*}" "${MINOR#*.}"
4243
LATEST_FIVE="$(jq -r "$JQ_FILTER" <<<"$CORE_JSON" | sort -t "." -k 3 -g | tail -n 5)"

source/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"ext-mbstring": "*",
88
"ext-openssl": "*",
99
"ext-sodium": "*",
10-
"johnpbloch/wordpress": "6.0.1"
10+
"johnpbloch/wordpress": "5.0.17"
1111
},
1212
"minimum-stability": "stable",
1313
"config": {

0 commit comments

Comments
 (0)