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

Added method to make use of Mage_Core_Model_Security_HtmlEscapedString easier #4123

Merged
merged 22 commits into from
Sep 6, 2024

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jul 27, 2024

  • added new methods to not have initialize class manually
  • added missing docblocs + copyright header
  • updated/unified some docblock

Better name for that method?

* Rector: CQ - UnusedForeachValueToArrayKeysRector

See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector

* fixes + phpstan

See fix at rector: rectorphp/rector-src#6164
@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Adminhtml Relates to Mage_Adminhtml Component: Page Relates to Mage_Page labels Jul 27, 2024
@github-actions github-actions bot added the Mage.php Relates to app/Mage.php label Jul 28, 2024
@sreichel sreichel changed the title Updates for 20.10.1 release Added method to make use of Mage_Core_Model_Security_HtmlEscapedString easier Jul 28, 2024
@sreichel sreichel marked this pull request as ready for review July 28, 2024 16:32
@sreichel
Copy link
Contributor Author

sreichel commented Jul 29, 2024

@Flyingmana thanks for review, but i dont like the method-name ... any better suggestions?

  • escapeHtmlAsSecureObject
  • escapeHtmlToSecuredObject
  • escapeHtmlAndKeepOriginalValue
  • escapeHtmlWithKeepOriginalValue
  • ...

sreichel added a commit to sreichel/magento-lts that referenced this pull request Aug 5, 2024
@kiatng
Copy link
Contributor

kiatng commented Aug 7, 2024

@Flyingmana thanks for review, but i dont like the method-name ... any better suggestions?

  • escapeHtmlAsSecureObject
  • escapeHtmlToSecuredObject
  • escapeHtmlAndKeepOriginalValue
  • escapeHtmlWithKeepOriginalValue
  • ...

Name it as it is: getCoreModelSecurityHtmlEscapedString(), getCoreModelsSecurityHtmlEscapedString()

sreichel and others added 2 commits August 7, 2024 05:53
@sreichel
Copy link
Contributor Author

sreichel commented Aug 7, 2024

I do not like such long names, but finally you are right. "Name it as it is" 👍

kiatng
kiatng previously approved these changes Aug 7, 2024
addison74
addison74 previously approved these changes Aug 7, 2024
@sreichel sreichel merged commit 4e73e60 into OpenMage:main Sep 6, 2024
15 checks passed
@sreichel sreichel deleted the escape branch September 6, 2024 15:30
sreichel added a commit that referenced this pull request Sep 17, 2024
* Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)

* Rector: CQ - UnusedForeachValueToArrayKeysRector

See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector

* fixes + phpstan

See fix at rector: rectorphp/rector-src#6164

* Updated test

* Added test

* Added test

* Renamed and updated test

* Updated test

* Updated test

* Updated test

* Updated test

* Revert "Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)"

This reverts commit 3d7eaf6.

* Updated test (phpstan L9)

* Updated test (fixed namespace)

* Updated test (phpstan L9)

* Added unit test to code style check and phpstan

* Some cleanup

* Some cleanup

* Some cleanup

* Updated workflow

* ddev shortcut [ski ci]

* Moved phphunit config file

* Merged phpunit & sonar workflow

* PhpUnit fix

 - PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/runner/work/magento-lts/magento-lts/lib/Varien/Object.php on line 594

* Fix linefeed (?)

* Fix config

* Fixed invalid php version

* Use minimum version

* Use minimum version for SonarScan

* Fix command [ski ci]

* Enable xdebug

* Added test, ref #4123

* Revert "Some cleanup"

This reverts commit 6d45ed6.

* Revert "PhpUnit fix"

This reverts commit f4935f1.

* Updated test

* Updated docblocks

* Revert "Fix linefeed (?)"

This reverts commit dee0422.

* Added tests

* Added tests

* Added tests [skip ci]

* Reverted changes to Mage_Core_Model_Website

* Updated config

* Updated .gitignore

* Updated workflow

* Updated workflow typo

* Updated workflow continue on error

* Updated workflow if condition

* Updated workflow [skip ci]

* Moved tests to root (as common)

* Fixed paths

* Fixed paths

* Fixed paths

* CS fix

* Added test

* Added test

* Added groups/suites

* Updated test

* CS fix

* Updated .gitignore

* Updated phpunit.xml.dist

* Added test

* Added tests

* Added tests

* Added tests

* Added tests

* CS fix

* CS fix

* Added tests

* Added tests

* Added tests

* Added tests

* CS/PhpStan fixes

* Update

- some tests commented - need files changes

* Nicer output?

* Don't wait for phpcs

* Revert output

* Updated workflows

* Added test

* Added phpunit command to composer.json

* Updated DDEV commands

* Updated composer scripts

---------

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
addison74 pushed a commit that referenced this pull request Sep 18, 2024
* Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)

* Rector: CQ - UnusedForeachValueToArrayKeysRector

See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector

* fixes + phpstan

See fix at rector: rectorphp/rector-src#6164

* Updated test

* Added test

* Added test

* Renamed and updated test

* Updated test

* Updated test

* Updated test

* Updated test

* Revert "Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)"

This reverts commit 3d7eaf6.

* Updated test (phpstan L9)

* Updated test (fixed namespace)

* Updated test (phpstan L9)

* Added unit test to code style check and phpstan

* Some cleanup

* Some cleanup

* Some cleanup

* Updated workflow

* ddev shortcut [ski ci]

* Moved phphunit config file

* Merged phpunit & sonar workflow

* PhpUnit fix

 - PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/runner/work/magento-lts/magento-lts/lib/Varien/Object.php on line 594

* Fix linefeed (?)

* Fix config

* Fixed invalid php version

* Use minimum version

* Use minimum version for SonarScan

* Fix command [ski ci]

* Enable xdebug

* Added test, ref #4123

* Revert "Some cleanup"

This reverts commit 6d45ed6.

* Revert "PhpUnit fix"

This reverts commit f4935f1.

* Updated test

* Updated docblocks

* Revert "Fix linefeed (?)"

This reverts commit dee0422.

* Added tests

* Added tests

* Added tests [skip ci]

* Reverted changes to Mage_Core_Model_Website

* Updated config

* Updated .gitignore

* Updated workflow

* Updated workflow typo

* Updated workflow continue on error

* Updated workflow if condition

* Updated workflow [skip ci]

* Moved tests to root (as common)

* Fixed paths

* Fixed paths

* Fixed paths

* CS fix

* Added test

* Added test

* Added groups/suites

* Updated test

* CS fix

* Updated .gitignore

* Updated phpunit.xml.dist

* Added test

* Added tests

* Added tests

* Added tests

* Added tests

* CS fix

* CS fix

* Added tests

* Added tests

* Added tests

* Added tests

* CS/PhpStan fixes

* Update

- some tests commented - need files changes

* Nicer output?

* Don't wait for phpcs

* Revert output

* Updated workflows

* Added test

* Added phpunit command to composer.json

* Updated DDEV commands

* Fixed phpunit commands at composer.json

* WIP

* phpcs and phpstan fixes

* Updated tests

* Moved test to correct directory

* Added tests

---------

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
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: Core Relates to Mage_Core Component: Page Relates to Mage_Page Mage.php Relates to app/Mage.php
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants