Download the PHP package mediarox/module-catalog-attribute-setup without Composer

On this page you can find all versions of the php package mediarox/module-catalog-attribute-setup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-catalog-attribute-setup

Description

A Magento 2 module/library that contains an alternative attributes setup class. It is intended to simplify the creation/updating of product and category attributes.

Installation

Usage

In most use cases we "use" the supplied setup class

or more specific

inside a patch file (Recurring or DataPatch).

Our goal was that each patch that wants to install/update attributes only needs to provide an array of information. Everything else is then taken care of by the setup class.

To make the point effectively, take note of the following example.

Example 1 - RecurringData patch

Force product attribute setting with recurring data patch (useful for development/not released projects).

Example explanations
  1. We always use the "getAttributes()" method internally to provide the attribute information. Feel free to do this differently.
  2. RecurringData patches use the "install" method as the main entry point. (In DataPatches, the "apply" method is used).
  3. RecurringData patches are executed on every "bin/magento setup:upgrade". Please use a DataPatch if you want to run only once.
  4. As usual in Magento, we still use a factory class with which we create new instances. (AttributeSetupFactory)
  5. In the "install" method we first create the new instance via the internal method "create" and pass our attribute information right away.

  6. Then, we run the "addUpdateAttributes" method on the instance to start the create/update process.

Additional notes (yes, important)

Attribute information structure

As you can see in the example, the attributes array is grouped into the respective entity. ('catalog_product' or 'catalog_category')

Attribute property names

Magento unfortunately does not use a uniform name for the attribute properties. In some cases you have to use the short form and in others the long form. As a result, we have decided to uniformly push the long form. Following this, the module loads module eav-property-mapper as a dependency to ensure that we can/must use the long form across the board. (All short and long forms)

In summary: The long form must be used. If not, the script will abort due to validation.


All versions of module-catalog-attribute-setup with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.0|~8.0|~8.1
magento/module-eav Version ^102.1
magento/framework Version ~103.0.2
mediarox/module-eav-property-mapper Version ^1.0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mediarox/module-catalog-attribute-setup contains the following files

Loading the files please wait ....