1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 09:14:39 +01:00
MadelineProto/tests/conversion/prepare-5.sh

11 lines
892 B
Bash
Raw Normal View History

2019-12-26 20:35:49 +01:00
#!/bin/bash -ex
2019-12-26 19:47:24 +01:00
rm -rf vendor/danog/madelineproto/docs
sed -re 's/\?(\w*) (\$\w+)/\2 = NULL/g;s/= null = null/=null/ig;s/: self//g' -i vendor/league/uri-interfaces/src/Contracts/UriInterface.php
2019-12-26 21:12:45 +01:00
while read line; do l=$(echo "$line" | sed 's/[(].*//g'); sed -i "s/$l.*/$line/g" vendor/league/uri/src/Uri.php; done <<< $(grep 'public function' vendor/league/uri-interfaces/src/Contracts/UriInterface.php | sed 's/;//g;s/: self//g')
2019-12-26 19:47:24 +01:00
sed -i 's/handleConnectionWindowIncrement[(]\$windowSize[)]/handleConnectionWindowIncrement(int $windowSize)/g' vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php
sed -ri 's/^\{/{ use \\MyCallableMaker;/g;s/\\Closure::fromCallable[(]\[(.+), (.+)\][)]/\1->callableFromInstanceMethod(\2)/g' vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php vendor/amphp/http-client/src/Connection/Http{2,1}Connection.php