Skip to content

Commit

Permalink
support for PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 2, 2022
1 parent 690f741 commit e841bcc
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']

fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": ">=7.1 <8.2",
"php": ">=7.1 <8.3",
"ext-tokenizer": "*",
"nette/neon": "^3.3 || ^4.0",
"nette/php-generator": "^3.5.4 || ^4.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/DI/Compiler.functions.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ require __DIR__ . '/../bootstrap.php';

class Service
{
public $args;


public function __construct()
{
}
Expand Down
2 changes: 2 additions & 0 deletions tests/DI/Compiler.generatedFactory.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface ILoremFactory
class Lorem
{
public $ipsum;
public $var;


public function __construct(Ipsum $ipsum)
Expand Down Expand Up @@ -56,6 +57,7 @@ class Article

public $title;
public $method;
public $prop;


public function __construct($title)
Expand Down
7 changes: 7 additions & 0 deletions tests/DI/Compiler.services.create.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class Factory

class Lorem
{
public $arg;
public $foo;


public function __construct($arg = null)
{
$this->arg = $arg;
Expand All @@ -41,6 +45,9 @@ class Lorem

class Ipsum
{
public $arg;


public function __construct($arg)
{
$this->arg = $arg;
Expand Down
5 changes: 5 additions & 0 deletions tests/DI/Compiler.services.setup.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ require __DIR__ . '/../bootstrap.php';

class Lorem
{
public $test;
public $arr;


public function test(...$args)
{
Notes::add(__METHOD__ . ' ' . implode(' ', $args));
Expand All @@ -28,6 +32,7 @@ class Ipsum

public static $instances;

public $args;
public $test;


Expand Down
7 changes: 7 additions & 0 deletions tests/DI/ContainerBuilder.create.rich.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ require __DIR__ . '/../bootstrap.php';

class Factory
{
public $mark;


/** @return Obj */
public function create()
{
Expand All @@ -31,6 +34,10 @@ class Factory

class Obj
{
public $args;
public $mark;


/** @return Obj */
public function foo(...$args)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/DI/files/compiler.services.create.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
referencedServiceWithSetup:
factory: @one
setup:
- $x(10)
- $arg(10)

serviceAsParam: Ipsum(@one)
calledService: @one()
Expand Down

0 comments on commit e841bcc

Please sign in to comment.