Download the PHP package fluffydiscord/sylius-classification-bundle without Composer

On this page you can find all versions of the php package fluffydiscord/sylius-classification-bundle. 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 sylius-classification-bundle

Sylius Classification Bundle

Variant-level, translatable, coded classification axes for Sylius 2 — a taxonomy that Sylius core does not provide: product attributes and taxons are product-level, and product options drive the variant matrix, so a free non-matrix axis (a care symbol, a certification, a supplier tag) has no home. This plugin adds one.

Ships admin CRUD, an admin API (API Platform), a product-variant assignment tab, grid filters, and platform-aware migrations (PostgreSQL and MySQL/MariaDB). Every entity, repository, form and service is overridable the standard Sylius way.

Requires PHP >= 8.4 and Sylius ^2.2.

Installation

1. Require the package

2. Register the bundle

3. Import the admin routes

4. Update the database

Steps 1–4 give the taxonomy, the admin CRUD screens (under the Catalog menu by default) and the admin API, with no changes to your own entities.

5. (Optional) the product-variant assignment tab

To assign classification values to variants from the admin product-variant screen, make your ProductVariant implement ClassificationValuesAwareInterface. The plugin maps the inverse Doctrine relation for you — you do not edit any mapping file.

If your app already overrides ProductVariant, just add the interface, the trait, and the initializeClassificationValues() call. Register the override under sylius_product.resources.product_variant.classes.model if it is not already.

Admin API

The paths below are the uriTemplate values. The host's sylius_api route import prepends its prefix — %sylius.security.api_route%, which the sylius-standard skeleton sets to /api/v2 (a host may change it) — so on a default skeleton /admin/classifications is served at /api/v2/admin/classifications, behind the admin firewall:

Method Path Purpose
GET/POST /admin/classifications list / create axes
GET/PUT/PATCH/DELETE /admin/classifications/{code} read / update / delete an axis
GET/POST /admin/classification-values list / create values
GET/PUT/PATCH/DELETE /admin/classification-values/{code} read / update / delete a value
POST /admin/variant-classification-values assign a value to a variant
GET/DELETE /admin/variant-classification-values/{id} read / remove one assignment
GET /admin/product-variants/{code}/classification-values a variant's assignments

code is write-once (absent from the update groups). Authorization is the host's — every operation sits under the Sylius API admin firewall (%sylius.security.api_admin_regex%) and declares no security of its own.

To disable the API entirely, point its mapping at an empty directory:

Grid filter

Filter a product (or variant) grid by classification value:

Configuration

Extension points

Container autoconfiguration

The plugin relies on attribute autoconfiguration for its grid filter (#[AsFilter]), its two admin Live Components (#[AsLiveComponent]), its autocomplete field (#[AsEntityAutocompleteField]) and its Doctrine mapping subscriber (#[AsDoctrineListener]). If you disable autoconfiguration for third-party bundles, tag these services by hand (sylius.grid_filter, container.service_subscriber / the UX Live Component tags, doctrine.event_listener).

Database platforms

PostgreSQL and MySQL/MariaDB are both supported; the shipped migration branches per platform. The config column is JSONB on PostgreSQL and JSON on MySQL. Assignment foreign keys use NO ACTION (not RESTRICT) so that trying to delete an axis or value still assigned to a variant surfaces as Sylius's friendly "cannot delete" flash rather than a raw 500.

Development

The plugin carries a Sylius test application under tests/Application (from sylius/test-application).

License

MIT.


All versions of sylius-classification-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
api-platform/metadata Version ^4.2
api-platform/state Version ^4.2
doctrine/dbal Version ^3.9 || ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/doctrine-migrations-bundle Version ^3.4
doctrine/orm Version ^3.3
sylius/grid-bundle Version ^1.16
sylius/resource-bundle Version ^1.14
sylius/sylius Version ^2.2
sylius/twig-hooks Version ^0.9
symfony/form Version ^7.4
symfony/string Version ^7.4
symfony/ux-autocomplete Version ^2.25
symfony/ux-live-component Version ^2.25
symfony/ux-twig-component Version ^2.25
symfony/validator Version ^7.4
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 fluffydiscord/sylius-classification-bundle contains the following files

Loading the files please wait ...