Commit Graph

60 Commits

Author SHA1 Message Date
3d31f1f030 Fix PHPStan callback error introduced after update to version 0.12.83
This commit fixes the following PHPStan errors introduced after the
update to version 0.12.83:

```
 ------ ----------------------------------------------------------------------
  Line   lib/Listing/Handler.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $callback of function call_user_func_array expects
         callable(): mixed, array(class-string|object, 'listingQuery') given.
  45     Parameter #1 $callback of function call_user_func_array expects
         callable(): mixed, array(class-string|object, 'groups') given.
  54     Parameter #1 $callback of function call_user_func_array expects
         callable(): mixed, array(class-string|object, 'filters') given.
  62     Parameter #1 $callback of function call_user_func_array expects
         callable(): mixed, array(class-string|object, 'listingQuery') given.
 ------ ----------------------------------------------------------------------
```

It was necessary to use both is_callable() and method_exists() instead
of just is_callable(), as a parent class of the model classes implements
__call() and thus is_callable() always returns true even when the
method doesn't exist (and in those cases method_exists() returns false).

[MAILPOET-3491]
2021-04-12 08:55:14 +02:00
83eecc9dc5 Fix getting subscribers without a list
[MAILPOET-3285]
2021-01-11 11:23:52 +01:00
b1feed43f6 Fix subscriber listing with dynamic segment filter
[MAILPOET-3319]
2021-01-04 13:14:55 +01:00
9e8ccd2c17 Use native array_column
[MAILPOET-3173]
2020-10-12 10:10:03 +02:00
a98f627dbf Add segment filters application to Subscribers listing repository
[MAILPOET-3077]
2020-09-28 14:26:53 +02:00
8a78322854 Refactor resolving actionable bulk action ids to listing repository
[MAILPOET-2898]
2020-06-17 14:37:06 +02:00
2b47684490 Refactor newsletter API bulk actions to use repository methods
[MAILPOET-2898]
2020-06-17 14:37:06 +02:00
f1e044aa28 Add abstract ListingRepository as a base class for all listing repos
[MAILPOET-2645]
2020-03-11 17:06:02 +00:00
fe16dd3ccc Add ListingDefinition value object and its factory
[MAILPOET-2645]
2020-03-11 17:06:02 +00:00
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
5c212e7483 Add Paris to MailPoetVendor namespace
[MAILPOET-2545]
2019-11-27 12:38:20 +00:00
1b5b9d89ff Autofix namespace declaration spacing
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00
01a0fe96c4 Remove no longer necessary checks
[MAILPOET-1948]
2019-09-12 13:59:32 +02:00
ed9f0aa294 Refactor Menu::getLimitPerPage to a service
[MAILPOET-2200]
2019-07-22 09:13:39 -04:00
5d64ec168d Add rule for concatenation operator spacing
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
5da7110eb6 Use short array syntax
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
b9af15e19f Enforce array trailling commas
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
3e66e9e1dd Fix phpstan level 6
[MAILPOET-1969]
2019-04-10 09:55:13 -04:00
wxa
a822114c6d Add bulk action factory to be able to use custom classes for actions [MAILPOET-1922] 2019-03-21 08:30:45 -04:00
3ee58aea10 Add space between if and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
66a05e1b19 Inject Listing Handler and Segments Subscriber Listing using DI
[MAILPOET-1689]
2018-12-17 15:02:42 +01:00
a69ae0eea7 Refactor listing handler to reusable service
[MAILPOET-1689]
2018-12-17 15:02:42 +01:00
2839c86017 Refactor bulk action into reusable controller
[MAILPOET-1689]
2018-12-17 15:02:42 +01:00
40ca54c447 sort by defaults to 'id' if invalid 2016-11-02 11:17:27 +01:00
f4563e18cd use filter_var instead of regex 2016-10-31 17:36:53 +01:00
feaac5eb54 constrain sort_by to alphanumeric/underscore in order to avoid xss in error notices 2016-10-31 17:36:53 +01:00
542015a4f6 Improved removal of useless files in vendor folder during build process
- moved sort_order constraining logic to Listing handler's construct
2016-10-10 14:52:09 +02:00
a3395e41c9 fixes issue #632 2016-10-06 09:25:09 +02:00
0c5589a3e3 Listing method update for Newsletters/Forms/Segments/Subscribers
- updated unit tests
2016-09-12 15:57:16 +02:00
afbe25e215 Segments & Subscribers endpoints
- unit tests
2016-09-05 11:51:58 +02:00
ef0cbb3e9f Added "params" to the $data in Listing Handler
- moved "tab" to params
- improved url generation in listing.jsx to allow more flexibility
- added "parent_id" filter in newsletter model to get children of a given newsletter id
2016-07-18 16:01:47 +02:00
f5552847a3 Added parent_id to Newsletters table
- added NOTIFICATION_HISTORY Newsletter's type
- implement basic UI for notification_history
- TODO: implement passing extra parameters in order to handle the :id part
2016-07-18 16:01:47 +02:00
9ddc1ef555 Remove statements that cannot be executed 2016-06-30 18:49:50 +03:00
264b7e180b listing handler and bulk actions tests completed 2016-06-22 13:47:54 +02:00
68c09b8678 Sorting for all listings & bugfixes for all listings except Newsletters
- newsletters listing now uses hash history
- newsletters are sorted by Subject (a->z)
- segments are sorted by Name (a->z)
- re-added WordPress Users list as a segment you can send a newsletter to
- added explicit error messages when an auto newsletter isn't fully configured
- added missing strings for "selectAll" in Segments listing
- fixed filters() in Subscribers listing (wrong count as it was not taking groups/filters/search into account)
2016-06-20 16:23:27 +02:00
7af2775972 Allowed ability to set default sort_by/order on listings
- improved performance of listings (less refresh of items)
- fixed sorting issue where the order would not be reversed
2016-06-17 17:27:40 +02:00
a593347336 call groups/filters only if Model has defined those methods 2016-06-15 16:15:02 +02:00
c959e7ec96 fixed total count and filtering + basic tab implementation in React 2016-06-15 16:14:06 +02:00
86a2846215 Tab system for listings 2016-06-15 16:14:06 +02:00
3b97a26a8a Newsletters multi-listing 2016-06-15 16:14:06 +02:00
3c46a5b434 Optimized Bulk actions
- Updated SQL schema for every created_at column so that it has a default value
- Updated unit tests based on recent changes (new methods in SubscriberSegment model)
- Added check for HelpScout initialization code so that it doesn't throw errors
2016-05-27 14:15:46 +02:00
8c56c8da5e Fixed bulk actions (return false if no items were selected)
- added missing check for WPUsers segment in case it does not exist
2016-05-27 14:14:35 +02:00
cf6466197a Fixed Subscribers' bulk actions when filtering by a segment
- filter by segment is now affected by the selected group (all, trash,...)
- updated relationship methods between subscribers & segments (to account for subsegment status)
2016-02-29 13:34:17 +01:00
07d533a810 Manage subscriptions
- make use of the SubscriberSegment::status column to keep track of unsubscriptions
- unsubscribed segments now appear grayed out in the Subscribers listing
- added unsubscribed_at after segment names when editing a subscriber
- added date() method for Twig (uses WP's date format / date_offset)
- fixed typo in Form iframe export
- fixed unit test for Newsletters
- updated selection component (JSX) to allow more customization
2016-02-22 11:35:34 +01:00
9b1503dc7a Fixed reported issues + refactoring
- refactored Config/Hooks to make it more readable
- added hook to save limit per page
- added default limit per page as a constant in Listing/Handler
2016-02-16 16:33:20 +01:00
5473f94e24 List selection & subscribe
- fixed list selection widget (form editor & rendered form)
- ajax subscription works (minus sending the confirmation email)
- bug fixes / polishing / refactoring / cleanup
2015-11-06 16:09:09 +01:00
a4cf2f9c76 Major refactoring of listing/router/model relation
- updated Subscribers listing
- udpated Segments listing
- added Forms router
2015-10-29 15:30:24 +01:00
13dc3577f1 lotta fixes for filtering + listing 2015-10-26 18:23:32 +01:00
3b4c5c83e1 added segment stats in listing 2015-10-22 20:40:46 +02:00