Skip to content

Commit aa76978

Browse files
minor #3 Allow laminas-code ^4 (nicolas-grekas)
This PR was squashed before being merged into the 1.x branch. Discussion ---------- Allow laminas-code ^4 Commits ------- 7d22195 Remove "platform.php 7.4.99" hack d8b2d9d Remove file GHA from upstream 8855b1a Fix lazy-loading-value-holder-internal-php-classes.phpt 39a83e9 Rename aliases containing "Zend" ae588ee Allow laminas-code ^4
2 parents 352d7fb + 7d22195 commit aa76978

File tree

7 files changed

+11
-72
lines changed

7 files changed

+11
-72
lines changed

.github/workflows/phpunit.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
key: "php-${{ matrix.php-version }}"
4343
restore-keys: "php-${{ matrix.php-version }}"
4444

45-
- name: "Configure for PHP 8"
46-
if: ${{ matrix.php-version == '8.0' }}
47-
run: "composer config platform.php 7.4.99"
48-
4945
- name: "Test with lowest dependencies"
5046
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest && vendor/bin/simple-phpunit"
5147

.github/workflows/release-on-milestone-closed.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"require": {
2929
"php": ">=7.1",
30-
"laminas/laminas-code": "^3.4.1",
30+
"laminas/laminas-code": "^3.4.1|^4.0",
3131
"symfony/filesystem": "^4.4.17|^5.0"
3232
},
3333
"conflict": {

src/ProxyManager/Generator/ClassGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
namespace ProxyManager\Generator;
66

7-
use Laminas\Code\Generator\ClassGenerator as ZendClassGenerator;
7+
use Laminas\Code\Generator\ClassGenerator as LaminasClassGenerator;
88

99
use function array_map;
1010
use function trim;
1111

1212
/**
1313
* Class generator that ensures that interfaces/classes that are implemented/extended are FQCNs
1414
*/
15-
class ClassGenerator extends ZendClassGenerator
15+
class ClassGenerator extends LaminasClassGenerator
1616
{
1717
/**
1818
* {@inheritDoc}
1919
*/
20-
public function setExtendedClass($extendedClass): ZendClassGenerator
20+
public function setExtendedClass($extendedClass): LaminasClassGenerator
2121
{
2222
if ($extendedClass) {
2323
$extendedClass = '\\' . trim($extendedClass, '\\');
@@ -33,7 +33,7 @@ public function setExtendedClass($extendedClass): ZendClassGenerator
3333
*
3434
* @psalm-suppress MoreSpecificImplementedParamType parent interface does not specify type of array values
3535
*/
36-
public function setImplementedInterfaces(array $interfaces): ZendClassGenerator
36+
public function setImplementedInterfaces(array $interfaces): LaminasClassGenerator
3737
{
3838
return parent::setImplementedInterfaces(array_map(
3939
static function (string $interface): string {

src/ProxyManager/Generator/MethodGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
namespace ProxyManager\Generator;
66

77
use Laminas\Code\Generator\DocBlockGenerator;
8-
use Laminas\Code\Generator\MethodGenerator as ZendMethodGenerator;
8+
use Laminas\Code\Generator\MethodGenerator as LaminasMethodGenerator;
99
use Laminas\Code\Reflection\MethodReflection;
1010

1111
/**
1212
* Method generator that fixes minor quirks in ZF2's method generator
1313
*/
14-
class MethodGenerator extends ZendMethodGenerator
14+
class MethodGenerator extends LaminasMethodGenerator
1515
{
1616
/**
1717
* @return static

src/ProxyManager/ProxyGenerator/LazyLoadingGhost/MethodGenerator/InitializeProxy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace ProxyManager\ProxyGenerator\LazyLoadingGhost\MethodGenerator;
66

77
use Laminas\Code\Generator\Exception\InvalidArgumentException;
8-
use Laminas\Code\Generator\MethodGenerator as ZendMethodGenerator;
8+
use Laminas\Code\Generator\MethodGenerator as LaminasMethodGenerator;
99
use Laminas\Code\Generator\PropertyGenerator;
1010
use ProxyManager\Generator\MethodGenerator;
1111

@@ -20,7 +20,7 @@ class InitializeProxy extends MethodGenerator
2020
*
2121
* @throws InvalidArgumentException
2222
*/
23-
public function __construct(PropertyGenerator $initializerProperty, ZendMethodGenerator $callInitializer)
23+
public function __construct(PropertyGenerator $initializerProperty, LaminasMethodGenerator $callInitializer)
2424
{
2525
parent::__construct('initializeProxy');
2626
$this->setReturnType('bool');

tests/language-feature-scripts/lazy-loading-value-holder-internal-php-classes.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ $factory
3737
$initializer = null;
3838
$wrapped = new PharMock();
3939
})
40-
->compress('Lazy Loaded!');
40+
->compress(123);
4141

4242
?>
4343
--EXPECT--
44-
Lazy Loaded!
44+
123

0 commit comments

Comments
 (0)