Switch to PHP for conversion script to avoid issues with read in travis
This commit is contained in:
parent
efef22d747
commit
474691d81f
17
tests/conversion/prepare-5.php
Normal file
17
tests/conversion/prepare-5.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$input = \file_get_contents('vendor/league/uri-interfaces/src/Contracts/UriInterface.php');
|
||||||
|
\preg_match_all("/public function (\w+)[(].*/", $input, $matches);
|
||||||
|
$search = $matches[1];
|
||||||
|
$replace = $matches[0];
|
||||||
|
|
||||||
|
foreach ($search as &$method) {
|
||||||
|
$method = "/public function $method".'[(].*/';
|
||||||
|
}
|
||||||
|
foreach ($replace as &$method) {
|
||||||
|
$method= \str_replace(';', '', $method);
|
||||||
|
}
|
||||||
|
|
||||||
|
$input = \file_get_contents('vendor/league/uri/src/Uri.php');
|
||||||
|
$input = \preg_replace($search, $replace, $input);
|
||||||
|
\file_put_contents('vendor/league/uri/src/Uri.php', $input);
|
@ -3,7 +3,7 @@
|
|||||||
rm -rf vendor/danog/madelineproto/docs
|
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
|
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
|
||||||
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')
|
php $(dirname $0)/prepare-5.php
|
||||||
|
|
||||||
sed -i 's/handleConnectionWindowIncrement[(]\$windowSize[)]/handleConnectionWindowIncrement(int $windowSize)/g' vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php
|
sed -i 's/handleConnectionWindowIncrement[(]\$windowSize[)]/handleConnectionWindowIncrement(int $windowSize)/g' vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user