mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
PHP 8.1 fixes
This commit is contained in:
77
composer.lock
generated
77
composer.lock
generated
@@ -4283,16 +4283,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.13.1",
|
||||
"version": "v4.13.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd"
|
||||
"reference": "210577fe3cf7badcc5814d99455df46564f3c077"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd",
|
||||
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
|
||||
"reference": "210577fe3cf7badcc5814d99455df46564f3c077",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4333,9 +4333,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2"
|
||||
},
|
||||
"time": "2021-11-03T20:52:16+00:00"
|
||||
"time": "2021-11-30T19:35:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
@@ -6228,28 +6228,28 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v5.3.4",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/browser-kit.git",
|
||||
"reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c"
|
||||
"reference": "d250db364a35ba5d60626b2a6f10f2eaf2073bde"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/c1e3f64fcc631c96e2c5843b666db66679ced11c",
|
||||
"reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/d250db364a35ba5d60626b2a6f10f2eaf2073bde",
|
||||
"reference": "d250db364a35ba5d60626b2a6f10f2eaf2073bde",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/dom-crawler": "^4.4|^5.0",
|
||||
"symfony/dom-crawler": "^4.4|^5.0|^6.0",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/css-selector": "^4.4|^5.0",
|
||||
"symfony/http-client": "^4.4|^5.0",
|
||||
"symfony/mime": "^4.4|^5.0",
|
||||
"symfony/process": "^4.4|^5.0"
|
||||
"symfony/css-selector": "^4.4|^5.0|^6.0",
|
||||
"symfony/http-client": "^4.4|^5.0|^6.0",
|
||||
"symfony/mime": "^4.4|^5.0|^6.0",
|
||||
"symfony/process": "^4.4|^5.0|^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/process": ""
|
||||
@@ -6280,7 +6280,7 @@
|
||||
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/browser-kit/tree/v5.3.4"
|
||||
"source": "https://github.com/symfony/browser-kit/tree/v5.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6296,20 +6296,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-21T12:40:44+00:00"
|
||||
"time": "2021-10-26T22:29:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v5.3.4",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "7fb120adc7f600a59027775b224c13a33530dd90"
|
||||
"reference": "44b933f98bb4b5220d10bed9ce5662f8c2d13dcc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90",
|
||||
"reference": "7fb120adc7f600a59027775b224c13a33530dd90",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/44b933f98bb4b5220d10bed9ce5662f8c2d13dcc",
|
||||
"reference": "44b933f98bb4b5220d10bed9ce5662f8c2d13dcc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6346,7 +6346,7 @@
|
||||
"description": "Converts CSS selectors to XPath expressions",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/css-selector/tree/v5.3.4"
|
||||
"source": "https://github.com/symfony/css-selector/tree/v5.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6362,7 +6362,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-21T12:38:00+00:00"
|
||||
"time": "2021-09-09T08:06:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
@@ -6433,21 +6433,21 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v5.3.7",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c"
|
||||
"reference": "5b06626e940a3ad54e573511d64d4e00dc8d0fd8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c7eef3a60ccfdd8eafe07f81652e769ac9c7146c",
|
||||
"reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5b06626e940a3ad54e573511d64d4e00dc8d0fd8",
|
||||
"reference": "5b06626e940a3ad54e573511d64d4e00dc8d0fd8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
@@ -6457,7 +6457,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"masterminds/html5": "^2.6",
|
||||
"symfony/css-selector": "^4.4|^5.0"
|
||||
"symfony/css-selector": "^4.4|^5.0|^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/css-selector": ""
|
||||
@@ -6488,7 +6488,7 @@
|
||||
"description": "Eases DOM navigation for HTML and XML documents",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/dom-crawler/tree/v5.3.7"
|
||||
"source": "https://github.com/symfony/dom-crawler/tree/v5.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6504,24 +6504,25 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-29T19:32:13+00:00"
|
||||
"time": "2021-11-23T10:19:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v5.3.7",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93"
|
||||
"reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93",
|
||||
"reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/d2f29dac98e96a98be467627bd49c2efb1bc2590",
|
||||
"reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -6550,7 +6551,7 @@
|
||||
"description": "Finds files and directories via an intuitive fluent interface",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/finder/tree/v5.3.7"
|
||||
"source": "https://github.com/symfony/finder/tree/v5.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6566,7 +6567,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-04T21:20:46+00:00"
|
||||
"time": "2021-11-28T15:25:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
@@ -6695,5 +6696,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "7.3.6"
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ class Package
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($key)
|
||||
{
|
||||
return $this->data->get($key);
|
||||
@@ -55,6 +56,7 @@ class Package
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($key, $value)
|
||||
{
|
||||
$this->data->set($key, $value);
|
||||
@@ -64,6 +66,7 @@ class Package
|
||||
* @param string $key
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($key)
|
||||
{
|
||||
return isset($this->data->{$key});
|
||||
@@ -72,6 +75,7 @@ class Package
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->toJson();
|
||||
|
||||
@@ -74,6 +74,7 @@ class GPM extends Iterator
|
||||
* @param string $offset Asset name value
|
||||
* @return mixed Asset value
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($offset)
|
||||
{
|
||||
switch ($offset) {
|
||||
@@ -90,6 +91,7 @@ class GPM extends Iterator
|
||||
* @param string $offset Asset name value
|
||||
* @return bool True if the value is set
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($offset)
|
||||
{
|
||||
switch ($offset) {
|
||||
|
||||
@@ -28,6 +28,7 @@ abstract class Getters implements ArrayAccess, Countable
|
||||
* @param int|string $offset Medium name value
|
||||
* @param mixed $value Medium value
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($offset, $value)
|
||||
{
|
||||
$this->offsetSet($offset, $value);
|
||||
@@ -39,6 +40,7 @@ abstract class Getters implements ArrayAccess, Countable
|
||||
* @param int|string $offset Medium name value
|
||||
* @return mixed Medium value
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($offset)
|
||||
{
|
||||
return $this->offsetGet($offset);
|
||||
@@ -50,6 +52,7 @@ abstract class Getters implements ArrayAccess, Countable
|
||||
* @param int|string $offset Medium name value
|
||||
* @return boolean True if the value is set
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($offset)
|
||||
{
|
||||
return $this->offsetExists($offset);
|
||||
@@ -60,6 +63,7 @@ abstract class Getters implements ArrayAccess, Countable
|
||||
*
|
||||
* @param int|string $offset The name value to unset
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($offset)
|
||||
{
|
||||
$this->offsetUnset($offset);
|
||||
|
||||
@@ -652,6 +652,7 @@ class Grav extends Container
|
||||
* @param array $args
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args)
|
||||
{
|
||||
$closure = $this->{$method} ?? null;
|
||||
|
||||
@@ -38,6 +38,7 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
|
||||
* @param mixed $args
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($key, $args)
|
||||
{
|
||||
return $this->items[$key] ?? null;
|
||||
@@ -46,6 +47,7 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
|
||||
/**
|
||||
* Clone the iterator.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
foreach ($this as $key => $value) {
|
||||
@@ -60,6 +62,7 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return implode(',', $this->items);
|
||||
|
||||
@@ -636,6 +636,7 @@ class Language
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
$vars = get_object_vars($this);
|
||||
|
||||
@@ -289,6 +289,7 @@ trait ParsedownGravTrait
|
||||
* @param array $args
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if (isset($this->{$method}) === true) {
|
||||
|
||||
@@ -208,6 +208,7 @@ interface MediaObjectInterface extends \Grav\Framework\Media\Interfaces\MediaObj
|
||||
* @param mixed $args
|
||||
* @return $this
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args);
|
||||
|
||||
/**
|
||||
|
||||
@@ -138,6 +138,7 @@ trait MediaObjectTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
abstract public function __toString();
|
||||
|
||||
/**
|
||||
@@ -478,6 +479,7 @@ trait MediaObjectTrait
|
||||
* @param array $args
|
||||
* @return $this
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args)
|
||||
{
|
||||
$count = count($args);
|
||||
|
||||
@@ -163,6 +163,7 @@ class Collection extends Iterator implements PageCollectionInterface
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
$current = parent::key();
|
||||
@@ -175,6 +176,7 @@ class Collection extends Iterator implements PageCollectionInterface
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
$current = parent::current();
|
||||
|
||||
@@ -90,6 +90,7 @@ abstract class AbstractMedia implements ExportInterface, MediaCollectionInterfac
|
||||
* @param string $filename
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __invoke($filename)
|
||||
{
|
||||
return $this->offsetGet($filename);
|
||||
|
||||
@@ -34,6 +34,7 @@ class ImageFile extends Image
|
||||
/**
|
||||
* Destruct also image object.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __destruct()
|
||||
{
|
||||
$adapter = $this->adapter;
|
||||
|
||||
@@ -89,6 +89,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
/**
|
||||
* Also unset the image on destruct.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __destruct()
|
||||
{
|
||||
unset($this->image);
|
||||
@@ -97,6 +98,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
/**
|
||||
* Also clone image.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
if ($this->image) {
|
||||
@@ -303,29 +305,45 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
return parent::lightbox($width, $height, $reset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $enabled
|
||||
* @return $this
|
||||
*/
|
||||
public function autoSizes($enabled = 'true')
|
||||
{
|
||||
$enabled = $enabled === 'true' ?: false;
|
||||
$this->auto_sizes = $enabled;
|
||||
$this->auto_sizes = $enabled === 'true' ?: false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $enabled
|
||||
* @return $this
|
||||
*/
|
||||
public function aspectRatio($enabled = 'true')
|
||||
{
|
||||
$enabled = $enabled === 'true' ?: false;
|
||||
$this->aspect_ratio = $enabled;
|
||||
$this->aspect_ratio = $enabled === 'true' ?: false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $scale
|
||||
* @return $this
|
||||
*/
|
||||
public function retinaScale($scale = 1)
|
||||
{
|
||||
$this->retina_scale = intval($scale);
|
||||
$this->retina_scale = (int)$scale;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $image
|
||||
* @param string|null $position
|
||||
* @param int|float|null $scale
|
||||
* @return $this
|
||||
*/
|
||||
public function watermark($image = null, $position = null, $scale = null)
|
||||
{
|
||||
$grav = $this->getGrav();
|
||||
@@ -406,7 +424,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
*/
|
||||
public function addFrame(int $border = 10, string $color = '0x000000')
|
||||
{
|
||||
if(is_int(intval($border)) && $border>0 && preg_match('/^0x[a-f0-9]{6}$/i', $color)) { // $border must be an integer and bigger than 0; $color must be formatted as an HEX value (0x??????).
|
||||
if($border > 0 && preg_match('/^0x[a-f0-9]{6}$/i', $color)) { // $border must be an integer and bigger than 0; $color must be formatted as an HEX value (0x??????).
|
||||
$image = ImageFile::open($this->path());
|
||||
}
|
||||
else {
|
||||
@@ -437,7 +455,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
* @param mixed $args
|
||||
* @return $this|mixed
|
||||
*/
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if (!in_array($method, static::$magic_actions, true)) {
|
||||
|
||||
@@ -79,6 +79,7 @@ class Link implements RenderableInterface, MediaLinkInterface
|
||||
* @param mixed $args
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($method, $args)
|
||||
{
|
||||
$object = $this->source;
|
||||
|
||||
@@ -57,6 +57,7 @@ class Medium extends Data implements RenderableInterface, MediaFileInterface
|
||||
/**
|
||||
* Clone medium.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
// Allows future compatibility as parent::__clone() works.
|
||||
@@ -90,6 +91,7 @@ class Medium extends Data implements RenderableInterface, MediaFileInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->html();
|
||||
|
||||
@@ -218,6 +218,7 @@ class Page implements PageInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
$this->initialized = false;
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
|
||||
namespace Grav\Common\Twig\Exception;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* TwigException gets thrown when you use {% throw code message %} in twig.
|
||||
*
|
||||
* This allows Grav to catch 401, 403 and 404 exceptions and display proper error page.
|
||||
*/
|
||||
class TwigException extends \RuntimeException
|
||||
class TwigException extends RuntimeException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -623,6 +623,7 @@ class Uri
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return static::buildUrl($this->toArray());
|
||||
|
||||
@@ -215,6 +215,7 @@ class Permissions implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -26,6 +26,7 @@ class RecursiveActionIterator implements RecursiveIterator, \Countable
|
||||
* @see \Iterator::key()
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
/** @var Action $current */
|
||||
|
||||
@@ -246,6 +246,7 @@ class FileCache extends AbstractCache
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->tmp !== null && file_exists($this->tmp)) {
|
||||
|
||||
@@ -79,6 +79,7 @@ abstract class AbstractIndexCollection implements CollectionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
/** @phpstan-var TKey $key */
|
||||
@@ -90,6 +91,7 @@ abstract class AbstractIndexCollection implements CollectionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
$value = next($this->entries);
|
||||
@@ -101,6 +103,7 @@ abstract class AbstractIndexCollection implements CollectionInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
$value = current($this->entries);
|
||||
@@ -345,6 +348,7 @@ abstract class AbstractIndexCollection implements CollectionInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return __CLASS__ . '@' . spl_object_hash($this);
|
||||
|
||||
@@ -161,6 +161,7 @@ class ContentBlock implements ContentBlockInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -55,6 +55,7 @@ class AbstractFile implements FileInterface
|
||||
/**
|
||||
* Unlock file when the object gets destroyed.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->isLocked()) {
|
||||
@@ -65,6 +66,7 @@ class AbstractFile implements FileInterface
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
$this->handle = null;
|
||||
|
||||
@@ -541,6 +541,7 @@ class FlexCollection extends ObjectCollection implements FlexCollectionInterface
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -358,6 +358,7 @@ class FlexDirectoryForm implements FlexDirectoryFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($name)
|
||||
{
|
||||
$method = "get{$name}";
|
||||
@@ -375,6 +376,7 @@ class FlexDirectoryForm implements FlexDirectoryFormInterface, JsonSerializable
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($name, $value)
|
||||
{
|
||||
$method = "set{$name}";
|
||||
@@ -387,6 +389,7 @@ class FlexDirectoryForm implements FlexDirectoryFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($name)
|
||||
{
|
||||
$method = "get{$name}";
|
||||
@@ -403,6 +406,7 @@ class FlexDirectoryForm implements FlexDirectoryFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -444,6 +444,7 @@ class FlexForm implements FlexObjectFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($name)
|
||||
{
|
||||
$method = "get{$name}";
|
||||
@@ -461,6 +462,7 @@ class FlexForm implements FlexObjectFormInterface, JsonSerializable
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($name, $value)
|
||||
{
|
||||
$method = "set{$name}";
|
||||
@@ -473,6 +475,7 @@ class FlexForm implements FlexObjectFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($name)
|
||||
{
|
||||
$method = "get{$name}";
|
||||
@@ -489,6 +492,7 @@ class FlexForm implements FlexObjectFormInterface, JsonSerializable
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -432,6 +432,7 @@ class FlexIndex extends ObjectIndex implements FlexCollectionInterface, FlexInde
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
/** @var Debugger $debugger */
|
||||
@@ -522,6 +523,7 @@ class FlexIndex extends ObjectIndex implements FlexCollectionInterface, FlexInde
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -951,6 +951,7 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getFlexKey();
|
||||
@@ -959,6 +960,7 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return [
|
||||
@@ -974,6 +976,7 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
/**
|
||||
* Clone object.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
// Allows future compatibility as parent::__clone() works.
|
||||
|
||||
@@ -55,6 +55,7 @@ class FlexPageObject extends FlexObject implements PageInterface, FlexTranslateI
|
||||
/**
|
||||
* Clone page.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __clone()
|
||||
{
|
||||
parent::__clone();
|
||||
|
||||
@@ -286,6 +286,7 @@ trait FlexMediaTrait
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return parent::__debugInfo() + [
|
||||
|
||||
@@ -201,6 +201,7 @@ class FormFlashFile implements UploadedFileInterface, JsonSerializable
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __debugInfo()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -21,6 +21,7 @@ trait OverloadedPropertyTrait
|
||||
* @param mixed $offset An offset to check for.
|
||||
* @return bool Returns TRUE on success or FALSE on failure.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($offset)
|
||||
{
|
||||
return $this->hasProperty($offset);
|
||||
@@ -32,6 +33,7 @@ trait OverloadedPropertyTrait
|
||||
* @param mixed $offset The offset to retrieve.
|
||||
* @return mixed Can return all value types.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($offset)
|
||||
{
|
||||
return $this->getProperty($offset);
|
||||
@@ -44,6 +46,7 @@ trait OverloadedPropertyTrait
|
||||
* @param mixed $value The value to set.
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($offset, $value)
|
||||
{
|
||||
$this->setProperty($offset, $value);
|
||||
@@ -55,6 +58,7 @@ trait OverloadedPropertyTrait
|
||||
* @param mixed $offset The name value to unset
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($offset)
|
||||
{
|
||||
$this->unsetProperty($offset);
|
||||
|
||||
@@ -192,6 +192,7 @@ trait ObjectCollectionTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getKey();
|
||||
|
||||
@@ -183,6 +183,7 @@ trait ObjectTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getKey();
|
||||
|
||||
@@ -254,6 +254,7 @@ abstract class ObjectIndex extends AbstractIndexCollection implements NestedObje
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
abstract public function __call($name, $arguments);
|
||||
|
||||
/**
|
||||
|
||||
@@ -263,6 +263,7 @@ abstract class AbstractUri implements UriInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getUrl();
|
||||
|
||||
@@ -33,6 +33,7 @@ trait StreamDecoratorTrait
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __destruct()
|
||||
{
|
||||
$this->stream->close();
|
||||
|
||||
@@ -345,6 +345,7 @@ class Route
|
||||
* @return string
|
||||
* @deprecated 1.6 Use ->toString(true) or ->getUri() instead.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
user_error(__CLASS__ . '::' . __FUNCTION__ . '() will change in the future to return route, not relative url: use ->toString(true) or ->getUri() instead.', E_USER_DEPRECATED);
|
||||
|
||||
@@ -409,6 +409,7 @@ class Session implements SessionInterface
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($name)
|
||||
{
|
||||
return isset($_SESSION[$name]);
|
||||
@@ -417,6 +418,7 @@ class Session implements SessionInterface
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($name)
|
||||
{
|
||||
return $_SESSION[$name] ?? null;
|
||||
@@ -425,6 +427,7 @@ class Session implements SessionInterface
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($name, $value)
|
||||
{
|
||||
$_SESSION[$name] = $value;
|
||||
@@ -433,6 +436,7 @@ class Session implements SessionInterface
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($name)
|
||||
{
|
||||
unset($_SESSION[$name]);
|
||||
|
||||
@@ -124,6 +124,7 @@ interface SessionInterface extends IteratorAggregate
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __isset($name);
|
||||
|
||||
/**
|
||||
@@ -132,6 +133,7 @@ interface SessionInterface extends IteratorAggregate
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __get($name);
|
||||
|
||||
/**
|
||||
@@ -141,6 +143,7 @@ interface SessionInterface extends IteratorAggregate
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __set($name, $value);
|
||||
|
||||
/**
|
||||
@@ -149,5 +152,6 @@ interface SessionInterface extends IteratorAggregate
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unset($name);
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ final class Install
|
||||
* @param string|null $zip
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __invoke(?string $zip)
|
||||
{
|
||||
$this->zip = $zip;
|
||||
|
||||
Reference in New Issue
Block a user