Skip to content

Commit 260ef97

Browse files
committed
Merge branch '6.x'
2 parents c05fc3a + cbd421f commit 260ef97

28 files changed

+2830
-207
lines changed

bin/docker/Dockerfile

+2-34
Original file line numberDiff line numberDiff line change
@@ -63,44 +63,14 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie"
6363

6464
ENV GPG_KEYS AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD
6565

66-
ENV PHP_VERSION 8.4.5
67-
ENV PHP_URL="https://www.php.net/distributions/php-8.4.5.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.4.5.tar.xz.asc"
68-
ENV PHP_SHA256="0d3270bbce4d9ec617befce52458b763fd461d475f1fe2ed878bb8573faed327"
69-
7066
ADD bin/docker/deepbind.patch /
7167

7268
RUN set -eux; \
73-
\
74-
savedAptMark="$(apt-mark showmanual)"; \
75-
apt-get update; \
76-
apt-get install -y --no-install-recommends gnupg; \
77-
rm -rf /var/lib/apt/lists/*; \
7869
\
7970
mkdir -p /usr/src; \
8071
cd /usr/src; \
8172
\
82-
curl -fsSL -o php.tar.xz "$PHP_URL"; \
83-
\
84-
if [ -n "$PHP_SHA256" ]; then \
85-
echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; \
86-
fi; \
87-
\
88-
if [ -n "$PHP_ASC_URL" ]; then \
89-
curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
90-
export GNUPGHOME="$(mktemp -d)"; \
91-
for key in $GPG_KEYS; do \
92-
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
93-
done; \
94-
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
95-
gpgconf --kill all; \
96-
rm -rf "$GNUPGHOME"; \
97-
fi; \
98-
\
99-
apt-mark auto '.*' > /dev/null; \
100-
apt-mark manual $savedAptMark > /dev/null; \
101-
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
102-
103-
COPY bin/docker/docker-php-source /usr/local/bin/
73+
git clone https://github.com/php/php-src.git --depth 1 --recursive -b PHP-8.4 php
10474

10575
RUN set -eux; \
10676
\
@@ -127,7 +97,6 @@ RUN set -eux; \
12797
PHP_BUILD_PROVIDER='https://github.com/docker-library/php' \
12898
PHP_UNAME='Linux - Docker' \
12999
; \
130-
docker-php-source extract; \
131100
cd /usr/src/php; \
132101
patch -p1 < /deepbind.patch; \
133102
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
@@ -186,7 +155,7 @@ RUN set -eux; \
186155
cp -v php.ini-* "$PHP_INI_DIR/"; \
187156
\
188157
cd /; \
189-
docker-php-source delete; rm deepbind.patch; \
158+
rm -r /usr/src/php; rm deepbind.patch; \
190159
\
191160
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
192161
apt-mark auto '.*' > /dev/null; \
@@ -257,7 +226,6 @@ LABEL "org.opencontainers.image.description"="A static analysis tool for finding
257226
LABEL "org.opencontainers.image.licenses"=MIT
258227

259228
ENV PHP_INI_DIR /usr/local/etc/php
260-
ENV PHP_VERSION 8.4.4
261229
ENV PATH=/composer/vendor/bin:${PATH}
262230

263231
ENV USE_ZEND_ALLOC=0

bin/docker/docker-php-source

-34
This file was deleted.

bin/stubs/gen_callmap.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ VERSIONS="7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4"
44

55

66
for f in $VERSIONS; do
7-
docker run --pull always --rm -it -v $PWD:/app ghcr.io/danog/psalm:internal_stubs_$f php /app/bin/stubs/gen_base_callmap.php
7+
docker run --pull always --platform linux/amd64 --rm -v $PWD:/app ghcr.io/danog/psalm:internal_stubs_$f php /app/bin/stubs/gen_base_callmap.php &
88
done
99

10+
wait
11+
1012
php bin/stubs/gen_callmap.php
1113
php bin/stubs/gen_callmap.php

bin/stubs/gen_preloader.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@
5555
RecursiveIteratorIterator::LEAVES_ONLY,
5656
) as $f
5757
) {
58-
$f = str_replace(['/', '.php', 'src\\'], ['\\', '', ''], $f);
59-
$classes[$f] = true;
58+
if (str_ends_with($f, '.php')) {
59+
$f = str_replace(['/', '.php', 'src\\'], ['\\', '', ''], $f);
60+
$classes[$f] = true;
61+
}
6062
}
6163

6264
foreach ($classes as $class => $_) {

bin/stubs/update-property-map.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
'/.*.xml$/',
6767
);
6868

69-
$classes = require_once dirname(__DIR__) . '/dictionaries/ManualPropertyMap.php';
69+
$classes = require_once dirname(__DIR__, 2) . '/dictionaries/ManualPropertyMap.php';
7070

7171

7272
libxml_use_internal_errors(true);
@@ -148,7 +148,7 @@
148148

149149
$serialized = serializeArray($classes, '');
150150
file_put_contents(
151-
dirname(__DIR__) . '/dictionaries/PropertyMap.php',
151+
dirname(__DIR__, 2) . '/dictionaries/PropertyMap.php',
152152
<<<EOF
153153
<?php
154154
namespace Psalm\Internal;

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
"generate_levels_doc": "@php ./bin/docs/generate_levels_doc.php",
141141
"build": [
142142
"@gen_preloader",
143+
"@gen_callmap",
143144
"@generate_issues_list_doc",
144145
"@generate_levels_doc",
145146
"@cs-fix"

dictionaries/CallMap_70.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21157,7 +21157,7 @@
2115721157
),
2115821158
'evloop::check' =>
2115921159
array (
21160-
0 => 'EvCheck',
21160+
0 => 'mixed',
2116121161
'callback' => 'callable',
2116221162
'data=' => 'mixed',
2116321163
'priority=' => 'int',

dictionaries/CallMap_71.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -21773,7 +21773,7 @@
2177321773
),
2177421774
'evloop::check' =>
2177521775
array (
21776-
0 => 'EvCheck',
21776+
0 => 'mixed',
2177721777
'callback' => 'callable',
2177821778
'data=' => 'mixed',
2177921779
'priority=' => 'int',
@@ -86117,12 +86117,12 @@
8611786117
array (
8611886118
0 => 'bool',
8611986119
'types' => 'mixed',
86120-
'...&arguments=' => 'mixed',
86120+
'&...arguments=' => 'mixed',
8612186121
),
8612286122
'swoole\\database\\mysqlistatementproxy::bind_result' =>
8612386123
array (
8612486124
0 => 'bool',
86125-
'...&arguments=' => 'mixed',
86125+
'&...arguments=' => 'mixed',
8612686126
),
8612786127
'swoole\\database\\objectproxy::__call' =>
8612886128
array (

dictionaries/CallMap_72.php

+23-3
Original file line numberDiff line numberDiff line change
@@ -22039,7 +22039,7 @@
2203922039
),
2204022040
'evloop::check' =>
2204122041
array (
22042-
0 => 'EvCheck',
22042+
0 => 'mixed',
2204322043
'callback' => 'callable',
2204422044
'data=' => 'mixed',
2204522045
'priority=' => 'int',
@@ -74229,10 +74229,30 @@
7422974229
'string_1' => 'string',
7423074230
'string_2' => 'string',
7423174231
),
74232+
'sodium_crypto_aead_aes256gcm_decrypt' =>
74233+
array (
74234+
0 => 'mixed',
74235+
'string' => 'mixed',
74236+
'ad' => 'mixed',
74237+
'nonce' => 'mixed',
74238+
'key' => 'mixed',
74239+
),
74240+
'sodium_crypto_aead_aes256gcm_encrypt' =>
74241+
array (
74242+
0 => 'mixed',
74243+
'string' => 'mixed',
74244+
'ad' => 'mixed',
74245+
'nonce' => 'mixed',
74246+
'key' => 'mixed',
74247+
),
7423274248
'sodium_crypto_aead_aes256gcm_is_available' =>
7423374249
array (
7423474250
0 => 'bool',
7423574251
),
74252+
'sodium_crypto_aead_aes256gcm_keygen' =>
74253+
array (
74254+
0 => 'mixed',
74255+
),
7423674256
'sodium_crypto_aead_chacha20poly1305_decrypt' =>
7423774257
array (
7423874258
0 => 'false|string',
@@ -88099,12 +88119,12 @@
8809988119
array (
8810088120
0 => 'bool',
8810188121
'types' => 'mixed',
88102-
'...&arguments=' => 'mixed',
88122+
'&...arguments=' => 'mixed',
8810388123
),
8810488124
'swoole\\database\\mysqlistatementproxy::bind_result' =>
8810588125
array (
8810688126
0 => 'bool',
88107-
'...&arguments=' => 'mixed',
88127+
'&...arguments=' => 'mixed',
8810888128
),
8810988129
'swoole\\database\\objectproxy::__call' =>
8811088130
array (

dictionaries/CallMap_73.php

+23-3
Original file line numberDiff line numberDiff line change
@@ -22096,7 +22096,7 @@
2209622096
),
2209722097
'evloop::check' =>
2209822098
array (
22099-
0 => 'EvCheck',
22099+
0 => 'mixed',
2210022100
'callback' => 'callable',
2210122101
'data=' => 'mixed',
2210222102
'priority=' => 'int',
@@ -74477,10 +74477,30 @@
7447774477
'string_1' => 'string',
7447874478
'string_2' => 'string',
7447974479
),
74480+
'sodium_crypto_aead_aes256gcm_decrypt' =>
74481+
array (
74482+
0 => 'mixed',
74483+
'string' => 'mixed',
74484+
'ad' => 'mixed',
74485+
'nonce' => 'mixed',
74486+
'key' => 'mixed',
74487+
),
74488+
'sodium_crypto_aead_aes256gcm_encrypt' =>
74489+
array (
74490+
0 => 'mixed',
74491+
'string' => 'mixed',
74492+
'ad' => 'mixed',
74493+
'nonce' => 'mixed',
74494+
'key' => 'mixed',
74495+
),
7448074496
'sodium_crypto_aead_aes256gcm_is_available' =>
7448174497
array (
7448274498
0 => 'bool',
7448374499
),
74500+
'sodium_crypto_aead_aes256gcm_keygen' =>
74501+
array (
74502+
0 => 'mixed',
74503+
),
7448474504
'sodium_crypto_aead_chacha20poly1305_decrypt' =>
7448574505
array (
7448674506
0 => 'false|string',
@@ -88352,12 +88372,12 @@
8835288372
array (
8835388373
0 => 'bool',
8835488374
'types' => 'mixed',
88355-
'...&arguments=' => 'mixed',
88375+
'&...arguments=' => 'mixed',
8835688376
),
8835788377
'swoole\\database\\mysqlistatementproxy::bind_result' =>
8835888378
array (
8835988379
0 => 'bool',
88360-
'...&arguments=' => 'mixed',
88380+
'&...arguments=' => 'mixed',
8836188381
),
8836288382
'swoole\\database\\objectproxy::__call' =>
8836388383
array (

dictionaries/CallMap_74.php

+23-3
Original file line numberDiff line numberDiff line change
@@ -22177,7 +22177,7 @@
2217722177
),
2217822178
'evloop::check' =>
2217922179
array (
22180-
0 => 'EvCheck',
22180+
0 => 'mixed',
2218122181
'callback' => 'callable',
2218222182
'data=' => 'mixed',
2218322183
'priority=' => 'int',
@@ -74848,10 +74848,30 @@
7484874848
'string_1' => 'string',
7484974849
'string_2' => 'string',
7485074850
),
74851+
'sodium_crypto_aead_aes256gcm_decrypt' =>
74852+
array (
74853+
0 => 'mixed',
74854+
'string' => 'mixed',
74855+
'ad' => 'mixed',
74856+
'nonce' => 'mixed',
74857+
'key' => 'mixed',
74858+
),
74859+
'sodium_crypto_aead_aes256gcm_encrypt' =>
74860+
array (
74861+
0 => 'mixed',
74862+
'string' => 'mixed',
74863+
'ad' => 'mixed',
74864+
'nonce' => 'mixed',
74865+
'key' => 'mixed',
74866+
),
7485174867
'sodium_crypto_aead_aes256gcm_is_available' =>
7485274868
array (
7485374869
0 => 'bool',
7485474870
),
74871+
'sodium_crypto_aead_aes256gcm_keygen' =>
74872+
array (
74873+
0 => 'mixed',
74874+
),
7485574875
'sodium_crypto_aead_chacha20poly1305_decrypt' =>
7485674876
array (
7485774877
0 => 'false|string',
@@ -88850,12 +88870,12 @@
8885088870
array (
8885188871
0 => 'bool',
8885288872
'types' => 'mixed',
88853-
'...&arguments=' => 'mixed',
88873+
'&...arguments=' => 'mixed',
8885488874
),
8885588875
'swoole\\database\\mysqlistatementproxy::bind_result' =>
8885688876
array (
8885788877
0 => 'bool',
88858-
'...&arguments=' => 'mixed',
88878+
'&...arguments=' => 'mixed',
8885988879
),
8886088880
'swoole\\database\\objectproxy::__call' =>
8886188881
array (

0 commit comments

Comments
 (0)