Download the PHP package rmed19/simple-behaviors-bundle without Composer

On this page you can find all versions of the php package rmed19/simple-behaviors-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 simple-behaviors-bundle

MrSimpleBehaviorsBundle

MrSimpleBehaviorsBundle is a Symfony bundle that provides simple, reusable behaviors for Doctrine entities, such as Sluggable and Timestampable functionalities.

Features

Requirements

Installation

Install the bundle via Composer:

If you're not using Symfony Flex, you'll need to manually enable the bundle in your config/bundles.php:

Usage

Sluggable Entity

To use the Sluggable functionality in your entity, simply include the SluggableEntity trait and implement the SluggableInterface:

Timestampable Entity

To use the Timestampable functionality in your entity, include the TimestampableEntity trait and implement the TimestampableInterface:

Serialization Groups

The MrSimpleBehaviorsBundle provides serialization groups directly within the traits for controlling how slugs and timestamps are serialized.

These groups allow you to manage the serialization of these fields effectively in different contexts.

Example:

In your entity, the SluggableEntity trait automatically applies the mr_simple_behaviors:slug:read group to the slug field, and the TimestampableEntity trait applies the mr_simple_behaviors:timestamp:read group to the createdAt and updateAt fields.

Example usage with Symfony's Serializer component:

In the example above, only the fields associated with the mr_simple_behaviors:slug:read group, including the slug, will be serialized.

Configuration

The bundle uses Doctrine event listeners to automatically handle Sluggable and Timestampable behaviors. No additional configuration is required out of the box.

However, if you need to customize the behavior, you can override the default services by modifying the services.xml file located in your project:

Testing

To run the test suite, use PHPUnit:

Make sure you have PHPUnit installed and configured.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.

License

This bundle is licensed under the MIT license. See the LICENSE file for more details.

Credits

MrSimpleBehaviorsBundle is developed and maintained by Mohamed RHAMNIA. Special thanks to the Symfony and Doctrine communities for their amazing tools and documentation.


All versions of simple-behaviors-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/config Version ^6.0 || ^7.0
symfony/dependency-injection Version ^6.0 || ^7.0
symfony/http-kernel Version ^6.0 || ^7.0
doctrine/orm Version ^2.10 || ^3.0
symfony/string Version ^6.0 || ^7.0
symfony/serializer Version ^6.0 || ^7.0
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 rmed19/simple-behaviors-bundle contains the following files

Loading the files please wait ...