Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.9.0 Release #109

Merged
merged 3 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Annotations/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter
*/
protected $data;

public function __construct()
{
}

/**
* Reads parsed annotations from memory
*
Expand Down
2 changes: 1 addition & 1 deletion src/Di/Injectable.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @property \Phalcon\Mvc\Model\MetaData\Memory|\Phalcon\Mvc\Model\MetadataInterface $modelsMetadata
* @property \Phalcon\Mvc\Model\Transaction\Manager|\Phalcon\Mvc\Model\Transaction\ManagerInterface $transactionManager
* @property \Phalcon\Assets\Manager $assets
* @property \Phalcon\Di\Di|\Phalcon\Di\Di\DiInterface $di
* @property \Phalcon\Di\Di|\Phalcon\Di\DiInterface $di
* @property \Phalcon\Session\Bag|\Phalcon\Session\BagInterface $persistent
* @property \Phalcon\Mvc\View|\Phalcon\Mvc\ViewInterface $view
*/
Expand Down
1 change: 1 addition & 0 deletions src/Dispatcher/AbstractDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Phalcon\Filter\FilterInterface;
use Phalcon\Mvc\Model\Binder;
use Phalcon\Mvc\Model\BinderInterface;
use Phalcon\Support\Collection;

/**
* This is the base class for Phalcon\Mvc\Dispatcher and Phalcon\Cli\Dispatcher.
Expand Down
44 changes: 22 additions & 22 deletions src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@
/**
* Lazy loads, stores and exposes sanitizer objects
*
* @method absint(mixed $input): int
* @method alnum(mixed $input): string
* @method alpha(mixed $input): string
* @method bool(mixed $input): bool
* @method email(string $input): string
* @method float(mixed $input): float
* @method int(string $input): int
* @method lower(string $input): string
* @method lowerfirst(string $input): string
* @method regex(mixed $input, mixed $pattern, mixed $replace): mixed
* @method remove(mixed $input, mixed $replace): mixed
* @method replace(mixed $input, mixed $source, mixed $target): mixed
* @method special(string $input): string
* @method specialfull(string $input): string
* @method string(string $input): string
* @method stringlegacy(mixed $input): string
* @method striptags(string $input): string
* @method trim(string $input): string
* @method upper(string $input): string
* @method upperFirst(string $input): string
* @method upperWords(string $input): string|null
* @method url(string $input): string|null
* @method int absint(mixed $input)
* @method string alnum(mixed $input)
* @method string alpha(mixed $input)
* @method bool bool(mixed $input)
* @method string email(string $input)
* @method float float(mixed $input)
* @method int int(string $input)
* @method string lower(string $input)
* @method string lowerfirst(string $input)
* @method mixed regex(mixed $input, mixed $pattern, mixed $replace)
* @method mixed remove(mixed $input, mixed $replace)
* @method mixed replace(mixed $input, mixed $source, mixed $target)
* @method string special(string $input)
* @method string specialfull(string $input)
* @method string string(string $input)
* @method string stringlegacy(mixed $input)
* @method string striptags(string $input)
* @method string trim(string $input)
* @method string upper(string $input)
* @method string upperFirst(string $input)
* @method null upperWords(string $input): strin
* @method null url(string $input): strin
*
* @property array $mapper
* @property array $services
Expand Down
13 changes: 12 additions & 1 deletion src/Filter/Validation/Validator/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
* ]
* )
* );
*
* $validator->add(
* "täst@example.com",
* new EmailValidator(
* [
* "message" => "The e-mail is not valid",
* "allowUTF8" => true,
* ]
* )
* );
* ```
*/
class Email extends AbstractValidator
Expand All @@ -57,7 +67,8 @@ class Email extends AbstractValidator
* @param array $options = [
* 'message' => '',
* 'template' => '',
* 'allowEmpty' => false
* 'allowEmpty' => false,
* 'allowUTF8' => false,
* ]
*/
public function __construct(array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Cookie extends AbstractInjectionAware implements \Phalcon\Http\Cookie\Cook
* @param bool $httpOnly
* @param array $options
*/
public function __construct(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = [])
public function __construct(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = [])
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ public function getPost(string $name = null, $filters = null, $defaultValue = nu
}

/**
* Gets a variable from put request
* Gets a variable from the PUT request
*
* ```php
* // Returns value from $_PUT["user_email"] without sanitizing
* // Returns value from PUT stream without sanitizing
* $userEmail = $request->getPut("user_email");
*
* // Returns value from $_PUT["user_email"] with sanitizing
* // Returns value from PUT stream with sanitizing
* $userEmail = $request->getPut("user_email", "email");
* ```
*
Expand Down
6 changes: 3 additions & 3 deletions src/Http/RequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ public function getURI(bool $onlyPath = false): string;
public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed;

/**
* Gets a variable from put request
* Gets a variable from the PUT request
*
* ```php
* // Returns value from $_PUT["user_email"] without sanitizing
* // Returns value from PUT stream without sanitizing
* $userEmail = $request->getPut("user_email");
*
* // Returns value from $_PUT["user_email"] with sanitizing
* // Returns value from PUT stream with sanitizing
* $userEmail = $request->getPut("user_email", "email");
* ```
*
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Response/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function send(): bool
* @param array $options
* @return CookiesInterface
*/
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = []): CookiesInterface
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = []): CookiesInterface
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Response/CookiesInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function send(): bool;
* @param array $options
* @return CookiesInterface
*/
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = []): CookiesInterface;
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = []): CookiesInterface;

/**
* Set if cookies in the bag must be automatically encrypted/decrypted
Expand Down
11 changes: 11 additions & 0 deletions src/Session/Adapter/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ private function getDirSeparator(string $directory): string
{
}

/**
* Gets the glob array or returns false on failure
*
* @param string $pattern
*
* @return array|false
*/
protected function getGlobFiles(string $pattern): false|array
{
}

/**
* @param string $filename
*
Expand Down
18 changes: 18 additions & 0 deletions src/Storage/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ public function getDefaultSerializer(): string
*/
abstract public function getKeys(string $prefix = ''): array;

/**
* Returns the lifetime
*
* @return int
*/
public function getLifetime(): int
{
}

/**
* Returns the prefix
*
Expand All @@ -174,6 +183,15 @@ public function getPrefix(): string
{
}

/**
* Get the serializer
*
* @return SerializerInterface
*/
public function getSerializer(): SerializerInterface
{
}

/**
* Checks if an element exists in the cache
*
Expand Down
1 change: 1 addition & 0 deletions src/Storage/Adapter/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Redis extends \Phalcon\Storage\Adapter\AbstractAdapter
* "connectTimeout" => 0,
* "retryInterval" => 0,
* "readTimeout" => 0,
* "ssl" => [],
* ]
*
* @throws SupportException
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/Weak.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class Weak extends \Phalcon\Storage\Adapter\AbstractAdapter
{
/**
* @var string|null
* @var int|null
*/
protected $fetching = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Serializer/AbstractSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __unserialize(array $data): void
/**
* @return mixed
*/
public function getData()
public function getData(): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Serializer/Igbinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Igbinary extends \Phalcon\Storage\Serializer\AbstractSerializer
*
* @return string
*/
public function serialize()
public function serialize(): string
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Serializer/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct($data = null)
*
* @return JsonSerializable|mixed|string
*/
public function serialize()
public function serialize(): mixed
{
}

Expand Down
3 changes: 1 addition & 2 deletions src/Support/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ public function onUncaughtException(\Throwable $exception): bool
* @param mixed $message
* @param mixed $file
* @param mixed $line
* @param mixed $context
* @return void
*/
public function onUncaughtLowSeverity($severity, $message, $file, $line, $context): void
public function onUncaughtLowSeverity($severity, $message, $file, $line): void
{
}

Expand Down