Skip to content

4.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 18:43
· 13 commits to main since this release

Security

  • The autocomplete search (infrangible_backendwidget/search/term and search/value) took the collection class, SQL
    expressions and conditions from the request, so a request could search in any collection and add its own SQL. The
    autocomplete field now signs these values with the encryption key of the installation, and the search rejects
    requests whose values do not match the signature.
  • The admin controllers based on Infrangible\Core\Controller\Adminhtml\Json and Ajax (column selection,
    autocomplete search, product options, attribute option values) did not require an admin login. With m2-core 5 they
    are admin actions and require a logged-in admin user.
  • The grid filter of comma-separated values (filterInSet()) added the filter value to the SQL query without quoting.
  • Grids based on GroupBy added the columns of the parameter group_by to the SQL query unchecked. Only plain column
    names are accepted now.
  • The grid columns of customer names, product names, product options, categories, customer groups, descriptions and
    email templates showed the values without escaping, and the autocomplete field showed the found values as HTML. All
    values are escaped now, as are the values in the templates and the title of buttons.

Breaking changes

  • Requires Magento 2.4.6 or newer and PHP 8.2 or newer. Magento 2.2 to 2.4.5 and PHP 7.1 to 8.1 are no longer
    supported; use version 3.x for these.
  • Requires infrangible/m2-core 5.0 and no longer infrangible/m2-foundation, which the module does not use.
  • Controllers based on Infrangible\BackendWidget\Controller\Adminhtml\Search\Base and the autocomplete form element
    get additional constructor arguments (search helper, variables, escaper).
  • All class properties have native types. Classes that extend classes of this module and redeclare their properties
    have to declare the same types. Constructors use constructor property promotion.
  • The layout arguments of the grid and form blocks are converted to the types of their properties: strings, booleans
    (also given as 1, 0, true or false) and arrays. Arguments of another type are rejected. Missing string
    arguments are empty strings instead of null.
  • All parameters and return values have native types. Classes that override methods of this module have to declare
    compatible types, in particular : void on the hooks prepareFields(), followUpFields(), beforeSave(),
    afterSave(), beforeDelete(), afterDelete(), beforeExport() and afterExport(). Adding : void to these
    overrides also works with version 3.x.
  • The filter condition and frame callbacks of the grid columns (add...ColumnWithFilterCondition(),
    add...ColumnWithFrame()) have to be arrays of an object and a method name, as Magento requires.
  • execute() of the object controllers (Add, Delete, Grid, MassDelete, Save, Tab\Edit) returns the
    response instead of void, MassExport::execute() returns the CSV result or the response. Edit::execute() returns
    the page or, after a redirect, the response (ResultInterface|ResponseInterface).
  • The routes and parameters of the edit, view, delete, mass delete and mass export URLs of Block\Grid and
    Block\Grid\Container are declared in the trait Block\ObjectUrlArguments.
  • The methods that add and handle the response of tab controllers moved from Tab\Delete and Tab\Save to the trait
    Tab\Ajax.
  • Configuration errors (a missing model, collection, resource or block class) throw a LogicException instead of
    Exception; it extends Exception, so existing catch (Exception) blocks still work.

Fixed

  • Debug output (console.debug) was written to the browser console in tabs and tab grids.

Changed

  • Translations for 24 locales.
  • Dependencies only allow patch releases of the tested minor versions (~X.Y.Z).
  • Checks with PHPStan level 9, the Magento coding standard and unit tests on every push.