Download the PHP package oltrematica/laravel-fake-parking without Composer

On this page you can find all versions of the php package oltrematica/laravel-fake-parking. 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 laravel-fake-parking

Laravel Fake Parking

Driver di parcheggio fake per oltrematica/laravel-parking-hub. Pensato per ambienti demo: senza alcuna API esterna, letta una targa restituisce un esito stabile-per-targa che l'hub rende come pallino verde / fucsia / rosso.

Requisiti

Installazione

Il ServiceProvider è auto-registrato (package discovery). Per pubblicare il file di configurazione di riferimento:

Esiti

Esito Peso default Significato Come è costruito
🟢 Verde 65 OK, sforamento tollerabile Parcheggio valido ora (overflow 0%)
🔴 Rosso 20 Violazione significativa Parcheggio scaduto, overflow > 50%
🟣 Fucsia 3 Avvertenza, sforamento moderato Parcheggio scaduto, 10% < overflow ≤ 50%

Il colore non è un campo della risposta: l'hub lo calcola a valle dall'overflow_percentage ricavato da ParkingValidationResponseData::findClosestParkingRange(). Questo driver fabbrica quindi un parcheggio le cui date producono l'overflow corrispondente all'esito estratto.

La whitelist non è producibile da un provider e quindi non è gestita.

Registrazione come driver

Nel config/parking-hub.php dell'applicazione, aggiungi una voce nei drivers:

Con la sola chiave class valgono i default interni (65 / 20 / 3, deterministico, durata 30–180 min). Per usarlo come driver predefinito: PARKING_HUB_DEFAULT_DRIVER=fake.

Configurazione

Opzioni disponibili

Chiave Tipo Default Vincoli
probabilities.green int 65 intero ≥ 0
probabilities.red int 20 intero ≥ 0
probabilities.fuchsia int 3 intero ≥ 0; somma dei tre > 0
deterministic bool true
duration.min int (minuti) 30 ≥ 1
duration.max int (minuti) 180 duration.min

Config malformata (peso negativo, somma dei pesi = 0, min > max) lancia InvalidArgumentException alla costruzione del driver.

Le percentuali (pesi)

green / red / fuchsia sono pesi e vengono normalizzati a 100% sulla loro somma — non devono per forza sommare a 100:

green red fuchsia somma 🟢 verde 🔴 rosso 🟣 fucsia
65 20 3 88 73,9% 22,7% 3,4%
70 25 5 100 70,0% 25,0% 5,0%
50 50 0 100 50,0% 50,0% 0,0%

Come impostarle

Hai due strade.

A) Direttamente nella voce del driver (consigliata):

B) Tramite .env usando il config pubblicato del pacchetto:

⚠️ Importante: a runtime il ParkingHubManager passa al driver l'array drivers.fake di parking-hub.php, non config('fake-parking'). Quindi, per far valere i valori del .env/del config pubblicato, vanno collegati esplicitamente nella voce del driver:

Determinismo

Con deterministic = true (default) l'esito è stabile per targa: il seed è derivato dall'hash della targa normalizzata (strtoupper(trim($plate))), quindi la stessa targa produce sempre lo stesso esito (anche tra istanze/richieste diverse). Con false ogni lettura estrae un nuovo esito casuale.

Uso

Se $verificationDateTime è null, viene usato Carbon::now().

Testing

Licenza

MIT.


All versions of laravel-fake-parking with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
oltrematica/laravel-parking-hub 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 oltrematica/laravel-fake-parking contains the following files

Loading the files please wait ...