Download the PHP package cmixin/season without Composer

On this page you can find all versions of the php package cmixin/season. 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 season

Season

Latest Stable Version GitHub Actions Code Climate Test Coverage StyleCI

DateTime modifiers such as startOfSeason, isInSummer

How to use

The simple way

Methods are available from the class \Season\Season which is cheap to create, so you can just call methods from a new class everytime.

As a good practice, it's recommended you import the class with use Season\Season; at the beginning of the file:

And also to keep the same instance to re-use multiple times:

As a service

You can use dependency injection with your framework:

With Laravel it will be provided by default.

With Symfony, you'll have to register \Season\Season as a service and so edit config/services.yaml the following way:

Learn more from Symfony documentation: Configuring Services in the Container

As Carbon methods (mixin)

You can use mixin on CarbonImmutable, Carbon or any of their subclasses.

Configuration

Disable mixin in Laravel

If you use Laravel but don't want to enable Season mixin globally for Carbon, you can remove it from auto-discovery using:

Customize days

By default, Season is created with the following config:

mapping the month (as key) with the day (as value) for each season start.

But you can pass a custom config with other days as long as the keys remain.

In Laravel, you can set the config in config/season.php which will apply to both the mixin and the service:

When using Carbon mixin alone, you can still call setSeasonConfig() to change the config globally:

Or apply a config on specific call:

With Symfony you can edit config/services.yaml to configure the service:

Thanks


All versions of season with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
psr/container Version *
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 cmixin/season contains the following files

Loading the files please wait ....