Skip to content

Commit d57ebe8

Browse files
Make the codebase compatible with PHP 7.1
This is the bash script used to make this patch: for f in $(find src/ tests/ -type f -not -wholename 'tests/ProxyManagerTestAsset/*') do echo $f sed -i 's/\(\(public\|protected\|private\) \(static \)*\)\(?*[a-zA-Z|_][a-zA-Z|_0-9]* \)*\$/\1\$/' $f sed -i 's/ *: ?*object\(;*\)$/\1/' $f sed -i 's/\((\|, \|^ *\)?*object *\(& \)*\$/\1\2$/g' $f sed -i 's/\([^ ]*\) ??=/\1 = \1 ??/' $f sed -i 's/^\([A-Z][A-Z_]*\),/\1\n,/' $f done
1 parent 4c68789 commit d57ebe8

File tree

55 files changed

+196
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+196
-195
lines changed

src/ProxyManager/Autoloader/Autoloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
class Autoloader implements AutoloaderInterface
1414
{
15-
protected FileLocatorInterface $fileLocator;
16-
protected ClassNameInflectorInterface $classNameInflector;
15+
protected $fileLocator;
16+
protected $classNameInflector;
1717

1818
public function __construct(FileLocatorInterface $fileLocator, ClassNameInflectorInterface $classNameInflector)
1919
{

src/ProxyManager/Configuration.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ class Configuration
2727
{
2828
public const DEFAULT_PROXY_NAMESPACE = 'ProxyManagerGeneratedProxy';
2929

30-
protected ?string $proxiesTargetDir;
31-
protected string $proxiesNamespace = self::DEFAULT_PROXY_NAMESPACE;
32-
protected ?GeneratorStrategyInterface $generatorStrategy;
33-
protected ?AutoloaderInterface $proxyAutoloader;
34-
protected ?ClassNameInflectorInterface $classNameInflector;
35-
protected ?SignatureGeneratorInterface $signatureGenerator;
36-
protected ?SignatureCheckerInterface $signatureChecker;
37-
protected ?ClassSignatureGeneratorInterface $classSignatureGenerator;
30+
protected $proxiesTargetDir;
31+
protected $proxiesNamespace = self::DEFAULT_PROXY_NAMESPACE;
32+
protected $generatorStrategy;
33+
protected $proxyAutoloader;
34+
protected $classNameInflector;
35+
protected $signatureGenerator;
36+
protected $signatureChecker;
37+
protected $classSignatureGenerator;
3838

3939
public function setProxyAutoloader(AutoloaderInterface $proxyAutoloader): void
4040
{

src/ProxyManager/Factory/AbstractBaseFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
*/
2424
abstract class AbstractBaseFactory
2525
{
26-
protected Configuration $configuration;
26+
protected $configuration;
2727

2828
/**
2929
* Cached checked class names
3030
*
3131
* @var array<string, string>
3232
* @psalm-var array<class-string, class-string>
3333
*/
34-
private array $checkedClasses = [];
34+
private $checkedClasses = [];
3535

3636
public function __construct(?Configuration $configuration = null)
3737
{

src/ProxyManager/Factory/AccessInterceptorScopeLocalizerFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class AccessInterceptorScopeLocalizerFactory extends AbstractBaseFactory
2222
{
23-
private AccessInterceptorScopeLocalizerGenerator $generator;
23+
private $generator;
2424

2525
public function __construct(?Configuration $configuration = null)
2626
{
@@ -65,7 +65,7 @@ public function __construct(?Configuration $configuration = null)
6565
* interfaced (by design)
6666
*/
6767
public function createProxy(
68-
object $instance,
68+
$instance,
6969
array $prefixInterceptors = [],
7070
array $suffixInterceptors = []
7171
): AccessInterceptorInterface {

src/ProxyManager/Factory/AccessInterceptorValueHolderFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class AccessInterceptorValueHolderFactory extends AbstractBaseFactory
2424
{
25-
private AccessInterceptorValueHolderGenerator $generator;
25+
private $generator;
2626

2727
public function __construct(?Configuration $configuration = null)
2828
{
@@ -67,7 +67,7 @@ public function __construct(?Configuration $configuration = null)
6767
* interfaced (by design)
6868
*/
6969
public function createProxy(
70-
object $instance,
70+
$instance,
7171
array $prefixInterceptors = [],
7272
array $suffixInterceptors = []
7373
): AccessInterceptorValueHolderInterface {

src/ProxyManager/Factory/LazyLoadingGhostFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
class LazyLoadingGhostFactory extends AbstractBaseFactory
2121
{
22-
private LazyLoadingGhostGenerator $generator;
22+
private $generator;
2323

2424
public function __construct(?Configuration $configuration = null)
2525
{

src/ProxyManager/Factory/LazyLoadingValueHolderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
class LazyLoadingValueHolderFactory extends AbstractBaseFactory
1818
{
19-
private LazyLoadingValueHolderGenerator $generator;
19+
private $generator;
2020

2121
public function __construct(?Configuration $configuration = null)
2222
{

src/ProxyManager/Factory/NullObjectFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class NullObjectFactory extends AbstractBaseFactory
2222
{
23-
private NullObjectGenerator $generator;
23+
private $generator;
2424

2525
public function __construct(?Configuration $configuration = null)
2626
{

src/ProxyManager/Factory/RemoteObject/Adapter/BaseAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
*/
1515
abstract class BaseAdapter implements AdapterInterface
1616
{
17-
protected Client $client;
17+
protected $client;
1818

1919
/**
2020
* Service name mapping
2121
*
2222
* @var array<string, string>
2323
*/
24-
protected array $map = [];
24+
protected $map = [];
2525

2626
/**
2727
* Constructor

src/ProxyManager/Factory/RemoteObjectFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
*/
2222
class RemoteObjectFactory extends AbstractBaseFactory
2323
{
24-
protected AdapterInterface $adapter;
25-
private ?RemoteObjectGenerator $generator;
24+
protected $adapter;
25+
private $generator;
2626

2727
/**
2828
* {@inheritDoc}

0 commit comments

Comments
 (0)