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

PHPStan fixes #4405

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
72f9395
fatal
sreichel Dec 7, 2024
4c008f6
fatal
sreichel Dec 7, 2024
124376c
fatal
sreichel Dec 7, 2024
8bd542c
unused
sreichel Dec 7, 2024
832a98c
unused
sreichel Dec 7, 2024
5c9e4c3
baseline
sreichel Dec 7, 2024
908d003
phpstan2
sreichel Dec 7, 2024
cddc160
phpmd doc fix
sreichel Dec 7, 2024
617f6d5
baseline
sreichel Dec 7, 2024
abb6706
composer.lock
sreichel Dec 7, 2024
cbaf906
Merge branch 'main' into phpstan-clean
sreichel Dec 7, 2024
5de452c
rector
sreichel Dec 7, 2024
10f56aa
Merge branch 'main' into phpstan-clean
sreichel Dec 25, 2024
1790229
Merge branch 'main' into phpstan-clean
sreichel Jan 6, 2025
0674432
Merge branch 'main' into phpstan-clean
sreichel Jan 9, 2025
044011a
Merge branch 'main' into phpstan-clean
sreichel Jan 11, 2025
d69ff57
Merge branch 'main' into phpstan-clean
sreichel Jan 15, 2025
4e3c2e0
Merge branch 'main' into phpstan-clean
sreichel Jan 15, 2025
0b937af
remove - instead of adding required methods
sreichel Jan 15, 2025
17fb177
phpstan
sreichel Jan 15, 2025
680498f
phpstan baseline
sreichel Jan 15, 2025
2919281
phpstan ignore
sreichel Jan 15, 2025
0b4935e
revert
sreichel Jan 16, 2025
ae2dc39
baseline
sreichel Jan 16, 2025
68722a8
update
sreichel Jan 17, 2025
6ff253b
update + baseline
sreichel Jan 18, 2025
8cfada5
update + baseline
sreichel Jan 18, 2025
b6de49e
update + fix
sreichel Jan 18, 2025
ec7520c
updated config
sreichel Jan 18, 2025
b397128
update + baseline
sreichel Jan 18, 2025
d238a89
Merge branch 'main' into phpstan-clean
sreichel Jan 18, 2025
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
Prev Previous commit
Next Next commit
Merge branch 'main' into phpstan-clean
# Conflicts:
#	.phpstan.dist.neon
#	app/code/core/Mage/Core/Model/Cookie.php
sreichel committed Jan 15, 2025
commit d69ff57e86aa28293b6ccbb0d29667eef661fb99
123 changes: 122 additions & 1 deletion .phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -23,11 +23,132 @@ parameters:
- shell
- tests/unit
excludePaths:
# check later
#incompatible interfaces
- app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php
- app/code/core/Mage/Admin/Model/Acl/Assert/Time.php
- app/code/core/Mage/Api/Model/Acl/Assert/Ip.php
- app/code/core/Mage/Api/Model/Acl/Assert/Time.php
- app/code/core/Mage/Core/Model/Mysql4/Design/Theme/Collection.php
- lib/Varien/Directory/Collection.php
- lib/Varien/Directory/Factory.php
- lib/Varien/File/Object.php

# deprecated _getHelper()
- app/code/core/Mage/Adminhtml/Controller/Rss/Abstract.php
- app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php
- app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php

# contains 1 abstract method and must therefore be declared abstract or implement the remaining methods
- app/code/core/Mage/Dataflow/Model/Session/Adapter/Http.php
- app/code/core/Mage/Dataflow/Model/Convert/Iterator/Http.php
- app/code/core/Mage/Dataflow/Model/Convert/Iterator/File/Csv.php
- lib/Varien/Convert/Validator/Column.php

# Cannot declare class Varien_Date, because the name is already in use
- app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php

# Cannot declare class XMLParser, because the name is already in use
- app/code/core/Mage/Centinel/Model/Api.php
- app/code/core/Mage/Centinel/Model/Api/Client.php

# Class phpseclib\Net\SSH2 not found.
- app/code/core/Mage/Paypal/Model/Report/Settlement.php
- lib/Varien/Io/Sftp.php

# Dataflow/Model/Convert/Iterator.php
- app/code/core/Mage/Dataflow/Model/Convert/Iterator.php

# Too much noise from "Variable $this might not be defined"
- app/code/core/*/*/data/*
- app/code/core/*/*/sql/*

# requires Mycrypt
- lib/Magento/Crypt.php
- lib/Varien/Crypt/Mcrypt.php

# Instantiated class not found
- lib/Varien/Image/Adapter.php
ignoreErrors:
-
# @todo remove unused classes/template
# @todo add classes to widgets
message: '#^Variable \$this might not be defined\.$#'
paths:
- app/design/adminhtml/default/default/template/api/usernroles.phtml
- app/design/adminhtml/default/default/template/dashboard/searches.phtml
- app/design/adminhtml/default/default/template/dashboard/store/switcher.phtml
- app/design/adminhtml/default/default/template/empty.phtml
- app/design/adminhtml/default/default/template/overlay_popup.phtml
- app/design/adminhtml/default/default/template/popup.phtml
- app/design/adminhtml/default/default/template/promo/form.phtml
- app/design/adminhtml/default/default/template/rating/stars/detailed.phtml
- app/design/adminhtml/default/default/template/review/add.phtml
- app/design/adminhtml/default/default/template/sales/billing/agreement/form.phtml
- app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml
- app/design/adminhtml/default/default/template/sales/order/shipment/create/items/renderer/configurable.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/discount.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/due.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/footer.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/grand.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/item.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/main.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/paid.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/refunded.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/shipping.phtml
- app/design/adminhtml/default/default/template/sales/order/totals/subtotal.phtml
- app/design/adminhtml/default/default/template/sales/order/view/tracking.phtml
- app/design/adminhtml/default/default/template/system/info.phtml
- app/design/adminhtml/default/default/template/tax/class/page/edit.phtml
- app/design/adminhtml/default/default/template/tax/toolbar/class/save.phtml
- app/design/adminhtml/default/default/template/tax/toolbar/rule/save.phtml
- app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml
- app/design/frontend/base/default/template/bundle/catalog/product/view/options/notice.phtml
- app/design/frontend/base/default/template/catalog/category/page.phtml
- app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml
- app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml
- app/design/frontend/base/default/template/catalog/product/view/price.phtml
- app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml
- app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml
- app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml
- app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml
- app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml
- app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml
- app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml
- app/design/frontend/base/default/template/checkout/cart/render/default.phtml
- app/design/frontend/base/default/template/checkout/cart/render/simple.phtml
- app/design/frontend/base/default/template/cms/widget/link/link_block.phtml
- app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml
- app/design/frontend/base/default/template/cms/widget/static_block/default.phtml
- app/design/frontend/base/default/template/core/messages.phtml
- app/design/frontend/base/default/template/customer/address.phtml
- app/design/frontend/base/default/template/customer/balance.phtml
- app/design/frontend/base/default/template/customer/form/address.phtml
- app/design/frontend/base/default/template/customer/form/changepassword.phtml
- app/design/frontend/base/default/template/customer/orders.phtml
- app/design/frontend/base/default/template/customer/wishlist.phtml
- app/design/frontend/base/default/template/directory/currency/switch.phtml
- app/design/frontend/base/default/template/page/redirect.phtml
- app/design/frontend/base/default/template/paypal/hss/review/button.phtml
- app/design/frontend/base/default/template/reports/widget/compared/column/compared_default_list.phtml
- app/design/frontend/base/default/template/reports/widget/compared/column/compared_images_list.phtml
- app/design/frontend/base/default/template/reports/widget/compared/column/compared_names_list.phtml
- app/design/frontend/base/default/template/reports/widget/compared/content/compared_grid.phtml
- app/design/frontend/base/default/template/reports/widget/compared/content/compared_list.phtml
- app/design/frontend/rwd/default/template/catalog/product/widget/new/column/new_default_list.phtml
- app/design/frontend/rwd/default/template/catalog/product/widget/new/column/new_images_list.phtml
- app/design/frontend/rwd/default/template/catalog/product/widget/new/column/new_names_list.phtml
- app/design/frontend/rwd/default/template/catalog/product/widget/new/content/new_list.phtml
- app/design/frontend/rwd/default/template/checkout/cart/render/default.phtml
- app/design/frontend/rwd/default/template/checkout/cart/render/simple.phtml
- app/design/frontend/rwd/default/template/customer/form/address.phtml
- app/design/frontend/rwd/default/template/customer/form/changepassword.phtml
- app/design/frontend/rwd/default/template/paypal/express/review/address.phtml
- app/design/frontend/rwd/default/template/reports/widget/compared/column/compared_default_list.phtml
- app/design/frontend/rwd/default/template/reports/widget/compared/column/compared_images_list.phtml
- app/design/frontend/rwd/default/template/reports/widget/compared/column/compared_names_list.phtml
- app/design/frontend/rwd/default/template/reports/widget/compared/content/compared_grid.phtml
- app/design/frontend/rwd/default/template/reports/widget/compared/content/compared_list.phtml
- app/design/install/default/default/template/page.phtml
tmpDir: .phpstan.cache
level: 5
checkFunctionNameCase: true
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Cookie.php
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ public function set($name, $value, $period = null, $path = null, $domain = null,

setcookie(
$name,
(string)$value,
(string) $value,
[
'expires' => $expire,
'path' => $path,
You are viewing a condensed version of this merge commit. You can view the full changes here.