Skip to content

Commit 1ba9552

Browse files
authored
Merge pull request #109 from niden-code/master
5.9.0 Release
2 parents f9cc448 + 1f88337 commit 1ba9552

File tree

18 files changed

+84
-39
lines changed

18 files changed

+84
-39
lines changed

src/Annotations/Adapter/Memory.php

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter
2222
*/
2323
protected $data;
2424

25+
public function __construct()
26+
{
27+
}
28+
2529
/**
2630
* Reads parsed annotations from memory
2731
*

src/Di/Injectable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @property \Phalcon\Mvc\Model\MetaData\Memory|\Phalcon\Mvc\Model\MetadataInterface $modelsMetadata
3939
* @property \Phalcon\Mvc\Model\Transaction\Manager|\Phalcon\Mvc\Model\Transaction\ManagerInterface $transactionManager
4040
* @property \Phalcon\Assets\Manager $assets
41-
* @property \Phalcon\Di\Di|\Phalcon\Di\Di\DiInterface $di
41+
* @property \Phalcon\Di\Di|\Phalcon\Di\DiInterface $di
4242
* @property \Phalcon\Session\Bag|\Phalcon\Session\BagInterface $persistent
4343
* @property \Phalcon\Mvc\View|\Phalcon\Mvc\ViewInterface $view
4444
*/

src/Dispatcher/AbstractDispatcher.php

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Phalcon\Filter\FilterInterface;
1919
use Phalcon\Mvc\Model\Binder;
2020
use Phalcon\Mvc\Model\BinderInterface;
21+
use Phalcon\Support\Collection;
2122

2223
/**
2324
* This is the base class for Phalcon\Mvc\Dispatcher and Phalcon\Cli\Dispatcher.

src/Filter/Filter.php

+22-22
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@
1212
/**
1313
* Lazy loads, stores and exposes sanitizer objects
1414
*
15-
* @method absint(mixed $input): int
16-
* @method alnum(mixed $input): string
17-
* @method alpha(mixed $input): string
18-
* @method bool(mixed $input): bool
19-
* @method email(string $input): string
20-
* @method float(mixed $input): float
21-
* @method int(string $input): int
22-
* @method lower(string $input): string
23-
* @method lowerfirst(string $input): string
24-
* @method regex(mixed $input, mixed $pattern, mixed $replace): mixed
25-
* @method remove(mixed $input, mixed $replace): mixed
26-
* @method replace(mixed $input, mixed $source, mixed $target): mixed
27-
* @method special(string $input): string
28-
* @method specialfull(string $input): string
29-
* @method string(string $input): string
30-
* @method stringlegacy(mixed $input): string
31-
* @method striptags(string $input): string
32-
* @method trim(string $input): string
33-
* @method upper(string $input): string
34-
* @method upperFirst(string $input): string
35-
* @method upperWords(string $input): string|null
36-
* @method url(string $input): string|null
15+
* @method int absint(mixed $input)
16+
* @method string alnum(mixed $input)
17+
* @method string alpha(mixed $input)
18+
* @method bool bool(mixed $input)
19+
* @method string email(string $input)
20+
* @method float float(mixed $input)
21+
* @method int int(string $input)
22+
* @method string lower(string $input)
23+
* @method string lowerfirst(string $input)
24+
* @method mixed regex(mixed $input, mixed $pattern, mixed $replace)
25+
* @method mixed remove(mixed $input, mixed $replace)
26+
* @method mixed replace(mixed $input, mixed $source, mixed $target)
27+
* @method string special(string $input)
28+
* @method string specialfull(string $input)
29+
* @method string string(string $input)
30+
* @method string stringlegacy(mixed $input)
31+
* @method string striptags(string $input)
32+
* @method string trim(string $input)
33+
* @method string upper(string $input)
34+
* @method string upperFirst(string $input)
35+
* @method null upperWords(string $input): strin
36+
* @method null url(string $input): strin
3737
*
3838
* @property array $mapper
3939
* @property array $services

src/Filter/Validation/Validator/Email.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
* ]
4646
* )
4747
* );
48+
*
49+
* $validator->add(
50+
51+
* new EmailValidator(
52+
* [
53+
* "message" => "The e-mail is not valid",
54+
* "allowUTF8" => true,
55+
* ]
56+
* )
57+
* );
4858
* ```
4959
*/
5060
class Email extends AbstractValidator
@@ -57,7 +67,8 @@ class Email extends AbstractValidator
5767
* @param array $options = [
5868
* 'message' => '',
5969
* 'template' => '',
60-
* 'allowEmpty' => false
70+
* 'allowEmpty' => false,
71+
* 'allowUTF8' => false,
6172
* ]
6273
*/
6374
public function __construct(array $options = [])

src/Http/Cookie.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Cookie extends AbstractInjectionAware implements \Phalcon\Http\Cookie\Cook
103103
* @param bool $httpOnly
104104
* @param array $options
105105
*/
106-
public function __construct(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = [])
106+
public function __construct(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = [])
107107
{
108108
}
109109

src/Http/Request.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,13 @@ public function getPost(string $name = null, $filters = null, $defaultValue = nu
446446
}
447447

448448
/**
449-
* Gets a variable from put request
449+
* Gets a variable from the PUT request
450450
*
451451
* ```php
452-
* // Returns value from $_PUT["user_email"] without sanitizing
452+
* // Returns value from PUT stream without sanitizing
453453
* $userEmail = $request->getPut("user_email");
454454
*
455-
* // Returns value from $_PUT["user_email"] with sanitizing
455+
* // Returns value from PUT stream with sanitizing
456456
* $userEmail = $request->getPut("user_email", "email");
457457
* ```
458458
*

src/Http/RequestInterface.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ public function getURI(bool $onlyPath = false): string;
258258
public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed;
259259

260260
/**
261-
* Gets a variable from put request
261+
* Gets a variable from the PUT request
262262
*
263263
* ```php
264-
* // Returns value from $_PUT["user_email"] without sanitizing
264+
* // Returns value from PUT stream without sanitizing
265265
* $userEmail = $request->getPut("user_email");
266266
*
267-
* // Returns value from $_PUT["user_email"] with sanitizing
267+
* // Returns value from PUT stream with sanitizing
268268
* $userEmail = $request->getPut("user_email", "email");
269269
* ```
270270
*

src/Http/Response/Cookies.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function send(): bool
208208
* @param array $options
209209
* @return CookiesInterface
210210
*/
211-
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = []): CookiesInterface
211+
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = []): CookiesInterface
212212
{
213213
}
214214

src/Http/Response/CookiesInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function send(): bool;
7777
* @param array $options
7878
* @return CookiesInterface
7979
*/
80-
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = null, string $domain = null, bool $httpOnly = null, array $options = []): CookiesInterface;
80+
public function set(string $name, $value = null, int $expire = 0, string $path = '/', bool $secure = false, string $domain = '', bool $httpOnly = false, array $options = []): CookiesInterface;
8181

8282
/**
8383
* Set if cookies in the bag must be automatically encrypted/decrypted

src/Session/Adapter/Stream.php

+11
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ private function getDirSeparator(string $directory): string
122122
{
123123
}
124124

125+
/**
126+
* Gets the glob array or returns false on failure
127+
*
128+
* @param string $pattern
129+
*
130+
* @return array|false
131+
*/
132+
protected function getGlobFiles(string $pattern): false|array
133+
{
134+
}
135+
125136
/**
126137
* @param string $filename
127138
*

src/Storage/Adapter/AbstractAdapter.php

+18
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ public function getDefaultSerializer(): string
165165
*/
166166
abstract public function getKeys(string $prefix = ''): array;
167167

168+
/**
169+
* Returns the lifetime
170+
*
171+
* @return int
172+
*/
173+
public function getLifetime(): int
174+
{
175+
}
176+
168177
/**
169178
* Returns the prefix
170179
*
@@ -174,6 +183,15 @@ public function getPrefix(): string
174183
{
175184
}
176185

186+
/**
187+
* Get the serializer
188+
*
189+
* @return SerializerInterface
190+
*/
191+
public function getSerializer(): SerializerInterface
192+
{
193+
}
194+
177195
/**
178196
* Checks if an element exists in the cache
179197
*

src/Storage/Adapter/Redis.php

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Redis extends \Phalcon\Storage\Adapter\AbstractAdapter
4343
* "connectTimeout" => 0,
4444
* "retryInterval" => 0,
4545
* "readTimeout" => 0,
46+
* "ssl" => [],
4647
* ]
4748
*
4849
* @throws SupportException

src/Storage/Adapter/Weak.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class Weak extends \Phalcon\Storage\Adapter\AbstractAdapter
2222
{
2323
/**
24-
* @var string|null
24+
* @var int|null
2525
*/
2626
protected $fetching = null;
2727

src/Storage/Serializer/AbstractSerializer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __unserialize(array $data): void
5656
/**
5757
* @return mixed
5858
*/
59-
public function getData()
59+
public function getData(): mixed
6060
{
6161
}
6262

src/Storage/Serializer/Igbinary.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Igbinary extends \Phalcon\Storage\Serializer\AbstractSerializer
2424
*
2525
* @return string
2626
*/
27-
public function serialize()
27+
public function serialize(): string
2828
{
2929
}
3030

src/Storage/Serializer/Json.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct($data = null)
4848
*
4949
* @return JsonSerializable|mixed|string
5050
*/
51-
public function serialize()
51+
public function serialize(): mixed
5252
{
5353
}
5454

src/Support/Debug.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,9 @@ public function onUncaughtException(\Throwable $exception): bool
176176
* @param mixed $message
177177
* @param mixed $file
178178
* @param mixed $line
179-
* @param mixed $context
180179
* @return void
181180
*/
182-
public function onUncaughtLowSeverity($severity, $message, $file, $line, $context): void
181+
public function onUncaughtLowSeverity($severity, $message, $file, $line): void
183182
{
184183
}
185184

0 commit comments

Comments
 (0)