setup-php 2.21.2 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,9 @@
1
1
  # Helper function to get phalcon version
2
2
  get_phalcon_version() {
3
3
  if [ "$extension" = "phalcon5" ]; then
4
- semver="$(get_pecl_version phalcon stable 5)"
5
- ([ -n "$semver" ] && echo "$semver") || get_pecl_version phalcon rc 5
4
+ get_pecl_version phalcon stable 5
6
5
  elif [ "$extension" = "phalcon4" ]; then
7
- echo '4.1.3'
6
+ echo '4.1.2'
8
7
  elif [ "$extension" = "phalcon3" ]; then
9
8
  echo '3.4.5'
10
9
  fi
@@ -33,7 +32,7 @@ add_phalcon_helper() {
33
32
  package="php${version:?}-$extension"
34
33
  add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
35
34
  [ "$extension" = "phalcon4" ] && (install_packages "php${version:?}-psr" || pecl_install psr || pecl_install psr-1.1.0)
36
- (check_package "$package" && install_packages "$package") || add_phalcon_from_repo
35
+ (check_package "$package" && install_packages "$package") || pecl_install phalcon-"$(get_phalcon_version)" || add_phalcon_from_repo
37
36
  fi
38
37
  }
39
38
 
@@ -86,7 +85,7 @@ add_phalcon5() {
86
85
 
87
86
  # Function to add phalcon.
88
87
  add_phalcon() {
89
- extension=$1
88
+ local extension=$1
90
89
  status='Enabled'
91
90
  extension_major_version=${extension: -1}
92
91
  if [[ "$extension_major_version" =~ [3-5] ]]; then
@@ -146,6 +146,7 @@ add_extension_from_source() {
146
146
  add_log "${cross:?}" "$source" "$source does not have a PHP extension"
147
147
  else
148
148
  [[ -n "${libraries// }" ]] && run_group "add_libs $libraries" "add libraries"
149
+ [ "${debug:?}" = "debug" ] && suffix_opts="$suffix_opts --enable-debug"
149
150
  patch_extension "$extension" >/dev/null 2>&1
150
151
  run_group "phpize" "phpize"
151
152
  run_group "sudo $prefix_opts ./configure $suffix_opts $opts" "configure"
@@ -3,15 +3,7 @@ get_sqlsrv_version() {
3
3
  if [[ "${version:?}" =~ 7.[0-3] ]]; then
4
4
  echo '5.9.0'
5
5
  else
6
- echo '5.10.0'
7
- fi
8
- }
9
-
10
- add_unixodbc() {
11
- if [ "$(uname -s)" = 'Linux' ]; then
12
- install_packages unixodbc-dev
13
- else
14
- brew install unixodbc
6
+ echo '5.10.1'
15
7
  fi
16
8
  }
17
9
 
@@ -19,6 +11,10 @@ add_unixodbc() {
19
11
  add_sqlsrv() {
20
12
  ext=$1
21
13
  ext_version=$(get_sqlsrv_version)
22
- add_unixodbc >/dev/null 2>&1
23
- add_pecl_extension "$ext" "$ext_version" extension
14
+ if [ "$(uname -s)" = 'Linux' ]; then
15
+ install_packages unixodbc-dev
16
+ add_pecl_extension "$ext" "$ext_version" extension
17
+ else
18
+ add_brew_extension "$ext" extension
19
+ fi
24
20
  }
@@ -75,9 +75,10 @@ check_package() {
75
75
  # Helper function to add an extension.
76
76
  add_extension_helper() {
77
77
  local extension=$1
78
- package=php"$version"-"$extension"
78
+ packages=(php"$version"-"$extension")
79
79
  add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
80
- (check_package "$package" && install_packages "$package") || pecl_install "$extension"
80
+ [ "${debug:?}" = "debug" ] && check_package php"$version"-"$extension"-dbgsym && packages+=(php"$version"-"$extension"-dbgsym)
81
+ (check_package "${packages[0]}" && install_packages "${packages[@]}") || pecl_install "$extension"
81
82
  add_extension_log "$extension" "Installed and enabled"
82
83
  sudo chmod 777 "${ini_file[@]}"
83
84
  }
@@ -88,14 +89,14 @@ add_devtools() {
88
89
  if ! command -v "$tool$version" >/dev/null; then
89
90
  install_packages "php$version-dev"
90
91
  fi
91
- add_extension xml extension >/dev/null 2>&1
92
92
  switch_version "phpize" "php-config"
93
+ add_extension xml extension >/dev/null 2>&1
93
94
  add_log "${tick:?}" "$tool" "Added $tool $semver"
94
95
  }
95
96
 
96
97
  # Function to setup the nightly build from shivammathur/php-builder
97
98
  setup_nightly() {
98
- run_script "php-builder" "${runner:?}" "$version"
99
+ run_script "php-builder" "${runner:?}" "$version" "${debug:?}" ${ts:?}
99
100
  }
100
101
 
101
102
  # Function to setup PHP 5.3, PHP 5.4 and PHP 5.5.
@@ -133,15 +134,22 @@ switch_version() {
133
134
  wait "${to_wait[@]}"
134
135
  }
135
136
 
137
+ # Function to get packages to install
138
+ get_php_packages() {
139
+ sed "s/[^ ]*/php$version-&/g" "$src"/configs/php_packages | tr '\n' ' '
140
+ if [ "${debug:?}" = "debug" ]; then
141
+ sed "s/[^ ]*/php$version-&-dbgsym/g" "$src"/configs/php_debug_packages | tr '\n' ' '
142
+ fi
143
+ }
144
+
136
145
  # Function to install packaged PHP
137
146
  add_packaged_php() {
138
147
  if [ "$runner" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then
139
148
  add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
140
- IFS=' ' read -r -a packages <<<"$(sed "s/[^ ]*/php$version-&/g" "$src"/configs/php_packages | tr '\n' ' ')"
149
+ IFS=' ' read -r -a packages <<<"$(get_php_packages)"
141
150
  install_packages "${packages[@]}"
142
- add_pecl
143
151
  else
144
- run_script "php-ubuntu" "$version"
152
+ run_script "php-ubuntu" "$version" "${debug:?}"
145
153
  fi
146
154
  }
147
155
 
@@ -159,13 +167,14 @@ update_php() {
159
167
 
160
168
  # Function to install PHP.
161
169
  add_php() {
162
- if [[ "$version" =~ ${nightly_versions:?} ]]; then
170
+ if [[ "$version" =~ ${nightly_versions:?} ]] || [[ "${ts:?}" = "zts" ]]; then
163
171
  setup_nightly
164
172
  elif [[ "$version" =~ ${old_versions:?} ]]; then
165
173
  setup_old_versions
166
174
  else
167
175
  add_packaged_php
168
176
  switch_version >/dev/null 2>&1
177
+ add_pecl
169
178
  fi
170
179
  status="Installed"
171
180
  }
@@ -258,7 +267,7 @@ setup_php() {
258
267
  }
259
268
 
260
269
  # Variables
261
- version=${1:-'8.1'}
270
+ version=${1:-'8.2'}
262
271
  ini=${2:-'production'}
263
272
  src=${0%/*}/..
264
273
  debconf_fix="DEBIAN_FRONTEND=noninteractive"
@@ -0,0 +1,83 @@
1
+ # Function to fetch a brew tap.
2
+ fetch_brew_tap() {
3
+ tap=$1
4
+ tap_user=$(dirname "$tap")
5
+ tap_name=$(basename "$tap")
6
+ mkdir -p "$tap_dir/$tap_user"
7
+ branch="$(git ls-remote --symref "https://github.com/$tap" HEAD | grep -Eo 'refs/heads/.*' | tr '\t' '\n' | head -1 | cut -d '/' -f 3)"
8
+ get -s -n "" "https://github.com/$tap/archive/$branch.tar.gz" | sudo tar -xzf - -C "$tap_dir/$tap_user"
9
+ sudo mv "$tap_dir/$tap_user/$tap_name-$branch" "$tap_dir/$tap_user/$tap_name"
10
+ }
11
+
12
+ # Function to add a brew tap.
13
+ add_brew_tap() {
14
+ tap=$1
15
+ if ! [ -d "$tap_dir/$tap" ]; then
16
+ if [ "${runner:?}" = "self-hosted" ]; then
17
+ brew tap "$tap" >/dev/null 2>&1
18
+ else
19
+ fetch_brew_tap "$tap" >/dev/null 2>&1
20
+ if ! [ -d "$tap_dir/$tap" ]; then
21
+ brew tap "$tap" >/dev/null 2>&1
22
+ fi
23
+ fi
24
+ fi
25
+ }
26
+
27
+ # Function to get brew prefix.
28
+ get_brew_prefix() {
29
+ if [ "$(uname -s)" = "Linux" ]; then
30
+ echo /home/linuxbrew/.linuxbrew
31
+ else
32
+ if [ "$(uname -m)" = "arm64" ]; then
33
+ echo /opt/homebrew
34
+ else
35
+ echo /usr/local
36
+ fi
37
+ fi
38
+ }
39
+
40
+ # Function to add brew's bin directories to the PATH.
41
+ add_brew_bins_to_path() {
42
+ local brew_prefix=${1:-$(get_brew_prefix)}
43
+ add_path "$brew_prefix"/bin
44
+ add_path "$brew_prefix"/sbin
45
+ }
46
+
47
+ # Function to add brew.
48
+ add_brew() {
49
+ brew_prefix="$(get_brew_prefix)"
50
+ if ! [ -d "$brew_prefix"/bin ]; then
51
+ step_log "Setup Brew"
52
+ get -s "" "/tmp/install.sh" "https://raw.githubusercontent.com/Homebrew/install/master/install.sh" | bash -s >/dev/null 2>&1
53
+ add_log "${tick:?}" "Brew" "Installed Homebrew"
54
+ fi
55
+ add_brew_bins_to_path "$brew_prefix"
56
+ }
57
+
58
+ # Function to configure brew constants.
59
+ configure_brew() {
60
+ brew_path="$(command -v brew)"
61
+ if [ -z "$brew_path" ]; then
62
+ add_brew
63
+ brew_path="$(command -v brew)"
64
+ fi
65
+ brew_path_dir="$(dirname "$brew_path")"
66
+ brew_prefix="$brew_path_dir"/..
67
+ brew_repo="$brew_path_dir/$(dirname "$(readlink "$brew_path")")"/..
68
+ tap_dir="$brew_repo"/Library/Taps
69
+ core_repo="$tap_dir"/homebrew/homebrew-core
70
+
71
+ export HOMEBREW_CHANGE_ARCH_TO_ARM=1
72
+ export HOMEBREW_DEVELOPER=1
73
+ export HOMEBREW_NO_AUTO_UPDATE=1
74
+ export HOMEBREW_NO_ENV_HINTS=1
75
+ export HOMEBREW_NO_INSTALL_CLEANUP=1
76
+ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
77
+ export brew_path
78
+ export brew_path_dir
79
+ export brew_prefix
80
+ export brew_repo
81
+ export tap_dir
82
+ export core_repo
83
+ }
@@ -22,6 +22,8 @@ get_grpc_tag() {
22
22
  }
23
23
 
24
24
  add_grpc_php_plugin_brew() {
25
+ . "${0%/*}"/tools/brew.sh
26
+ configure_brew
25
27
  brew install grpc
26
28
  brew link --force --overwrite grpc >/dev/null 2>&1
27
29
  grpc_tag="v$(brew info grpc | grep "grpc:" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")"
@@ -140,6 +140,20 @@ add_list() {
140
140
  return 0;
141
141
  }
142
142
 
143
+ # Function to check if a PPA exists
144
+ check_ppa() {
145
+ ppa=$1
146
+ ppa_url=${2:-"$lp_ppa/$ppa/ubuntu"}
147
+ package_dist=${3:-"$VERSION_CODENAME"}
148
+ branches=${4:-main}
149
+ ppa_search="deb .*$ppa_url $package_dist .*$branches"
150
+ if check_lists "$ppa" "$ppa_search"; then
151
+ return 0;
152
+ else
153
+ return 1;
154
+ fi
155
+ }
156
+
143
157
  # Function to remove a PPA.
144
158
  remove_list() {
145
159
  ppa=${1-ondrej/php}
@@ -153,8 +167,10 @@ add_ppa() {
153
167
  set_base_version
154
168
  ppa=${1:-ondrej/php}
155
169
  if [[ "$ID" = "ubuntu" || "$ID_LIKE" =~ ubuntu ]] && [[ "$ppa" =~ "ondrej/" ]]; then
170
+ [ "${debug:?}" = "debug" ] && add_list "$ppa" "$lp_ppa/$ppa/ubuntu" "$lp_ppa/$ppa/ubuntu" "$VERSION_CODENAME" "main/debug"
156
171
  add_list "$ppa"
157
172
  elif [[ "$ID" = "debian" || "$ID_LIKE" =~ debian ]] && [[ "$ppa" =~ "ondrej/" ]]; then
173
+ [ "${debug:?}" = "debug" ] && add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg "$VERSION_CODENAME" "main/debug"
158
174
  add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg
159
175
  else
160
176
  add_list "$ppa"
@@ -1,15 +1,17 @@
1
1
  Function Get-ProtobufTag() {
2
+ $releases = 'https://github.com/protocolbuffers/protobuf/releases'
2
3
  if("$protobuf_tag" -eq "latest") {
3
- $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1
4
+ $protobuf_tag = (Invoke-WebRequest -UseBasicParsing -Uri $releases/latest).BaseResponse.RequestMessage.RequestUri.Segments[-1]
4
5
  } else {
5
6
  try {
6
- [net.httpWebRequest] $request = [net.webRequest]::create("https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag")
7
- $req.Method = "HEAD"
7
+ $protobuf_tag = $protobuf_tag -replace '^v', ''
8
+ [net.httpWebRequest] $request = [net.webRequest]::create("$releases/tag/v$protobuf_tag")
9
+ $request.Method = "HEAD"
8
10
  [net.httpWebResponse] $response = $request.getResponse()
9
11
  $response.Close()
10
12
  $protobuf_tag = "v$protobuf_tag"
11
13
  } catch {
12
- $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1
14
+ $protobuf_tag = (Invoke-WebRequest -UseBasicParsing -Uri $releases/latest).BaseResponse.RequestMessage.RequestUri.Segments[-1]
13
15
  }
14
16
  }
15
17
  return $protobuf_tag
@@ -18,7 +20,7 @@ Function Get-ProtobufTag() {
18
20
  Function Add-Protoc() {
19
21
  param(
20
22
  [Parameter(Mandatory = $true, Position = 0, HelpMessage = 'The PHP version to be installed')]
21
- [ValidatePattern('^latest$|^(v?)\d+\.\d+\.\d+$')]
23
+ [ValidatePattern('^latest$|^(v?)\d+\.\d+(\.\d+)?$')]
22
24
  [string] $protobuf_tag
23
25
  )
24
26
  $protobuf_tag = Get-ProtobufTag
@@ -1,11 +1,30 @@
1
- add_symfony_helper() {
2
- if command -v brew >/dev/null; then
3
- add_brew_tap symfony-cli/homebrew-tap
4
- brew install symfony-cli/tap/symfony-cli
5
- else
1
+ add_symfony_with_brew() {
2
+ add_brew_tap symfony-cli/homebrew-tap
3
+ brew install symfony-cli/tap/symfony-cli
4
+ }
5
+
6
+ get_symfony_artifact_url() {
6
7
  arch=$(dpkg --print-architecture)
7
- get -s -n "" "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_$arch.tar.gz" | sudo tar -xz -C "${tool_path_dir:?}"
8
- sudo chmod a+x /usr/local/bin/symfony
8
+ url=$(get -s -n "" https://raw.githubusercontent.com/symfony-cli/homebrew-tap/main/Formula/symfony-cli.rb 2<&1 | grep -m 1 "url.*linux.*${arch}" | cut -d\" -f 2)
9
+ if [ -z "$url" ]; then
10
+ url=$(get -s -n "" https://api.github.com/repos/symfony-cli/symfony-cli/releases 2<&1 | grep -m 1 "url.*linux.*${arch}.*gz\"" | cut -d\" -f 4)
11
+ fi
12
+ echo "$url"
13
+ }
14
+
15
+ add_symfony_helper() {
16
+ if [ "$(uname -s)" = "Linux" ]; then
17
+ url="$(get_symfony_artifact_url)"
18
+ if [ -z "$url" ]; then
19
+ . "${0%/*}"/tools/brew.sh
20
+ configure_brew
21
+ add_symfony_with_brew
22
+ else
23
+ get -s -n "" "$url" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null
24
+ sudo chmod a+x /usr/local/bin/symfony
25
+ fi
26
+ elif [ "$(uname -s)" = "Darwin" ]; then
27
+ add_symfony_with_brew
9
28
  fi
10
29
  }
11
30
 
@@ -4,7 +4,7 @@ export cross="✗"
4
4
  export curl_opts=(-sL)
5
5
  export old_versions="5.[3-5]"
6
6
  export jit_versions="8.[0-9]"
7
- export nightly_versions="8.[2-9]"
7
+ export nightly_versions="8.[3-9]"
8
8
  export xdebug3_versions="7.[2-4]|8.[0-9]"
9
9
  export latest="releases/latest/download"
10
10
  export github="https://github.com/shivammathur"
@@ -43,13 +43,15 @@ set_output() {
43
43
  name=$1
44
44
  value=$2
45
45
  if [ "${GITHUB_ACTIONS}" = "true" ]; then
46
- echo "::set-output name=${name}::${value}"
46
+ echo "${name}=${value}" | tee -a "$GITHUB_OUTPUT" >/dev/null 2>&1
47
47
  fi
48
48
  }
49
49
 
50
50
  # Function to read env inputs.
51
51
  read_env() {
52
52
  update="${update:-${UPDATE:-false}}"
53
+ [ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release
54
+ [ "${phpts:-${PHPTS:-nts}}" = "ts" ] && ts=zts && update=true || ts=nts
53
55
  fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
54
56
  [[ -z "${ImageOS}" && -z "${ImageVersion}" ]] && _runner=self-hosted || _runner=github
55
57
  runner="${runner:-${RUNNER:-$_runner}}"
@@ -58,6 +60,16 @@ read_env() {
58
60
  fail_fast=true
59
61
  add_log "$cross" "Runner" "Runner set as github in self-hosted environment"
60
62
  fi
63
+
64
+ # Set Update to true if the ubuntu github image does not have PHP PPA.
65
+ if [[ "$runner" = "github" && "${ImageOS}" =~ ubuntu.* ]]; then
66
+ check_ppa ondrej/php || update=true
67
+ fi
68
+
69
+ export fail_fast
70
+ export runner
71
+ export update
72
+ export ts
61
73
  }
62
74
 
63
75
  # Function to download a file using cURL.
@@ -3,7 +3,7 @@ param (
3
3
  [ValidateNotNull()]
4
4
  [ValidateLength(1, [int]::MaxValue)]
5
5
  [string]
6
- $version = '8.1',
6
+ $version = '8.2',
7
7
  [Parameter(Position = 1, Mandatory = $true)]
8
8
  [ValidateNotNull()]
9
9
  [ValidateLength(1, [int]::MaxValue)]
@@ -43,7 +43,7 @@ Function Set-Output() {
43
43
  $value
44
44
  )
45
45
  if ($env:GITHUB_ACTIONS -eq 'true') {
46
- Write-Output "::set-output name=$output::$value"
46
+ Add-Content "$output=$value" -Path $env:GITHUB_OUTPUT -Encoding utf8
47
47
  }
48
48
  }
49
49
 
@@ -218,10 +218,22 @@ Function Add-PhpConfig {
218
218
  # Function to get PHP from GitHub releases cache
219
219
  Function Set-PhpCache {
220
220
  try {
221
- $release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version
222
- $asset = $release.assets | ForEach-Object {
223
- if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
224
- return $_.name
221
+ try {
222
+ $release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version
223
+ $asset = $release.assets | ForEach-Object {
224
+ if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
225
+ return $_.name
226
+ }
227
+ }
228
+ if($null -eq $asset) {
229
+ throw "Asset not found"
230
+ }
231
+ } catch {
232
+ $release = Invoke-WebRequest $php_builder/releases/expanded_assets/php$version
233
+ $asset = $release.links.href | ForEach-Object {
234
+ if($_ -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
235
+ return $_.split('/')[-1]
236
+ }
225
237
  }
226
238
  }
227
239
  Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
@@ -229,6 +241,20 @@ Function Set-PhpCache {
229
241
  } catch { }
230
242
  }
231
243
 
244
+ # Function to add debug symbols to PHP.
245
+ Function Add-DebugSymbols {
246
+ $release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version
247
+ $dev = if ($version -match $nightly_versions) { '-dev' } else { '' }
248
+ $asset = $release.assets | ForEach-Object {
249
+ if($_.name -match "php-debug-pack-$version.[0-9]+$dev$env:PHPTS-Win32-.*-$arch.zip") {
250
+ return $_.name
251
+ }
252
+ }
253
+ Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
254
+ Expand-Archive -Path $php_dir\$asset -DestinationPath $php_dir -Force
255
+ Get-ChildItem -Path $php_dir -Filter php_*.pdb | Move-Item -Destination $ext_dir
256
+ }
257
+
232
258
  # Function to install nightly version of PHP
233
259
  Function Install-PhpNightly {
234
260
  Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
@@ -351,6 +377,10 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
351
377
  Add-PhpConfig
352
378
  }
353
379
 
380
+ if($env:DEBUG -eq 'true') {
381
+ Add-DebugSymbols
382
+ }
383
+
354
384
  $installed = Get-Php -Path $php_dir
355
385
  if($installed.MajorMinorVersion -ne $version) {
356
386
  Add-Log $cross "PHP" "Could not setup PHP $version"
package/src/utils.ts CHANGED
@@ -246,7 +246,8 @@ export async function CSVArray(values_csv: string): Promise<Array<string>> {
246
246
  return value
247
247
  .trim()
248
248
  .replace(/^["']|["']$|(?<==)["']/g, '')
249
- .replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'");
249
+ .replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'")
250
+ .replace(/=(.*?)(=.*)/, "='$1$2'");
250
251
  })
251
252
  .filter(Boolean);
252
253
  }