Download the PHP package tomloprod/time-warden without Composer

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

GitHub Workflow Status (master) Total Downloads Latest Version License


⏱️ About TimeWarden

TimeWarden is a lightweight PHP library that allows you to monitor the processing time of tasks (useful during the development stage and debugging) and also lets you set estimated execution times for tasks, enabling reactive actions when tasks exceed their estimated duration.

TimeWarden is framework-agnostic, meaning it's not exclusive to any particular framework. It can seamlessly integrate into any PHP application, whether they utilize frameworks like Laravel (🧡), Symfony, or operate without any framework at all.

✨ Getting Started

Reactive Actions

You can specify an estimated execution time for each task and set an action to be performed when the time is exceeded (example: send an email, add an entry to the error log, etc.).

Example

Available methods

If you're not convinced about using onExceedsMilliseconds, you have other options:

Execution Time Debugging

It allows you to measure the execution time of tasks in your application, as well as the possibility of adding those tasks to a group.

Simple tasks

Result:

Grouped tasks

Result:

🧙 Tip

If your application has any logging system, it would be a perfect place to send the output.

Ways of using TimeWarden

You can use TimeWarden either with the aliases timeWarden() (or timewarden()):

or by directly invoking the static methods of the TimeWarden facade:

You decide how to use it 🙂

🧱 Architecture

TimeWarden is composed of several types of elements. Below are some features of each of these elements.

TimeWarden

Tomloprod\TimeWarden\Support\Facades\TimeWarden is a facade that acts as a simplified interface for using the rest of the TimeWarden elements.

Methods

Most methods in this class return their own instance, allowing fluent syntax through method chaining.

Additionally, it has all the methods of the Taskable interface.

Task

All tasks you create are instances of Tomloprod\TimeWarden\Task. The most useful methods and properties of a task are the following:

Properties

Methods

Group

All groups you create are instances of the Tomloprod\TimeWarden\Group object. The most useful methods and properties of a group are the following:

Properties

Methods

Additionally, it has all the methods of the Taskable interface.

Taskable

Tomloprod\TimeWarden\Contracts\Taskable is the interface used by the TimeWarden instance as well as by each task group

Methods

TimeWardenSummary

Tomloprod\TimeWarden\TimeWardenSummary is a class that allows obtaining a general summary of groups and their tasks generated with TimeWarden.

It is useful for obtaining a summary in array or string (JSON) format.

You can obtain an instance of TimeWardenSummary as follows:

Methods

Here is an example of the data returned in array format:

🚀 Installation & Requirements

Requires PHP 8.2+

You may use Composer to install TimeWarden into your PHP project:

🧑‍🤝‍🧑 Contributing

Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.


TimeWarden was created by Tomás López and open-sourced under the MIT license.


All versions of time-warden with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
symfony/console Version ^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 tomloprod/time-warden contains the following files

Loading the files please wait ....