Skip to content

Commit

Permalink
Boyscouting
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed May 8, 2024
1 parent 098c94c commit 3e8a04b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on: [push, pull_request]
jobs:
build:
name: PHPUnit
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
max-parallel: 10
matrix:
php: ['7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- name: Set up PHP
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Psalm
uses: docker://vimeo/psalm-github-actions
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
[![Downloads](https://img.shields.io/packagist/dt/paragonie/hidden-string.svg)](https://packagist.org/packages/paragonie/hidden-string)

This package extracts the HiddenString class originally used in [Halite](https://github.com/paragonie/halite).
**Requires PHP 7.**
**Requires PHP 7 or newer.**
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"require": {
"php": "^7.4|^8",
"paragonie/constant_time_encoding": "^2"
"paragonie/constant_time_encoding": "^2|^3"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<psalm
totallyTyped="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config file:///mnt/share/hiddenstring/vendor/vimeo/psalm/config.xsd"
Expand Down
7 changes: 5 additions & 2 deletions src/HiddenString.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ final class HiddenString
* @throws TypeError
*/
public function __construct(

Check failure on line 52 in src/HiddenString.php

View workflow job for this annotation

GitHub Actions / Psalm

PossiblyUnusedMethod

src/HiddenString.php:52:21: PossiblyUnusedMethod: Cannot find any calls to method ParagonIE\HiddenString\HiddenString::__construct (see https://psalm.dev/087)
#[\SensitiveParameter]

Check failure on line 53 in src/HiddenString.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidAttribute

src/HiddenString.php:53:11: InvalidAttribute: The class SensitiveParameter doesn't have the Attribute attribute (see https://psalm.dev/242)
string $value,
bool $disallowInline = true,
bool $disallowSerialization = true
Expand Down Expand Up @@ -181,8 +182,10 @@ public function __sleep(): array
*
* @throws TypeError
*/
public static function safeStrcpy(string $string): string
{
public static function safeStrcpy(
#[\SensitiveParameter]

Check failure on line 186 in src/HiddenString.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidAttribute

src/HiddenString.php:186:11: InvalidAttribute: The class SensitiveParameter doesn't have the Attribute attribute (see https://psalm.dev/242)
string $string
): string {
$length = Binary::safeStrlen($string);
$return = '';
$chunk = $length >> 1;
Expand Down

0 comments on commit 3e8a04b

Please sign in to comment.