Skip to content

Commit

Permalink
Update packages (#300)
Browse files Browse the repository at this point in the history
 - nette/forms updated from v3.2.1 to v3.2.2 patch
   See changes: nette/forms@v3.2.1...v3.2.2
   Release notes: https://github.com/nette/forms/releases/tag/v3.2.2

 - phpstan/phpdoc-parser updated from 1.27.0 to 1.28.0 minor
   See changes: phpstan/phpdoc-parser@1.27.0...1.28.0
   Release notes: https://github.com/phpstan/phpdoc-parser/releases/tag/1.28.0

 - roave/security-advisories updated from dev-latest@6900b81 to dev-latest@31f3738
   See changes: Roave/SecurityAdvisories@6900b81...31f3738

 - spaze/phpcs-phar updated from 3.9.0 to 3.9.1 patch
   See changes: spaze/phpcs-phar@3.9.0...3.9.1
   Release notes: https://github.com/spaze/phpcs-phar/releases/tag/3.9.1

 - spaze/phpinfo updated from v1.1.1 to v1.2.0 minor
   See changes: spaze/phpinfo@v1.1.1...v1.2.0
   Release notes: https://github.com/spaze/phpinfo/releases/tag/v1.2.0

 - symfony/cache updated from v7.0.4 to v7.0.6 patch
   See changes: symfony/cache@v7.0.4...v7.0.6
   Release notes: https://github.com/symfony/cache/releases/tag/v7.0.6

 - symfony/cache-contracts updated from v3.4.0 to v3.4.2 patch
   See changes: symfony/cache-contracts@v3.4.0...v3.4.2
   Release notes: https://github.com/symfony/cache-contracts/releases/tag/v3.4.2

 - symfony/config updated from v7.0.4 to v7.0.6 patch
   See changes: symfony/config@v7.0.4...v7.0.6
   Release notes: https://github.com/symfony/config/releases/tag/v7.0.6

 - symfony/filesystem updated from v7.0.3 to v7.0.6 patch
   See changes: symfony/filesystem@v7.0.3...v7.0.6
   Release notes: https://github.com/symfony/filesystem/releases/tag/v7.0.6

 - symfony/service-contracts updated from v3.4.1 to v3.4.2 patch
   See changes: symfony/service-contracts@v3.4.1...v3.4.2
   Release notes: https://github.com/symfony/service-contracts/releases/tag/v3.4.2

 - symfony/translation-contracts updated from v3.4.1 to v3.4.2 patch
   See changes: symfony/translation-contracts@v3.4.1...v3.4.2
   Release notes: https://github.com/symfony/translation-contracts/releases/tag/v3.4.2

 - symfony/var-exporter updated from v7.0.4 to v7.0.6 patch
   See changes: symfony/var-exporter@v7.0.4...v7.0.6
   Release notes: https://github.com/symfony/var-exporter/releases/tag/v7.0.6

 - tracy/tracy updated from v2.10.5 to v2.10.6 patch
   See changes: nette/tracy@v2.10.5...v2.10.6
   Release notes: https://github.com/nette/tracy/releases/tag/v2.10.6
  • Loading branch information
spaze authored Apr 10, 2024
2 parents 5cbf50e + 1a1d853 commit 8a3becd
Show file tree
Hide file tree
Showing 42 changed files with 546 additions and 391 deletions.
2 changes: 1 addition & 1 deletion site/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"spaze/feed-exports": "^1.0",
"spaze/mysql-session-handler": "^3.0",
"spaze/nonce-generator": "^4.0",
"spaze/phpinfo": "^1.1",
"spaze/phpinfo": "^1.2",
"spaze/sri-macros": "^2.0",
"spaze/svg-icons-latte": "^1.0",
"symfony/cache": "^7.0",
Expand Down
181 changes: 93 additions & 88 deletions site/composer.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion site/phpstan-vendor.neon
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ parameters:
-
message: '#^Cannot access constant#'
paths:
- vendor/nette/forms/src/Forms/Controls/DateTimeControl.php # https://github.com/nette/forms/pull/325
- vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php
- vendor/symfony/cache/DependencyInjection/CachePoolPass.php
- vendor/symfony/cache/Traits/AbstractAdapterTrait.php
Expand Down
203 changes: 104 additions & 99 deletions site/vendor/composer/installed.json

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions site/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@
),
),
'nette/forms' => array(
'pretty_version' => 'v3.2.1',
'version' => '3.2.1.0',
'reference' => '88c1ffb717cedd40f7c7bcaf04e40ed02264ee98',
'pretty_version' => 'v3.2.2',
'version' => '3.2.2.0',
'reference' => 'a20fdb1f81f5b406cdc99a450e0a327d5790f9b5',
'type' => 'library',
'install_path' => __DIR__ . '/../nette/forms',
'aliases' => array(),
Expand Down Expand Up @@ -328,13 +328,13 @@
'phpcsstandards/php_codesniffer' => array(
'dev_requirement' => true,
'replaced' => array(
0 => '3.9.0',
0 => '3.9.1',
),
),
'phpstan/phpdoc-parser' => array(
'pretty_version' => '1.27.0',
'version' => '1.27.0.0',
'reference' => '86e4d5a4b036f8f0be1464522f4c6b584c452757',
'pretty_version' => '1.28.0',
'version' => '1.28.0.0',
'reference' => 'cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
'aliases' => array(),
Expand Down Expand Up @@ -418,7 +418,7 @@
'roave/security-advisories' => array(
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
'reference' => '6900b812a02fbea68608e13e112d1e0a9b02a370',
'reference' => '31f373849a62ccfe23cba594e91b488e3ec2270b',
'type' => 'metapackage',
'install_path' => null,
'aliases' => array(
Expand Down Expand Up @@ -508,18 +508,18 @@
'dev_requirement' => false,
),
'spaze/phpcs-phar' => array(
'pretty_version' => '3.9.0',
'version' => '3.9.0.0',
'reference' => '07c678e294c2cf5843da1d94f88669274f3a3f0f',
'pretty_version' => '3.9.1',
'version' => '3.9.1.0',
'reference' => 'd48336bed24d06c1e3bc2212e4e8964a8b56e2f4',
'type' => 'library',
'install_path' => __DIR__ . '/../spaze/phpcs-phar',
'aliases' => array(),
'dev_requirement' => true,
),
'spaze/phpinfo' => array(
'pretty_version' => 'v1.1.1',
'version' => '1.1.1.0',
'reference' => 'a8db03663903c942f46ad6b395e31c7752620455',
'pretty_version' => 'v1.2.0',
'version' => '1.2.0.0',
'reference' => 'be627cc50c001cc6ddc0945f5518a0303df84681',
'type' => 'library',
'install_path' => __DIR__ . '/../spaze/phpinfo',
'aliases' => array(),
Expand Down Expand Up @@ -564,22 +564,22 @@
'squizlabs/php_codesniffer' => array(
'dev_requirement' => true,
'replaced' => array(
0 => '3.9.0',
0 => '3.9.1',
),
),
'symfony/cache' => array(
'pretty_version' => 'v7.0.4',
'version' => '7.0.4.0',
'reference' => 'fc822951dd360a593224bb2cef90a087d0dff60f',
'pretty_version' => 'v7.0.6',
'version' => '7.0.6.0',
'reference' => '2d0d3f92c74c445410d05374908b03e0a1131e2b',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/cache-contracts' => array(
'pretty_version' => 'v3.4.0',
'version' => '3.4.0.0',
'reference' => '1d74b127da04ffa87aa940abe15446fa89653778',
'pretty_version' => 'v3.4.2',
'version' => '3.4.2.0',
'reference' => '2c9db6509a1b21dad229606897639d3284f54b2a',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache-contracts',
'aliases' => array(),
Expand All @@ -592,9 +592,9 @@
),
),
'symfony/config' => array(
'pretty_version' => 'v7.0.4',
'version' => '7.0.4.0',
'reference' => '44deeba7233f08f383185ffa37dace3b3bc87364',
'pretty_version' => 'v7.0.6',
'version' => '7.0.6.0',
'reference' => '7fc7e18a73ec8125fd95928c0340470d64760deb',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/config',
'aliases' => array(),
Expand All @@ -610,9 +610,9 @@
'dev_requirement' => false,
),
'symfony/filesystem' => array(
'pretty_version' => 'v7.0.3',
'version' => '7.0.3.0',
'reference' => '2890e3a825bc0c0558526c04499c13f83e1b6b12',
'pretty_version' => 'v7.0.6',
'version' => '7.0.6.0',
'reference' => '408105dff4c104454100730bdfd1a9cdd993f04d',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(),
Expand Down Expand Up @@ -649,9 +649,9 @@
),
),
'symfony/service-contracts' => array(
'pretty_version' => 'v3.4.1',
'version' => '3.4.1.0',
'reference' => 'fe07cbc8d837f60caf7018068e350cc5163681a0',
'pretty_version' => 'v3.4.2',
'version' => '3.4.2.0',
'reference' => '11bbf19a0fb7b36345861e85c5768844c552906e',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/service-contracts',
'aliases' => array(),
Expand All @@ -667,9 +667,9 @@
'dev_requirement' => false,
),
'symfony/translation-contracts' => array(
'pretty_version' => 'v3.4.1',
'version' => '3.4.1.0',
'reference' => '06450585bf65e978026bda220cdebca3f867fde7',
'pretty_version' => 'v3.4.2',
'version' => '3.4.2.0',
'reference' => '43810bdb2ddb5400e5c5e778e27b210a0ca83b6b',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation-contracts',
'aliases' => array(),
Expand All @@ -682,9 +682,9 @@
),
),
'symfony/var-exporter' => array(
'pretty_version' => 'v7.0.4',
'version' => '7.0.4.0',
'reference' => 'dfb0acb6803eb714f05d97dd4c5abe6d5fa9fe41',
'pretty_version' => 'v7.0.6',
'version' => '7.0.6.0',
'reference' => 'c74c568d2a15a1d407cf40d61ea82bc2d521e27b',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(),
Expand All @@ -700,9 +700,9 @@
'dev_requirement' => false,
),
'tracy/tracy' => array(
'pretty_version' => 'v2.10.5',
'version' => '2.10.5.0',
'reference' => '86bdba4aa0f707d3f125933931d3df6e5c7aad79',
'pretty_version' => 'v2.10.6',
'version' => '2.10.6.0',
'reference' => '64435e3d5d5e3172e48c026b6b57349d49cbfd49',
'type' => 'library',
'install_path' => __DIR__ . '/../tracy/tracy',
'aliases' => array(),
Expand Down
1 change: 0 additions & 1 deletion site/vendor/nette/forms/src/Forms/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static function dataClass(Form $form, bool $exit = true): void
$blueprint->printHeader('Form Data Class ' . $form->getName());
$blueprint->printCode($blueprint->generateDataClass($form), 'php');
$blueprint->printCode($blueprint->generateDataClass($form, true), 'php');
$bp->printEnd();
$blueprint->printEnd();
if ($exit) {
exit;
Expand Down
2 changes: 1 addition & 1 deletion site/vendor/nette/forms/src/Forms/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function isValid(): bool

/**
* Performs the server side validation.
* @param Control[]|null $controls
* @param (Control|self)[]|null $controls
*/
public function validate(?array $controls = null): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ class DateTimeControl extends BaseControl
private string $format = self::FormatObject;


public function __construct(string|Stringable|null $label = null, int $type = self::Date, bool $withSeconds = false)
{
public function __construct(
string|Stringable|null $label = null,
int $type = self::TypeDate,
bool $withSeconds = false,
) {
$this->type = $type;
$this->withSeconds = $withSeconds;
parent::__construct($label);
Expand Down
29 changes: 20 additions & 9 deletions site/vendor/nette/forms/src/Forms/Controls/SelectBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function setPrompt(string|Stringable|false $prompt): static


/**
* Returns first prompt item?
* Returns first prompt item.
*/
public function getPrompt(): string|Stringable|false
{
Expand Down Expand Up @@ -90,18 +90,29 @@ public function setItems(array $items, bool $useKeys = true)

public function getControl(): Nette\Utils\Html
{
$items = $this->prompt === false ? [] : ['' => $this->translate($this->prompt)];
$items = [];
foreach ($this->options as $key => $value) {
$items[is_array($value) ? $this->translate($key) : $key] = $this->translate($value);
}

return Nette\Forms\Helpers::createSelectBox(
$items,
[
'disabled:' => is_array($this->disabled) ? $this->disabled : null,
] + $this->optionAttributes,
$this->value,
)->addAttributes(parent::getControl()->attrs);
$attrs = $this->optionAttributes;
$attrs['disabled:'] = is_array($this->disabled) ? $this->disabled : [];

$selected = $this->value;
if ($this->prompt !== false) {
$promptKey = '';
while (isset($items[$promptKey])) {
$promptKey .= "\x1";
}
$items = [$promptKey => $this->translate($this->prompt)] + $items;
if ($this->isRequired()) {
$attrs['hidden:'][$promptKey] = $attrs['disabled:'][$promptKey] = true;
$selected ??= $promptKey; // disabled & selected for Safari, hidden for other browsers
}
}

return Nette\Forms\Helpers::createSelectBox($items, $attrs, $selected)
->addAttributes(parent::getControl()->attrs);
}


Expand Down
2 changes: 1 addition & 1 deletion site/vendor/nette/forms/src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class Form extends Container implements Nette\HtmlStringable
/** @var bool */
protected $crossOrigin = false;
private static ?Nette\Http\IRequest $defaultHttpRequest = null;
private SubmitterControl|bool $submittedBy;
private SubmitterControl|bool $submittedBy = false;
private array $httpData;
private Html $element;
private FormRenderer $renderer;
Expand Down
18 changes: 17 additions & 1 deletion site/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public function parseTagValue(TokenIterator $tokens, string $tag): Ast\PhpDoc\Ph
case '@param':
case '@phpstan-param':
case '@psalm-param':
case '@phan-param':
$tagValue = $this->parseParamTagValue($tokens);
break;

Expand All @@ -405,12 +406,15 @@ public function parseTagValue(TokenIterator $tokens, string $tag): Ast\PhpDoc\Ph
case '@var':
case '@phpstan-var':
case '@psalm-var':
case '@phan-var':
$tagValue = $this->parseVarTagValue($tokens);
break;

case '@return':
case '@phpstan-return':
case '@psalm-return':
case '@phan-return':
case '@phan-real-return':
$tagValue = $this->parseReturnTagValue($tokens);
break;

Expand All @@ -420,6 +424,7 @@ public function parseTagValue(TokenIterator $tokens, string $tag): Ast\PhpDoc\Ph
break;

case '@mixin':
case '@phan-mixin':
$tagValue = $this->parseMixinTagValue($tokens);
break;

Expand All @@ -446,18 +451,23 @@ public function parseTagValue(TokenIterator $tokens, string $tag): Ast\PhpDoc\Ph
case '@psalm-property':
case '@psalm-property-read':
case '@psalm-property-write':
case '@phan-property':
case '@phan-property-read':
case '@phan-property-write':
$tagValue = $this->parsePropertyTagValue($tokens);
break;

case '@method':
case '@phpstan-method':
case '@psalm-method':
case '@phan-method':
$tagValue = $this->parseMethodTagValue($tokens);
break;

case '@template':
case '@phpstan-template':
case '@psalm-template':
case '@phan-template':
case '@template-covariant':
case '@phpstan-template-covariant':
case '@psalm-template-covariant':
Expand All @@ -474,6 +484,8 @@ function ($tokens) {

case '@extends':
case '@phpstan-extends':
case '@phan-extends':
case '@phan-inherits':
case '@template-extends':
$tagValue = $this->parseExtendsTagValue('@extends', $tokens);
break;
Expand All @@ -492,6 +504,7 @@ function ($tokens) {

case '@phpstan-type':
case '@psalm-type':
case '@phan-type':
$tagValue = $this->parseTypeAliasTagValue($tokens);
break;

Expand All @@ -506,6 +519,9 @@ function ($tokens) {
case '@psalm-assert':
case '@psalm-assert-if-true':
case '@psalm-assert-if-false':
case '@phan-assert':
case '@phan-assert-if-true':
case '@phan-assert-if-false':
$tagValue = $this->parseAssertTagValue($tokens);
break;

Expand Down Expand Up @@ -1091,7 +1107,7 @@ private function parseTypeAliasTagValue(TokenIterator $tokens): Ast\PhpDoc\TypeA
$alias = $tokens->currentTokenValue();
$tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);

// support psalm-type syntax
// support phan-type/psalm-type syntax
$tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL);

if ($this->preserveTypeAliasesWithInvalidTypes) {
Expand Down
4 changes: 2 additions & 2 deletions site/vendor/spaze/phpcs-phar/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
],
"replace": {
"dealerdirect/phpcodesniffer-composer-installer": "*",
"phpcsstandards/php_codesniffer": "3.9.0",
"squizlabs/php_codesniffer": "3.9.0"
"phpcsstandards/php_codesniffer": "3.9.1",
"squizlabs/php_codesniffer": "3.9.1"
},
"bin": [
"phpcbf",
Expand Down
Binary file modified site/vendor/spaze/phpcs-phar/phpcs.phar
Binary file not shown.
Binary file modified site/vendor/spaze/phpcs-phar/phpcs.phar.asc
Binary file not shown.
15 changes: 15 additions & 0 deletions site/vendor/spaze/phpinfo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ If found, the string in `$sanitize` will be replaced with the string `$with`, if

Some of the values in `phpinfo()` output are printed URL-encoded, so the `$sanitize` value will also be searched URL-encoded automatically.
This means that both `foo,bar` and `foo%2Cbar` would be replaced.

## Sanitizing arbitrary strings
If you have your `phpinfo()` output (or anything really) in a string, you can use the sanitizer standalone, for example:
```php
$sanitizer = new SensitiveValueSanitizer();
$string = $sanitizer->addSanitization('🍍', '🍌')->sanitize('🍍🍕');
```

The sanitizer will sanitize session id automatically, you can (but shouldn't) disable it with `doNotSanitizeSessionId()`.

You can then pass the configured sanitizer to `PhpInfo` class which will then use your configuration for sanitizing the `phpinfo()` output too:
```php
$phpInfo = new PhpInfo($sanitizer);
$html = $phpInfo->getHtml();
```
Loading

0 comments on commit 8a3becd

Please sign in to comment.