Skip to content

Commit

Permalink
Add missing properties to classes Zend/View/*
Browse files Browse the repository at this point in the history
PHP 8.2: Dynamic Properties are deprecated fix

Reference: https://php.watch/versions/8.2/dynamic-properties-deprecated

Verified by:
docker run -u "$(id -u):$(id -g)" -v $(pwd):$(pwd) -w $(pwd) -t --rm php:8.2-rc-cli-alpine -d memory_limit=-1 ./bin/phpunit -v --bootstrap tests/TestHelper.php tests/Zend/View/AllTests.php
  • Loading branch information
hungtrinh committed Nov 29, 2022
1 parent 920708a commit f269ec7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/Zend/View/Helper/Partial.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
*/
class Zend_View_Helper_Partial extends Zend_View_Helper_Abstract
{
/**
* @var int
*/
protected $partialCounter = 0;

/**
* @var int
*/
protected $partialTotalCount = 0;

/**
* Variable to which object will be assigned
* @var string
Expand Down
6 changes: 6 additions & 0 deletions library/Zend/View/Helper/Placeholder/Container/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
*/
abstract class Zend_View_Helper_Placeholder_Container_Abstract extends ArrayObject
{
/**
* View object
* @var Zend_View_Interface|null
*/
public $view = null;

/**
* Whether or not to override all contents of placeholder
* @const string
Expand Down
6 changes: 6 additions & 0 deletions library/Zend/View/Helper/Placeholder/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
*/
class Zend_View_Helper_Placeholder_Registry
{
/**
* View object
* @var Zend_View_Interface|null
*/
public $view = null;

/**
* Zend_Registry key under which placeholder registry exists
* @const string
Expand Down

0 comments on commit f269ec7

Please sign in to comment.