Download the PHP package andanteproject/period-bundle without Composer

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

Andante Project Logo

Period Bundle

Symfony Bundle - AndanteProject

Latest Version Github actions Framework Php7 PhpStan

A Symfony Bundle to integrate thephpleague/period into Doctrine and Symfony Form.

Requirements

Symfony 5.4-6.x and PHP 8.0.

Install

Via Composer:

Features

Basic usage

After install, make sure you have the bundle registered in your symfony bundles list (config/bundles.php):

This should have been done automagically if you are using Symfony Flex. Otherwise, just register it by yourself.

Doctrine Mapping

The bundle is going to register period, duration and sequence doctrine types to allow you to map Period , Duration and Sequence objects to the database.

These types are going to create a JSON field on your database. If you want Period to have a column for startDate and a separate column for endDate, check the Embeddable mapping down below.

Embeddable Period Mapping

This is going to create 3 different columns on your database like period_start_date, period_end_date and period_boundary_type instead of a JSON field. If you want to use some different names for yout mapping, check the configuration of this bundle. ⚠️ PLEASE NOTE: Doctrine v2 does not allow Embedded Classes to be null. It's a feature expected in Doctrine v3. But, with some magic under the hood, this bundle allows you to use nullable Period anyway. 👍

Doctrine DQL Functions

No matter the kind of mapping you are using for your Period (type or embedded), you can use these DQL functions to access Period properties:

Period Form Type

Use Andante\PeriodBundle\Form\PeriodType as a Form like you are used to. This bundle is shipped with no form theme, so it's up to you to build your form theme.

PeriodType Options

default_boundary_type

type: string default: [), allowed values: [), (], (), [] which boundary type to be used if none has been selected via boundary_type_choice.

boundary_type_choice

type: bool default: false Whether to include or not a BoundaryTypeChoiceType to let the user to choice the BoundaryType. This is false by default. To change which boundary type should be use to create the Period, check out default_boundary_type option.

start_date_child_name

type: string default: start How form child handling startDate property should be called.

end_date_child_name

type: string default: end How form child handling endDate property should be called.

boundary_type_child_name

type: string default: boundary

How form child handling boundaryType property should be called.

start_date_form_type

type: string default: Symfony\Component\Form\Extension\Core\Type\DateTimeType Which form type to be used for startDate property. You can replace it with something custom.

end_date_form_type

type: string default: Symfony\Component\Form\Extension\Core\Type\DateTimeType Which form type to be used for endDate property. You can replace it with something custom.

start_date_options

type: array default: [] Additional options to be used for the startDate form child.

end_date_options

type: array default: [] Additional options to be used for the endDate form child.

boundary_type_options

type: array default: [] Additional options to be used for the boundaryType form child.

allow_null

type: bool default: true Additional options to be used for the boundaryType form child.

Configuration (completely optional)

This bundle is build thinking how to save you time and follow best practices as close as possible.

This means you can even ignore to have a andante_period.yml config file in your application.

However, for whatever reason, use the bundle configuration to change most of the behaviors as your needs.

Built with love ❤️ by AndanteProject team.


All versions of period-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
symfony/framework-bundle Version ^5.4 || ^6.0
league/period Version ^4.0
doctrine/doctrine-bundle Version ^2.0
symfony/property-access Version ^5.4 || ^6.0
symfony/form Version ^5.4 || ^6.0
symfony/validator Version ^5.4 || ^6.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 andanteproject/period-bundle contains the following files

Loading the files please wait ....