Download the PHP package uhifadhi/patrol-module without Composer

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

uhifadhi/patrol-module

Field patrol effort as first-class records: GPX track ingest, en-route observations with photos, coverage mapping and a per-user widget dashboard. A uhifadhi module bundle.

Contents

What it is

Installation

Commands run through the Symfony CLI — symfony console … — which hands the project the addresses of the services the skeleton's compose.yaml starts. Served some other way, run php bin/console … with those addresses written into .env.local.

The bundle maps its own entities and ships its own assets (AssetMapper), so there is no doctrine block and no asset wiring to write.

The tables

Those are the installation's four commands, the same four after every change to it. The second is the whole of this module's schema step, and the third enters the module in the catalogue — registry:sync gives every area its row and prints what it added, kept and retired. This module ships the SQL for the patrol_* tables it owns, under its own namespace, and registers the path itself — an installation writes no version for them, exactly as it writes none for the core.

doctrine:migrations:diff stays what you run for the entities you write, and it is run against your own namespace:

It answers in red — [critical] … No changes detected in your mapping information. — and that is the answer you want: the module brought every table it needs.

Pass --namespace every time. Several namespaces are registered in an installation — the core's bundles, this module's, yours — and the command's default target is not necessarily yours. After installing or updating this package that command must report no changes; if it wants to create a patrol_* table, the migrate above has not been run.

What it requires

This module requires the core (uhifadhi/uhifadhi) and the evidence store (uhifadhi/storage-module); both are on Packagist and resolve from the caret constraints in this package's manifest, so an installation names nothing.

The worker

Coverage is computed by the queue worker, never by a page. A settled patrol's track is buffered by the worker from the async transport, and the coverage figures are filed hourly by the core's schedule on scheduler_default:

An installation that runs no worker shows "not computed yet · runs hourly" where the coverage figures go. After the deploy that brings stored corridors, and after a patrol type's coverage width changes, run once:

The first buffers every complete patrol that has no stored corridor, or a stale one, in batches (--batch-size, default 100; --all buffers every one again); the second files the months from --from on. See docs/coverage.md.

Switching it on

A module is installed but parked: every page of it answers 404 in an area that has not taken it. An administrator switches it on per area from that area's module grid, and grants the module's permissions to the positions that need them from the positions screen. Reading needs the module's read grant; nothing else is required to see it.

Who the records point at

Five columns name a person — who led the patrol, who put it on hold, who recorded the observation, who acted on the event, who signed the amendment — and none of them names an account class. They are mapped to Uhifadhi\Contracts\Entity\UserInterface, and the installation resolves that interface to whatever it calls its people. The core's TeamBundle states that resolution from its own bundle, so an ordinary installation writes nothing; you write a line only to disagree, naming your own class under the orm: key already in config/packages/doctrine.yaml:

Until something answers it, the bundle installs and the kernel boots, but anything that walks the metadata — doctrine:migrations:diff included — stops on the unresolved interface. The recipe's config/packages/patrol.yaml says the same at length.

Deleting an account sets those five columns null and leaves the records standing: removing somebody from the team does not un-walk the patrol they led.

The storage bundles

Observation photos are stored by uhifadhi/storage-module, a hard dependency. Register both bundles it needs:

An installation that forgets says so at compile time, not on the first upload. Where the bytes go — and how a pre-storage-module deployment keeps the photographs it already has — is in docs/photo-storage.md.

Every file this module takes through a browser — the track and every photograph — goes through that bundle's one upload component; the module's whole side of it is two UploadTargetInterface implementations in src/Upload/.

One line of storage configuration is not optional. The deployment's own allowlist is what the storage validates against, and a GPX is detected from its bytes, which on most platforms reads as generic XML. An installation that wants step 1 to accept a track names the three spellings beside the photograph types:

Stimulus controllers

Nothing to do. The package declares symfony-ux, so Flex reads assets/package.json and maintains the two controllers — filters and calendar — in the application's assets/controllers.json for you, and removes them again on uninstall.

Neither draws a map, and neither filters anything: filters is a dropdown's manners (open one panel at a time, close on Escape or an outside click) and calendar is the month grid's navigation. Every map on a patrol screen is the atlas's plate — the module states what is on it in PHP and the template calls render_map() — and the filter itself is a query, so every chip is a link.

Deployment vocabulary

Name the patrol types and observation categories this deployment uses in config/packages/patrol.yaml; the full key list is in docs/configuration.md. types is the SEED a NEW area starts from — after that each area owns its own list, edited on the configure page's own Patrol types section. Stations are the area's, recorded under the area's Configure › Stations, and a patrol points at one of those.

What this module stands on

Everything that is not about patrols arrives with the core (uhifadhi/uhifadhi) or the evidence store: the page frame and the dashboard mechanics from ShellBundle, the area and its overview contribution points from AreaBundle, the maps from AtlasBundle, the per-area catalogue from RegistryBundle, the people from TeamBundle, and the photographs from uhifadhi/storage-module. This bundle ships none of them, and each is a composer requirement rather than something an installation is expected to have written. What each one carries is in docs/what-it-stands-on.md.

Upgrading

Upgrading to 0.10 lets a patrol type carry its base. Add base: to each of your types so a new area's types record the right way from their first patrol; no migration. UPGRADE-0.10.md. Coverage moved to the queue worker in 0.9: UPGRADE-0.9.md.

Upgrading from 0.5 to 0.6 changes who may do what. Every gate in this module is a <concern>.<verb> pair now, reading included, and no migration re-ticks anybody's grants. Read UPGRADE-0.6.md before the update — it carries the route-by-route mapping and the table of what each existing position must also be granted.

composer update uhifadhi/patrol-module brings new versions with the code that needs them; the migrate is what applies them. --write-sql=upgrade.sql writes the statements to a file instead of running them, for a database somebody else applies changes to.

*If this installation already created the `patrol_tables itself** — with its owndoctrine:migrations:diff`, before this module shipped a history — the tables are already there and the shipped version must not run. Mark it executed without running it:

Then run doctrine:migrations:diff --namespace=DoctrineMigrations and delete whatever version of yours creates a patrol_* table — those tables are this module's, and from here on it is the module that changes them.

The versions this module ships, in the order they run:

Class What it does
Uhifadhi\Patrol\Migrations\Version20260910044923 The module's eleven tables.
Uhifadhi\Patrol\Migrations\Version20260911090000 patrol_settings — what one area runs patrols on.
Uhifadhi\Patrol\Migrations\Version20260911120000 patrol_type and patrol_station, with every existing patrol carried onto them.
Uhifadhi\Patrol\Migrations\Version20260925090000 A patrol points at the AREA's station (area_station_id); the module's own stations are moved onto the area's by name, made where the area has none and the module's carried a point, and kept as a word on the patrol otherwise.
Uhifadhi\Patrol\Migrations\Version20260925230000 patrol_corridor — each patrol's track buffered once, empty until patrol:coverage:rebuild or the worker fills it.

The answer to every one of them is doctrine:migrations:migrate. What is kept for one release and dropped by a later, marked version: patrol_patrol.type and patrol_patrol.station as the words a rollback reads, and — since 0.8 — patrol_patrol.station_id with the patrol_station table it points at, which this module no longer writes. See docs/development.md.

Learn more

License

AGPL-3.0-or-later — see LICENSE: the same license as the uhifadhi platform this module is part of. Use, modify and self-host freely; if you offer a modified version to users over a network, they are entitled to the source of what they're running.


All versions of patrol-module with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-simplexml Version *
ext-xmlwriter Version *
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^3.0
doctrine/orm Version ^3.5
symfony/asset Version ^7.3 || ^8.0
symfony/asset-mapper Version ^7.3 || ^8.0
symfony/config Version ^7.3 || ^8.0
symfony/console Version ^7.3 || ^8.0
symfony/framework-bundle Version ^7.3 || ^8.0
symfony/http-foundation Version ^7.3 || ^8.0
symfony/messenger Version ^7.3 || ^8.0
symfony/mime Version ^7.3 || ^8.0
symfony/twig-bundle Version ^7.3 || ^8.0
symfony/uid Version ^7.3 || ^8.0
symfony/ux-icons Version ^3.4
symfony/ux-map Version ^2.20 || ^3.0
uhifadhi/storage-module Version ^0.4
uhifadhi/uhifadhi Version ^0.2.1
utafitilabs/postgis-bundle Version ^0.1
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 uhifadhi/patrol-module contains the following files

Loading the files please wait ...