Skip to content

Commit 036d9c7

Browse files
Merge branch 'hotfix/ad_issue'
2 parents fe4f4fe + 973132d commit 036d9c7

24 files changed

+1024
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ gitdo.sh
3838
version-commit.php
3939
tp_minor_release.txt
4040
/includes/config/tp.config*
41-
/includes/tables_integrity.json
41+
/includes/tables_integrity.json
42+
phpstan.neon

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193
"composer/composer": "^2.7"
194194
},
195195
"require-dev": {
196-
"dominikb/composer-license-checker": "^2.6"
196+
"dominikb/composer-license-checker": "^2.6",
197+
"phpstan/phpstan": "^2.1"
197198
}
198199
}

composer.lock

Lines changed: 59 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/config/include.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
define('TP_VERSION', '3.1.4');
3030
define("UPGRADE_MIN_DATE", "1732981987");
31-
define('TP_VERSION_MINOR', '3');
31+
define('TP_VERSION_MINOR', '4');
3232
define('TP_TOOL_NAME', 'Teampass');
3333
define('TP_ONE_DAY_SECONDS', 86400);
3434
define('TP_ONE_WEEK_SECONDS', 604800);

vendor/bin/phpstan

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Proxy PHP file generated by Composer
6+
*
7+
* This file includes the referenced bin path (../phpstan/phpstan/phpstan)
8+
* using a stream wrapper to prevent the shebang from being output on PHP<8
9+
*
10+
* @generated
11+
*/
12+
13+
namespace Composer;
14+
15+
$GLOBALS['_composer_bin_dir'] = __DIR__;
16+
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
17+
18+
if (PHP_VERSION_ID < 80000) {
19+
if (!class_exists('Composer\BinProxyWrapper')) {
20+
/**
21+
* @internal
22+
*/
23+
final class BinProxyWrapper
24+
{
25+
private $handle;
26+
private $position;
27+
private $realpath;
28+
29+
public function stream_open($path, $mode, $options, &$opened_path)
30+
{
31+
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
32+
$opened_path = substr($path, 17);
33+
$this->realpath = realpath($opened_path) ?: $opened_path;
34+
$opened_path = $this->realpath;
35+
$this->handle = fopen($this->realpath, $mode);
36+
$this->position = 0;
37+
38+
return (bool) $this->handle;
39+
}
40+
41+
public function stream_read($count)
42+
{
43+
$data = fread($this->handle, $count);
44+
45+
if ($this->position === 0) {
46+
$data = preg_replace('{^#!.*\r?\n}', '', $data);
47+
}
48+
49+
$this->position += strlen($data);
50+
51+
return $data;
52+
}
53+
54+
public function stream_cast($castAs)
55+
{
56+
return $this->handle;
57+
}
58+
59+
public function stream_close()
60+
{
61+
fclose($this->handle);
62+
}
63+
64+
public function stream_lock($operation)
65+
{
66+
return $operation ? flock($this->handle, $operation) : true;
67+
}
68+
69+
public function stream_seek($offset, $whence)
70+
{
71+
if (0 === fseek($this->handle, $offset, $whence)) {
72+
$this->position = ftell($this->handle);
73+
return true;
74+
}
75+
76+
return false;
77+
}
78+
79+
public function stream_tell()
80+
{
81+
return $this->position;
82+
}
83+
84+
public function stream_eof()
85+
{
86+
return feof($this->handle);
87+
}
88+
89+
public function stream_stat()
90+
{
91+
return array();
92+
}
93+
94+
public function stream_set_option($option, $arg1, $arg2)
95+
{
96+
return true;
97+
}
98+
99+
public function url_stat($path, $flags)
100+
{
101+
$path = substr($path, 17);
102+
if (file_exists($path)) {
103+
return stat($path);
104+
}
105+
106+
return false;
107+
}
108+
}
109+
}
110+
111+
if (
112+
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113+
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114+
) {
115+
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan');
116+
}
117+
}
118+
119+
return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan';

vendor/bin/phpstan.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@ECHO OFF
2+
setlocal DISABLEDELAYEDEXPANSION
3+
SET BIN_TARGET=%~dp0/phpstan
4+
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
5+
php "%BIN_TARGET%" %*

vendor/bin/phpstan.phar

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Proxy PHP file generated by Composer
6+
*
7+
* This file includes the referenced bin path (../phpstan/phpstan/phpstan.phar)
8+
* using a stream wrapper to prevent the shebang from being output on PHP<8
9+
*
10+
* @generated
11+
*/
12+
13+
namespace Composer;
14+
15+
$GLOBALS['_composer_bin_dir'] = __DIR__;
16+
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
17+
18+
if (PHP_VERSION_ID < 80000) {
19+
if (!class_exists('Composer\BinProxyWrapper')) {
20+
/**
21+
* @internal
22+
*/
23+
final class BinProxyWrapper
24+
{
25+
private $handle;
26+
private $position;
27+
private $realpath;
28+
29+
public function stream_open($path, $mode, $options, &$opened_path)
30+
{
31+
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
32+
$opened_path = substr($path, 17);
33+
$this->realpath = realpath($opened_path) ?: $opened_path;
34+
$opened_path = $this->realpath;
35+
$this->handle = fopen($this->realpath, $mode);
36+
$this->position = 0;
37+
38+
return (bool) $this->handle;
39+
}
40+
41+
public function stream_read($count)
42+
{
43+
$data = fread($this->handle, $count);
44+
45+
if ($this->position === 0) {
46+
$data = preg_replace('{^#!.*\r?\n}', '', $data);
47+
}
48+
49+
$this->position += strlen($data);
50+
51+
return $data;
52+
}
53+
54+
public function stream_cast($castAs)
55+
{
56+
return $this->handle;
57+
}
58+
59+
public function stream_close()
60+
{
61+
fclose($this->handle);
62+
}
63+
64+
public function stream_lock($operation)
65+
{
66+
return $operation ? flock($this->handle, $operation) : true;
67+
}
68+
69+
public function stream_seek($offset, $whence)
70+
{
71+
if (0 === fseek($this->handle, $offset, $whence)) {
72+
$this->position = ftell($this->handle);
73+
return true;
74+
}
75+
76+
return false;
77+
}
78+
79+
public function stream_tell()
80+
{
81+
return $this->position;
82+
}
83+
84+
public function stream_eof()
85+
{
86+
return feof($this->handle);
87+
}
88+
89+
public function stream_stat()
90+
{
91+
return array();
92+
}
93+
94+
public function stream_set_option($option, $arg1, $arg2)
95+
{
96+
return true;
97+
}
98+
99+
public function url_stat($path, $flags)
100+
{
101+
$path = substr($path, 17);
102+
if (file_exists($path)) {
103+
return stat($path);
104+
}
105+
106+
return false;
107+
}
108+
}
109+
}
110+
111+
if (
112+
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113+
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114+
) {
115+
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar');
116+
}
117+
}
118+
119+
return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar';

vendor/bin/phpstan.phar.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@ECHO OFF
2+
setlocal DISABLEDELAYEDEXPANSION
3+
SET BIN_TARGET=%~dp0/phpstan.phar
4+
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
5+
php "%BIN_TARGET%" %*

vendor/composer/autoload_files.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
'a2317519146f89bafaee186bdfa8e099' => $vendorDir . '/dominikb/composer-license-checker/src/helpers.php',
2929
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
3030
'3919eeb97e98d4648304477f8ef734ba' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Random.php',
31+
'9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
3132
'2324d0e5cadd603331d27de142371f0b' => $vendorDir . '/symfony/contracts/Deprecation/function.php',
3233
);

vendor/composer/autoload_psr4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
7171
'Illuminate\\Validation\\' => array($vendorDir . '/illuminate/validation'),
7272
'Illuminate\\Translation\\' => array($vendorDir . '/illuminate/translation'),
73-
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'),
73+
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/support'),
7474
'Illuminate\\Filesystem\\' => array($vendorDir . '/illuminate/filesystem'),
7575
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
7676
'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'),

0 commit comments

Comments
 (0)