Download the PHP package phil/opening-hours-bundle without Composer

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

phil/opening-hours-bundle

An opening hours form, a JSON column and localised hours in Twig, for Symfony.

phil/opening-hours-bundle brings the hours of phil/opening-hours into Symfony. OpeningHoursType has a field for each day, named in the request's language, where the day's ranges are typed as 09:00-12:00, 13:00-17:00. It adds a field for special hours, one period a line, and a choice of time zone. A field that cannot be read is invalid on its own, with a message that shows how to type it. The Doctrine column type phil_opening_hours keeps hours in one JSON column. In Twig, functions say whether the place is open now and when it next opens. Others write the week and the special hours to come, and give the schema.org openingHoursSpecification. A table template shows the week. Labels and messages are in English and French.

It is for Symfony applications where an editor or an administrator enters a place's hours and visitors read them. Days, dates and times are written by ICU in the request's language, so the same hours read lundi – vendredi for one visitor and Monday – Friday for another.

Outside Symfony, use phil/opening-hours on its own. The bundle adds what needs the framework or ext-intl: the form, the column type, the ICU wording, and a PSR-20 clock for "now".

Status

Part State
OpeningHoursType Implemented and tested
The column type phil_opening_hours Implemented and tested
Twig: opening_hours_open, _next, _week, _specials, _schema; the table template Implemented and tested
Labels and messages in English and French Implemented and tested

Documentation

Document What it covers
Installation Requirements, registering, default_timezone.
Forms OpeningHoursType and its options.
Doctrine The column type phil_opening_hours.
Twig The functions and the table template.
Extension points What an application implements, configures, replaces or relies on.
Testing How the bundle is tested.
Reference Every type of the bundle.

Quick start

Requirements

PHP 8.5 or later with ext-intl and ext-mbstring; phil/opening-hours 0.1; psr/clock 1; symfony/config, symfony/dependency-injection, symfony/form and symfony/options-resolver 8.2 or later. Doctrine DBAL and Twig are optional. With Twig, the container needs a clock service, which FrameworkBundle registers once symfony/clock is installed: without it, the container does not compile.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of opening-hours-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-intl Version *
ext-mbstring Version *
phil/opening-hours Version ^0.1@dev
psr/clock Version ^1.0
symfony/config Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/form Version ^8.2
symfony/options-resolver Version ^8.2
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 phil/opening-hours-bundle contains the following files

Loading the files please wait ...