magento / magento-zend-db

BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

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

Closed hostep closed 1 year ago

hostep commented 1 year ago

Fixes deprecation warnings with PHP 8.2: Creation of dynamic property xxx is deprecated

Found with phpstan:

  1. Have latest version of phpstan installed somewhere (I've used version 1.10.15)
  2. Clone this repo
  3. Inside the repo, run:
    $ /path/to/phpstan analyse --level=0 . | grep 'Access to an undefined property'
  4. Expected to see no errors, but seeing:
    78     Access to an undefined property Zend_Db_Adapter_Pdo_Abstract::$_pdoType.
    107    Access to an undefined property Zend_Db_Adapter_Pdo_Abstract::$_pdoType.
    112    Access to an undefined property Zend_Db_Adapter_Pdo_Abstract::$_pdoType.

PR fixes:

This fixes one of the warnings mentioned in https://github.com/magento/adobe-commerce-beta/issues/61, If I find more time and this PR actually gets approved, I might try to tackle the others as well one day.