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

Allow installation on PHP 8.2 #11

Merged
merged 6 commits into from
Nov 2, 2023
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: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"sort-packages": true
},
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"php": "~8.1.0 || ~8.2.0",
"laminas/laminas-escaper": "^2.9",
"laminas/laminas-stdlib": "^3.6"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.3",
"laminas/laminas-servicemanager": "^3.8",
"laminas/laminas-servicemanager": "^3.21.0",
"phpunit/phpunit": "^9.5.5"
},
"suggest": {
Expand Down
112 changes: 40 additions & 72 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/Cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Traversable;

use function count;
use function get_class;
use function gettype;
use function in_array;
use function is_array;
Expand Down Expand Up @@ -144,7 +143,7 @@ public function appendTag($tag)
throw new InvalidArgumentException(sprintf(
'Tag must be an instance of %s\TaggableInterface or an array; received "%s"',
__NAMESPACE__,
is_object($tag) ? get_class($tag) : gettype($tag)
is_object($tag) ? $tag::class : gettype($tag)
));
}

Expand Down
3 changes: 1 addition & 2 deletions src/Cloud/Decorator/HtmlCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace Laminas\Tag\Cloud\Decorator;

use function get_class;
use function gettype;
use function implode;
use function is_array;
Expand Down Expand Up @@ -89,7 +88,7 @@ public function render($tags)
if (! is_array($tags)) {
throw new Exception\InvalidArgumentException(sprintf(
'HtmlCloud::render() expects an array argument; received "%s"',
is_object($tags) ? get_class($tags) : gettype($tags)
is_object($tags) ? $tags::class : gettype($tags)
));
}
$cloudHTML = implode($this->getSeparator(), $tags);
Expand Down
3 changes: 1 addition & 2 deletions src/Cloud/Decorator/HtmlTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Laminas\Tag\ItemList;

use function count;
use function get_class;
use function gettype;
use function in_array;
use function is_array;
Expand Down Expand Up @@ -225,7 +224,7 @@ public function render($tags)
if (! $tags instanceof ItemList) {
throw new InvalidArgumentException(sprintf(
'HtmlTag::render() expects a Laminas\Tag\ItemList argument; received "%s"',
is_object($tags) ? get_class($tags) : gettype($tags)
is_object($tags) ? $tags::class : gettype($tags)
));
}
if (null === ($weightValues = $this->getClassList())) {
Expand Down
3 changes: 1 addition & 2 deletions src/Cloud/DecoratorPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Zend\Tag\Cloud\Decorator\HtmlCloud;
use Zend\Tag\Cloud\Decorator\HtmlTag;

use function get_class;
use function gettype;
use function is_object;
use function sprintf;
Expand Down Expand Up @@ -76,7 +75,7 @@ public function validate($instance)
'%s can only create instances of %s; %s is invalid',
static::class,
$this->instanceOf,
is_object($instance) ? get_class($instance) : gettype($instance)
is_object($instance) ? $instance::class : gettype($instance)
));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DecoratorPluginManagerCompatibilityTest extends TestCase
use CommonPluginManagerTrait;

/** @return DecoratorPluginManager */
protected function getPluginManager()
protected static function getPluginManager()
{
return new DecoratorPluginManager(new ServiceManager());
}
Expand Down
Loading