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

Removed @deprecation on Mage::getBlockSingleton() #3835

Merged
merged 11 commits into from
Apr 5, 2024

Conversation

kiatng
Copy link
Contributor

@kiatng kiatng commented Feb 15, 2024

It is referenced in 23 files. The comment stated that it should be replaced by Mage::helper(), but that is a totally different function.

@github-actions github-actions bot added the Mage.php Relates to app/Mage.php label Feb 15, 2024
@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Feb 16, 2024
@github-actions github-actions bot added the Component: PayPal Relates to Mage_Paypal label Feb 16, 2024
@kiatng
Copy link
Contributor Author

kiatng commented Feb 16, 2024

I have no idea how to fix the PHPStan errors. I never tried to run it locally. But when I tried, I encountered this:

PS D:\Work\Magento\OpenMage\magento-lts> vendor/bin/phpstan analyse --memory-limit 1G --debug
Note: Using configuration file D:\Work\Magento\OpenMage\magento-lts\phpstan.dist.neon.
D:\Work\Magento\OpenMage\magento-lts\api.php
Uncaught Error: Class "Mage_Core_Model_Config_Base" not found in D:\Work\Magento\OpenMage\magento-lts\vendor\macopedia\phpstan-magento1\src\Config\MagentoCore.php:13
#0 phar://D:/Work/Magento/OpenMage/magento-lts/vendor/phpstan/phpstan/phpstan.phar/vendor/composer/ClassLoader.php(576): include()
...
#32 D:\Work\Magento\OpenMage\magento-lts\vendor\phpstan\phpstan\phpstan(8): require('...')
#33 {main}

Not sure how to fix the autoload in phpstan. Any idea?

@fballiano
Copy link
Contributor

@kiatng I don't know windows much but I think using something like ddev makes this kind of things much easier

@kiatng
Copy link
Contributor Author

kiatng commented Feb 16, 2024

I was trying to install DDEV the other day and spent a few hours on it but encountered an error and didn't pursue further. I will try again when I have the time.

@fballiano fballiano marked this pull request as draft February 29, 2024 09:32
@fballiano fballiano marked this pull request as ready for review April 5, 2024 16:16
@fballiano fballiano merged commit 095ed12 into OpenMage:main Apr 5, 2024
14 checks passed
@kiatng kiatng deleted the un_deprecate_getBlockSingleton branch April 8, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Adminhtml Relates to Mage_Adminhtml Component: PayPal Relates to Mage_Paypal Mage.php Relates to app/Mage.php
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants