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

Fixed PHP 8.2 deprecation warnings: 'creation of dynamic property'. #1

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
8 changes: 7 additions & 1 deletion library/Zend/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
#[\AllowDynamicProperties]
class Zend_Pdf
{
/**** Class Constants ****/
Expand Down Expand Up @@ -207,6 +206,13 @@ class Zend_Pdf
*/
protected $_parser;

/**
* PDF version specified in the file header
*
* @var string
*/
protected $_pdfHeaderVersion;

/**
* List of inheritable attributesfor pages tree
*
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Pdf/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,6 @@ public function hasChildren()
#[\ReturnTypeWillChange]
public function count()
{
return count($this->childOutlines);
return count($this->next);
}
}
2 changes: 1 addition & 1 deletion library/Zend/Pdf/Canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct($width, $height)
*/
protected function _addProcSet($procSetName)
{
$this->_procset[$procSetName] = 1;
$this->_procSet[$procSetName] = 1;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions library/Zend/Pdf/Canvas/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ abstract class Zend_Pdf_Canvas_Abstract implements Zend_Pdf_Canvas_Interface
*/
protected $_style = null;

/**
* Page dictionary (refers to an inderect Zend_Pdf_Element_Dictionary object).
*
* @var Zend_Pdf_Element_Reference|Zend_Pdf_Element_Object
*/
protected $_dictionary;


/**
* Counter for the "Save" operations
Expand Down
7 changes: 7 additions & 0 deletions library/Zend/Pdf/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ abstract class Zend_Pdf_Element
*/
private $_parentObject = null;

/**
* Object value
*
* @var string
*/
public $value;

/**
* Return type of the element.
* See ZPdfPDFConst for possible values
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Pdf/Element/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
*/
class Zend_Pdf_Element_Boolean extends Zend_Pdf_Element
{
/**
* Object value
*
* @var boolean
*/
public $value;


/**
* Object constructor
*
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Pdf/Element/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
*/
class Zend_Pdf_Element_Name extends Zend_Pdf_Element
{
/**
* Object value
*
* @var string
*/
public $value;


/**
* Object constructor
*
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Pdf/Element/Null.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
*/
class Zend_Pdf_Element_Null extends Zend_Pdf_Element
{
/**
* Object value. Always null.
*
* @var mixed
*/
public $value;


/**
* Object constructor
*/
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Pdf/Element/Numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
*/
class Zend_Pdf_Element_Numeric extends Zend_Pdf_Element
{
/**
* Object value
*
* @var numeric
*/
public $value;


/**
* Object constructor
*
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Pdf/Element/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
*/
class Zend_Pdf_Element_Stream extends Zend_Pdf_Element
{
/**
* Object value
*
* @var Zend_Memory_Container
*/
public $value;


/**
* Object constructor
*
Expand Down
7 changes: 0 additions & 7 deletions library/Zend/Pdf/Element/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@
*/
class Zend_Pdf_Element_String extends Zend_Pdf_Element
{
/**
* Object value
*
* @var string
*/
public $value;

/**
* Object constructor
*
Expand Down
43 changes: 43 additions & 0 deletions library/Zend/Pdf/Outline.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,49 @@ abstract class Zend_Pdf_Outline implements RecursiveIterator, Countable
*/
protected $_open = false;

/**
* Outline title.
*
* @var string
*/
protected $_title;

/**
* True if outline item is displayed in italic.
* Default value is false.
*
* @var boolean
*/
protected $_italic = false;

/**
* Color to be used for the outline entry’s text.

* It uses the DeviceRGB color space for color representation.
* Null means default value - black ([0.0 0.0 0.0] in RGB representation).
*
* @var Zend_Pdf_Color_Rgb
*/
protected $_color = null;

/**
* True if outline item is displayed in bold.
* Default value is false.
*
* @var boolean
*/
protected $_bold = false;

/**
* Target destination or action.
* String means named destination
*
* Null means no target.
*
* @var Zend_Pdf_Destination|Zend_Pdf_Action
*/
protected $_target = null;

/**
* Array of child outlines (array of Zend_Pdf_Outline objects)
*
Expand Down
44 changes: 0 additions & 44 deletions library/Zend/Pdf/Outline/Created.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,6 @@
*/
class Zend_Pdf_Outline_Created extends Zend_Pdf_Outline
{
/**
* Outline title.
*
* @var string
*/
protected $_title;

/**
* Color to be used for the outline entry’s text.

* It uses the DeviceRGB color space for color representation.
* Null means default value - black ([0.0 0.0 0.0] in RGB representation).
*
* @var Zend_Pdf_Color_Rgb
*/
protected $_color = null;

/**
* True if outline item is displayed in italic.
* Default value is false.
*
* @var boolean
*/
protected $_italic = false;

/**
* True if outline item is displayed in bold.
* Default value is false.
*
* @var boolean
*/
protected $_bold = false;

/**
* Target destination or action.
* String means named destination
*
* Null means no target.
*
* @var Zend_Pdf_Destination|Zend_Pdf_Action
*/
protected $_target = null;


/**
* Get outline title.
*
Expand Down
7 changes: 0 additions & 7 deletions library/Zend/Pdf/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ class Zend_Pdf_Page extends Zend_Pdf_Canvas_Abstract



/**
* Page dictionary (refers to an inderect Zend_Pdf_Element_Dictionary object).
*
* @var Zend_Pdf_Element_Reference|Zend_Pdf_Element_Object
*/
protected $_dictionary;

/**
* PDF objects factory.
*
Expand Down
3 changes: 1 addition & 2 deletions library/Zend/Pdf/Resource/Font/CidFont.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
#[\AllowDynamicProperties]
abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
{
/**
Expand Down Expand Up @@ -99,7 +98,7 @@ public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)

$this->_isBold = $fontParser->isBold;
$this->_isItalic = $fontParser->isItalic;
$this->_isMonospaced = $fontParser->isMonospaced;
$this->_isMonospace = $fontParser->isMonospaced;

$this->_underlinePosition = $fontParser->underlinePosition;
$this->_underlineThickness = $fontParser->underlineThickness;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Pdf/Resource/Font/Simple/Parsed.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)

$this->_isBold = $fontParser->isBold;
$this->_isItalic = $fontParser->isItalic;
$this->_isMonospaced = $fontParser->isMonospaced;
$this->_isMonospace = $fontParser->isMonospaced;

$this->_underlinePosition = $fontParser->underlinePosition;
$this->_underlineThickness = $fontParser->underlineThickness;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function __construct()

$this->_isBold = false;
$this->_isItalic = false;
$this->_isMonospaced = true;
$this->_isMonospace = true;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = false;
$this->_isMonospaced = true;
$this->_isMonospace = true;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = true;
$this->_isMonospaced = true;
$this->_isMonospace = true;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function __construct()

$this->_isBold = false;
$this->_isItalic = true;
$this->_isMonospaced = true;
$this->_isMonospace = true;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function __construct()

$this->_isBold = false;
$this->_isItalic = false;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = false;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = true;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function __construct()

$this->_isBold = false;
$this->_isItalic = true;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function __construct()

$this->_isBold = false;
$this->_isItalic = false;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = false;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function __construct()

$this->_isBold = true;
$this->_isItalic = true;
$this->_isMonospaced = false;
$this->_isMonospace = false;

$this->_underlinePosition = -100;
$this->_underlineThickness = 50;
Expand Down
Loading