Fixed errors...

main
Robert 3 weeks ago
parent 38d2a0582b
commit 578dce4034
  1. 6
      src/Framework/DI.php
  2. 4
      src/Framework/Services/Encryption.php
  3. 3
      src/Framework/Services/Sessions/CookieSessionHandler.php
  4. 2
      src/Framework/Services/Sessions/FileSessionHandler.php
  5. 2
      src/Framework/Services/Sessions/RedisSessionHandler.php

@ -57,13 +57,13 @@ final class DI
$serviceName = $entry;
}
return $this->resolve(c); // Try to Auto-Wire
return $this->resolve($serviceName); // Try to Auto-Wire
}
public function get_auto(string $serviceName)
{
if ($this->has($serviceName) ) {
return $this->services[$serviceName]($this);
return $this->services[$serviceName]($this);
}
return $this->resolve($serviceName); // Try to Auto-Wire
}
@ -117,7 +117,7 @@ final class DI
$name = $param->getName();
$type = $param->getType();
if (! $type) {
throw new \Exception("Failed to resolve class: {$serviceName} becasue param {$name} is missing a type hint.");
throw new \Exception("Failed to resolve class: {$serviceName} because param {$name} is missing a type hint.");
}
if ($type instanceof \ReflectionUnionType) {
throw new \Exception("Failed to resolve class: {$serviceName} because of union type for param {$name}.");

@ -10,7 +10,7 @@ declare(strict_types=1);
* This file is for non-sensitive data like session data
*/
namespace IOcornetstone\Framework\Services;
namespace IOcornerstone\Framework\Services;
use IOcornerstone\Framework\Common;
use IOcornerstone\Framework\RandomEngine;
@ -260,7 +260,7 @@ md5-128 0.77
$key = $this->key;
$key = ($validate) ? $this->getValidKey($key) : $key;
$ivsize = openssl_cipher_iv_length($this->method);
$iv = $this->randomEngine->get_bytes($ivsize); // Requires PHP 7
$iv = $this->randomEngine->getBytes($ivsize); // Requires PHP 7
// Encryption key generated by PBKDF2 (since PHP 5.5)
$keys = hash_pbkdf2($this->defaultHash, $key, $iv, $this->_iterations, $this->_length, $this->_raw);
$encKey = substr($keys, 0, $this->_key_bytes); // X bit encryption key

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace IOcornerstone\Framework\Services;
namespace IOcornerstone\Framework\Services\Sessions;
use IOcornerstone\Framework\GzCompression;
use IOcornerstone\Framework\Enum\CompressionMethod as Method;
@ -21,6 +21,7 @@ class CookieSessionHandler implements \SessionHandlerInterface {
public static string $cookiePath = '/';
public static bool $cookieSecure = true;
public static bool $cookieHTTPOnly = true;
private $compression;
private $enc;
public function __construct($enc, array $options) {

@ -8,7 +8,7 @@ declare(strict_types=1);
* @license MIT
*/
namespace IOcornerstone\Framework\Services;
namespace IOcornerstone\Framework\Services\Sessions;
use IOcornerstone\Framework\GzCompression;
use IOcornerstone\Framework\Enum\CompressionMethod as Method;

@ -8,7 +8,7 @@ declare(strict_types=1);
* @license MIT
*/
namespace IOcornerstone\Framework\Services;
namespace IOcornerstone\Framework\Services\Sessions;
use IOcornerstone\Framework\GzCompression;
use IOcornerstone\Framework\Enum\CompressionMethod as Method;

Loading…
Cancel
Save