Commit Graph
82 Commits
Author SHA1 Message Date
soumah 44dc31647a ACP2E-2015: Customizable Option Image link is broken 2023-06-01 09:37:52 -05:00
soumah fbfe0a9172 ACP2E-2015: Customizable Option Image link is broken 2023-05-31 16:57:50 -05:00
magento-team 6729b6e013 Updated deprecation doc annotations 2020-07-20 10:37:42 -07:00
Falk Ulbricht b536ccb820 MC-18221: remove todo and exclusions of exception
remove Required Refactoring see MC-19410 comments
phpcs:disable Magento2.Exceptions.ThrowCatch
2019-08-30 14:35:54 +02:00
Falk Ulbricht b92e1eb4d5 MC-18221: Fix static tests 2019-08-23 13:44:33 +02:00
roettigl 72934240c5 MC-18221: Clean up throw and catch ignores 2019-08-19 13:58:32 +02:00
nmalevanec 5bc05b22c1 Fix static tests. 2019-04-19 14:48:04 +03:00
nmalevanec 658b5a7beb Merge remote-tracking branch 'mainline/2.3-develop' into fixed-issue-19825 2019-04-19 14:22:30 +03:00
hiren pandya 6374f9ddd3 Resolve Rollback issue 2019-04-18 19:57:29 +05:30
hiren pandya fd92027ac2 Resolve issue of Backup tool not correctly detecting .maintenance.flag 2019-04-18 17:28:53 +05:30
Joan He 6b0fc4791e MC-14951: Create backup not working 2019-02-19 14:07:12 -06:00
Joan He ad18f73efe Merge remote-tracking branch 'upstream/2.3.0-qwerty' into 2.3.0-release-sync 2018-11-27 12:10:40 -06:00
Stanislav Idolov 842324af44 magento-engcom/magento2ce#2324: Fixed Code Style Issues 2018-11-09 15:02:27 +02:00
Mahesh Singh 3d0d8b7674 Issue #18150 fixed 2018-10-26 01:46:45 +05:30
Oleksandr Gorkun 96f608cca3 MAGETWO-94173: Disable backups by default 2018-10-08 13:17:58 +03:00
Oleksandr Gorkun de824cd441 Merge branch '2.3-develop' of https://github.com/magento/magento2ce into MAGETWO-93969 2018-09-13 13:44:11 +03:00
Tiago Sampaio 4b5ae00f06 Replaced deprecated methods. 2018-08-22 10:35:21 +03:00
Oleksandr Gorkun df2784b6de MAGETWO-93969: Declaring allowed HTTP methods for controllers 2018-08-06 17:47:31 +03:00
DianaRusin 032bfdd820 MAGETWO-85139: Cross-Site Request Forgery (Backups, maintenance mode) - Magento 1 & 2 2018-03-09 11:22:19 +02:00
DianaRusin 349ec442c3 MAGETWO-85139: Cross-Site Request Forgery (Backups, maintenance mode) - Magento 1 & 2 2018-03-06 15:59:03 +02:00
Oleksii Korshenko e60d3a2d8f MAGETWO-71174: Update doc block information in php classes with @deprecated and @since tags
- removed useless class docBlocks
2017-08-11 15:41:59 -05:00
Oleksii Korshenko b2ce2a37d9 MAGETWO-71174: Update doc block information in php classes with @deprecated and @since tags
- added @since tag to all @api classes
2017-08-11 15:26:37 -05:00
Oleksii Korshenko 56af1e73ce MAGETWO-71174: Update doc block information in php classes with @deprecated and @since tags
- removed @since 2.0.0 as it is a base release
 - updated version in @since and @deprecated tag taking into account all patch releases
2017-08-02 14:14:33 -05:00
Oleksii Korshenko bd74370771 MAGETWO-71174: Update doc block information in php classes with @deprecated and @since tags
- added release number to all existing @deprecated tag in php classes, methods and properties (app/code/Magento, lib/internal/Magento, setup/src/Magento/Setup)
 - added tag @since to all existing php classes, methods and properties (app/code/Magento, lib/internal/Magento, setup/src/Magento/Setup)
2017-07-28 15:43:18 -05:00
Viktor Paladiychuk 08b4d7d54b MAGETWO-60598: @api annotation coverage 2017-05-15 17:10:26 +03:00
Oleksii Korshenko 231709b4ac MAGETWO-66875: Remove the copyright year from file headers #8648 2017-03-29 19:37:54 +03:00
James Halsall a31f4a35c0 Remove the copyright year from file headers 2017-02-22 09:09:36 +00:00
Fabian Schmengler c9058d1458 Use page result instead of rendering layout directly in controller actions 2017-02-04 13:04:34 +00:00
Sergii Kovalenko eb30343a09 MAGETWO-62855: Copyright Year Update 2017 2017-01-05 13:01:45 +02:00
Stanislav Idolov 59d5c72b90 MAGETWO-51858: Convert literal class names to \Namespace\Classname::class 2016-04-29 12:23:09 +03:00
Joan He 2d368d0134 MAGETWO-48081: Copyright Year Update 2016-03-17 15:49:11 -05:00
Nathan McBride 148bae13d7 Issue #2361: Allow AbstractAction to handle _isAllowed() logic
Now `AbstractAction::_isAllowed()` is using a static binding, we
can simply define the `ADMIN_RESOURCE` constant in our controllers.
2016-02-16 14:42:13 +00:00
Yu Tang d86912af74 Revert "MAGETWO-44491: [TD] ActionInterface has Method dispatch() Instead of execute()"
This reverts commit 9dcfff78d4.
2015-10-29 15:30:02 -05:00
Yu Tang 9dcfff78d4 MAGETWO-44491: [TD] ActionInterface has Method dispatch() Instead of execute() 2015-10-23 15:12:59 -05:00
Serhiy Shkolyarenko c945a59f14 MAGETWO-41527: PHP 7 namespace strict compatibility
- Updated Magento_Backup module for PHP 7 compatibility
2015-10-06 17:38:27 +03:00
Olexii Korshenko 93312cae42 MAGETWO-37817: Adaptation of code to PHP7
- Renamed classes and namespaces with reserved words (Object, String, Null, Boolean, etc.)
- Updated dependencies
2015-07-29 17:55:58 +03:00
Eugene Tulika 5fe4e5a5cd Merge commit 'refs/pull/1454/head' of https://github.com/magento/magento2 into MAGETWO-40183 2015-07-14 16:40:02 -05:00
Eugene Tulika a3275438ad Merge commit 'refs/pull/1416/head' of https://github.com/magento/magento2 into MAGETWO-40183
Conflicts:
	app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php
	app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php
	app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php
	app/code/Magento/Ui/Controller/Adminhtml/AbstractAction.php
2015-07-14 16:39:36 -05:00
Mark Shust a9f97fc16f Permissions not set correctly #1453 2015-07-07 23:48:47 -04:00
Vinai Kopp f8c8f556ba Add abstract method execute() to \Magento\Framework\App\Action\Action
Purpose
==

Make implementing Actions more developer friendly via self-documenting code.

Background
==

The existing method `\Magento\Framework\App\Action\Action::dispatch()` calls
an `execute()` method without actually implementing it.

```php
$result = $this->execute();
```

Any subclass actions simply need to implement that method and it will be
called automatically when the superclass method is `dispatch()` is called.

Without the changes in this PR, the `execute()` method in effect was part
of an implicit interface exposed by the `Action` class.

Because of this the `Action` class could never be instantiated and used (that
is, dispatched), without first subclassing it.
This in turn makes the `Action` class an implicitly abstract class.

All this PR does it that it makes the class interface explicit by adding the
execute method as an abstract method to `\Magento\Framework\App\Action\Action`.

All the other changes in this PR are just follow-up changes to accommodate
for this one update.

Follow up changes
--

Because concrete classes can't have abstract methods, the `Action` class
itself also had to be made abstract.

A number of subclasses of `Action` that did not implement `execute()`,
because they themselves also needed to be extended, had to be declared as
abstract classes now, too, because they inherit the abstract method from
the `Action` superclass.

There where some tests that instantiated these implicitly abstract classes.
This PR adds stub implementations for each of these.

* `Magento\Checkout\Test\Unit\Controller\OnepageTest`
  in app/code/Magento/Checkout/Test/Unit/Controller/
* `Magento\Contact\Test\Unit\Controller\IndexTest`
  in app/code/Magento/Contact/Test/Unit/Controller/
* `Magento\Tax\Test\Unit\App\Action\ContextPluginTest`
  in app/code/Magento/Tax/Test/Unit/App/Action/
* `Magento\Catalog\Helper\Product\ViewTest`
  in dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/
* `Magento\Cms\Helper\PageTest`
  in dev/tests/integration/testsuite/Magento/Cms/Helper/Stub/
* `Magento\Sales\Controller\Adminhtml\Order\CreateTest`
  in dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/

Finally, the `Magento\Ui\Controller\UiActionInterface` class, which was
implemented by an abstract subclass of `Action`, namely
`\Magento\Ui\Controller\Adminhtml\AbstractAction`, contained a
`public function execute();` itself.
This explicit interface contract was in conflict with the implicit interface
of the `Action` class, which did defined the same method, but implicitly.

To resolve this conflict this PR changes the method exposed by the
`UiActionInterface` to `public function executeAjaxRequest();`. This
seemed the most fitting when looking at the code implementing the interface
method. Internally it only calls the now explicit `execute()` method inherited
from the `Action` interface.

Also, it seems as if the `UiActionInterface::execute()` method was only called
by a single test. However, I realize the method might be used a lot more in the
non-public EE code, which will also need to be adjusted to be compatible with
this PR.

Reasons for this PR
==

As stated above, the purpose of this PR is to make the developer experience
better. This is done by making an implicit interface explicit. This has
a whole number of benefits, besides being good OOP practice:

* It is clear which classes should be instantiated and which should not
* It is clear which method needs to be implemented when subclassing `Action`
* The expected return type of `execute()` is documented in the phpdoc block
* When subclassing `Action` the IDE can be used to quickly a method stub

Allover the changes lead to more self-documenting code that tells developers
to they should use it.

Potential issues
==

The explicit abstract `execute()` method added in this PR is declared with
protected visibility.
This basically removes it as a valid extension point for plugins. However,
since the method was not declared as public previously (in fact, is wasn't
declared at all), it should not have been used as an extension point for
plugins anyway.

So the main reason against this PR I can think of is that the EE code will
need to be adjusted (plus, I might be missing many obvious reasons).
Of course I'd be happy to make the required updates, but I realize that is
problematic due to the commercial licenced, non-open code.
I've got a bunch of hacky shell scripts to find and update any controllers
needed to be declared abstract, but I'd rather not share them as they are just
one-time hacks.
All the other changes - updating the ui action interface and the test stubs -
where done manually and didn't take long.
2015-06-26 16:04:15 +02:00
Dmytro Vilchynskyi 8c1618874c MAGETWO-36129: Update Content in Magento 2 by Modules - part 1
- fixes after CR
2015-06-08 19:09:23 +03:00
Dmytro Vilchynskyi 7d9005ec45 MAGETWO-36129: Update Content in Magento 2 by Modules - part 1
- content for several modules was changed
2015-06-05 17:31:13 +03:00
Dmytro Vilchynskyi 194ef26fa2 MAGETWO-36129: Update Content in Magento 2 by Modules - part 1
- content for several modules was changed
2015-06-04 17:09:26 +03:00
Dmytro Vilchynskyi 9adb6e01ad MAGETWO-36129: Update Content in Magento 2 by Modules - part 1
- content for several modules was changed
2015-06-03 19:46:56 +03:00
Yurii Torbyk b1254565d4 Merge remote-tracking branch 'origin/MAGETWO-26762' into MAGETWO-34991-new
Conflicts:
	app/code/Magento/Backup/Model/Backup.php
	app/code/Magento/Catalog/Controller/Adminhtml/Product/MassStatus.php
	dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
	lib/internal/Magento/Framework/App/FrontController.php
	lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php
2015-03-30 11:19:10 +03:00
Yurii Torbyk 6d59375c52 MAGETWO-34991: Eliminate exceptions from the list Part2 2015-03-26 17:33:05 +02:00
Dmytro Poperechnyy eda7bae1cd MAGETWO-34989: Implement getDefaultRedirect() method
- DocBlocks updated;
- Protected variable context removed from AbstractAction;
2015-03-20 16:19:35 +02:00
Maddy Chellathurai 720ab799d4 Merge remote-tracking branch 'ogresce/MAGETWO-14569-invalid-method-call-grid' into develop 2015-03-05 09:44:01 -06:00
Yuri Kovsher 3876c512f9 MAGETWO-34383: Pull request & cleanup 2015-02-24 13:10:18 +02:00
vpaladiychuk ea4134023f MAGETWO-2204: "HEADERS ALREADY SENT" When Controller Action Outputs Directly 2015-02-13 16:55:09 +02:00