Skip to content

Commit

Permalink
Synced the branch with latest master changes of the official v1.1.2 r…
Browse files Browse the repository at this point in the history
…elease.
  • Loading branch information
TonyKaravasilev committed Feb 12, 2024
2 parents c539e54 + a75c88b commit d1812a9
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 38 deletions.
10 changes: 5 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
* text working-tree-encoding=UTF-8
*.jpg -text
*.png -text
*.ttf -text
*.woff -text
* text working-tree-encoding=UTF-8 eol=lf
*.jpg binary
*.png binary
*.ttf binary
*.woff binary
/.github export-ignore
/.gitignore export-ignore
/.gitattributes export-ignore
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cryptomanana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-20.04 ]
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
runs-on: ${{ matrix.operating-system }}
name: PHP ${{ matrix.php }} Testing (${{ matrix.operating-system }})
steps:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
run: composer install --no-progress --no-interaction --prefer-dist ; cp phpunit.xml.dist phpunit.xml

- name: Test Suite Configuration
run: if [[ "${{ matrix.php }}" =~ ^(7.3|7.4|8.0|8.1|8.2)$ ]] ; then vendor/bin/phpunit --migrate-configuration; fi
run: if [[ "${{ matrix.php }}" =~ ^(7.3|7.4|8.0|8.1|8.2|8.3)$ ]] ; then vendor/bin/phpunit --migrate-configuration; fi

- name: Running Tests
run: vendor/bin/phpunit --no-coverage
Expand All @@ -64,7 +64,7 @@ jobs:
strategy:
matrix:
operating-system: [ windows-2022 ]
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
runs-on: ${{ matrix.operating-system }}
name: PHP ${{ matrix.php }} Testing (${{ matrix.operating-system }})
steps:
Expand Down Expand Up @@ -95,8 +95,8 @@ jobs:
mac_compatability_tests:
strategy:
matrix:
operating-system: [ macos-12 ]
php: [ '5.6', '7.4', '8.2' ]
operating-system: [ macos-13 ]
php: [ '8.2', '8.3' ]
runs-on: ${{ matrix.operating-system }}
name: PHP ${{ matrix.php }} Testing (${{ matrix.operating-system }})
steps:
Expand All @@ -118,7 +118,7 @@ jobs:
run: composer install --no-progress --no-interaction --prefer-dist ; cp phpunit.xml.dist phpunit.xml

- name: Test Suite Configuration
run: if [[ "${{ matrix.php }}" =~ ^(7.3|7.4|8.0|8.1|8.2)$ ]] ; then vendor/bin/phpunit --migrate-configuration; fi
run: vendor/bin/phpunit --migrate-configuration

- name: Running Tests
run: vendor/bin/phpunit --no-coverage
33 changes: 23 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ language: php

os: linux

dist: trusty
dist: xenial

env:
- USE_OPCACHE=1

php:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
Expand All @@ -20,7 +19,8 @@ php:
jobs:
fast_finish: true
allow_failures:
- php: master
- php: 5.5
- php: 8.3.0
include:
- php: 7.4
dist: focal
Expand All @@ -34,14 +34,28 @@ jobs:
dist: focal
env:
- USE_OPCACHE=1
- php: master
- php: 8.2
dist: jammy
addons:
apt:
update: true
packages:
- libonig-dev
env:
- USE_OPCACHE=1
- php: 8.3.0
dist: bionic
addons:
apt:
update: true
packages:
- libonig-dev
env:
- USE_OPCACHE=1
- php: 5.5
dist: trusty
env:
- USE_OPCACHE=1
# - php: 8.2 <---- months and no valid build is available (installation failure)
# dist: focal
# env:
# - USE_OPCACHE=1

cache:
timeout: 3600
Expand Down Expand Up @@ -69,9 +83,8 @@ before_script:
- echo 'sys_temp_dir=/tmp' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'upload_tmp_dir=/tmp' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- travis_retry composer validate
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-dist
- if [[ "$TRAVIS_PHP_VERSION" =~ ^(7.3|7.4|8.0|8.1|8.2|master)$ ]]; then
- if [[ "$TRAVIS_PHP_VERSION" =~ ^(7.3|7.4|8.0|8.1|8.2|8.3.0|master)$ ]]; then
echo 'xdebug.mode=coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini;
cp phpunit.xml.dist phpunit.xml;
vendor/bin/phpunit --migrate-configuration;
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
CHANGELOG
=========

v1.1.2, 2024-01-12
------------------

- Fixed compatibility issues with PHP 8.3 features;
- Fixed compatibility issues with OpenSSL features;
- Fixed compatibility issues with PHPUnit features;
- Enabled the running of unit tests with PHPUnit 10.x under PHP 8.3;
- Updated the configuration of Scrutinizer CI and migrated analysis;
- Updated the configuration of Travis CI and migrated the platform;
- Updated the GitHub actions CI/CD workflow configuration and migrated the platforms;
- Generated an online DOI number via Zenodo and CERN integration;
- Purged the image caches for the GitHub repository;
- Release is signed with a GitHub GPG signature.

v1.1.1, 2023-04-08
------------------

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CryptoMañana Framework

[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/tonykaravasilev/cryptomanana.svg?color=blue&label=stable&style=square)](https://packagist.org/packages/karavasilev/cryptomanana)
[![PHP from Packagist](https://img.shields.io/badge/php-5.5%20--%208.2-blue?style=square)](https://packagist.org/packages/karavasilev/cryptomanana)
[![PHP from Packagist](https://img.shields.io/badge/php-%3C%3D%208.2-blue.svg?style=square)](https://packagist.org/packages/karavasilev/cryptomanana)
[![PHP from Packagist](https://img.shields.io/badge/php-5.5%20--%208.3-blue?style=square)](https://packagist.org/packages/karavasilev/cryptomanana)
[![PHP from Packagist](https://img.shields.io/badge/php-%3C%3D%208.3-blue.svg?style=square)](https://packagist.org/packages/karavasilev/cryptomanana)
[![GitHub](https://img.shields.io/github/license/tonykaravasilev/cryptomanana.svg?color=blue&label=license&style=square)](https://github.com/TonyKaravasilev/CryptoManana/blob/master/LICENSE)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2604693.svg)](https://doi.org/10.5281/zenodo.2604693) <br>
[![Build Status](https://app.travis-ci.com/TonyKaravasilev/CryptoManana.svg?branch=master)](https://app.travis-ci.com/github/TonyKaravasilev/CryptoManana)
Expand Down Expand Up @@ -40,7 +40,7 @@ php vendor/karavasilev/cryptomanana/check.php

## Project Requirements

- `PHP Version`: 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1 or 8.2;
- `PHP Version`: 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 or 8.3;
- The `spl` extension (bundles with PHP >= 5.0.0, added to core since PHP >= 5.3.0);
- The `hash` extension (bundled with PHP >= 5.1.2, added to core since PHP >= 7.4.0);
- The `openssl` extension (added by default for PHP >= 5.0.0, needs the OpenSSL Library);
Expand Down
4 changes: 2 additions & 2 deletions check.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ function dump_an_error()
dump('Starting compatibility check process ...', 'black');
dump_a_delimiter();

// PHP Version Check (5.5-8.2)
if (PHP_VERSION_ID >= 50500 && PHP_VERSION_ID < 80300) {
// PHP Version Check (5.5-8.3)
if (PHP_VERSION_ID >= 50500 && PHP_VERSION_ID < 80400) {
$versionMessage = IS_X64 ? ' (x64)' : ' (x86)';
$versionMessage = 'You are using a SUPPORTED PHP version: ' . NEW_LINE . NEW_LINE . PHP_VERSION . $versionMessage;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
}
],
"require": {
"php": "^5.5 || ^7.0 || 8.0.* || 8.1.* || 8.2.*",
"php": "^5.5 || ^7.0 || 8.0.* || 8.1.* || 8.2.* || 8.3.*",
"ext-spl": "*",
"ext-hash": "*",
"ext-openssl": "*"
Expand Down
1 change: 0 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<ini name="report_memleaks" value="1"/>
<ini name="display_errors" value="1"/>
<ini name="display_startup_errors" value="1"/>
<ini name="max_execution_time" value="-1"/>
<ini name="memory_limit" value="-1"/>

<!-- Include directory paths for scanning: -->
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<ini name="report_memleaks" value="1"/>
<ini name="display_errors" value="1"/>
<ini name="display_startup_errors" value="1"/>
<ini name="max_execution_time" value="-1"/>
<ini name="memory_limit" value="-1"/>
</php>

Expand Down
2 changes: 1 addition & 1 deletion src/CryptoManana/Randomness/PseudoRandom.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static function setSeed($seed = null)
/**
* {@internal Backward compatibility algorithm for seed must be used. }}
*/
(PHP_VERSION_ID < 70100) ? mt_srand($seed) : mt_srand($seed, MT_RAND_PHP);
(PHP_VERSION_ID < 70100) ? mt_srand($seed) : ((PHP_VERSION_ID < 80300) ? mt_srand($seed, 1) : mt_srand($seed));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ protected function sha3UsesMbString($use = null)
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);

$reflectionMbString = new \ReflectionProperty(
NativeHkdfSha3::class,
'mbString'
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ protected function sha3UsesMbString($use = null)
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);

$reflectionMbString = new \ReflectionProperty(
NativeSha3::class,
'mbString'
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ protected function sha3UsesMbString($use = null)
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);

$reflectionMbString = new \ReflectionProperty(
NativePbkdf2Sha3::class,
'mbString'
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function sha3UsesMbString($use = null)
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);
}

/**
Expand All @@ -93,7 +93,7 @@ protected function sha3UsesX64Algorithm($use = null)
);

$reflectionMbString->setAccessible(true);
$reflectionMbString->setValue($use);
$reflectionMbString->setValue(null, $use);
}

/**
Expand Down

0 comments on commit d1812a9

Please sign in to comment.