PHPackages                             thomas-thony/safephp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. thomas-thony/safephp

ActiveLibrary[Security](/categories/security)

thomas-thony/safephp
====================

A cyber-security library for your php project

v1.0.7(4mo ago)261[3 issues](https://github.com/Thomas-Thony/SafePHP/issues)GPL-3.0-or-laterPHPPHP &gt;=8.0.0CI passing

Since Jan 19Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Thomas-Thony/SafePHP)[ Packagist](https://packagist.org/packages/thomas-thony/safephp)[ RSS](/packages/thomas-thony-safephp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

[SafePHP](#safephp) [![PHP](https://camo.githubusercontent.com/bbeaca4ecdd74d3fde840f711ebb8a5def2ff801187623f9bc365761b3b66f86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/bbeaca4ecdd74d3fde840f711ebb8a5def2ff801187623f9bc365761b3b66f86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#safephp-)

[![Tests](https://github.com/Thomas-Thony/SafePHP/actions/workflows/tests.yml/badge.svg)](https://github.com/Thomas-Thony/SafePHP/actions/workflows/tests.yml)[![GitHub Repo stars](https://camo.githubusercontent.com/cfe2a1b9ae6a66176ebb44a1ca8caf38bfb8dc1d2c46901afe9ef97791d19cae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74686f6d61732d74686f6e792f73616665706870)](https://camo.githubusercontent.com/cfe2a1b9ae6a66176ebb44a1ca8caf38bfb8dc1d2c46901afe9ef97791d19cae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74686f6d61732d74686f6e792f73616665706870)[![GitHub forks](https://camo.githubusercontent.com/57e104176d4ab05fb2245961d3f62b8e24641547ea6a97276089e02aad64bf93/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74686f6d61732d74686f6e792f73616665706870)](https://camo.githubusercontent.com/57e104176d4ab05fb2245961d3f62b8e24641547ea6a97276089e02aad64bf93/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74686f6d61732d74686f6e792f73616665706870)

[![](./Components/Img/fra.svg)](#sommaire) [![](./Components/Img/eng.svg)](#summary)

Sommaire
--------

[](#sommaire)

- [Sommaire](#sommaire)
- [Contribution au projet](#contribution-au-projet)
- [Introduction](#introduction)
    - [Pourquoi faire SafePHP](#pourquoi-faire-safephp)
    - [Avant toute chose](#avant-toute-chose)
    - [Contenu de la librarie](#contenu-de-la-librairie)
    - [Outils requis](#outils-requis)
    - [Installation](#installation)
    - [Configuration générale](#configuration-g%C3%A9n%C3%A9rale)
    - [Utilisation générale](#utilisation-g%C3%A9n%C3%A9rale)

Contribution au projet
----------------------

[](#contribution-au-projet)

Le projet SafePHP est en open source et libre de toute utilisation, que ce soit personnelle comme pédagogique. **Vous pouvez bien évidement contribuer activement au projet en faisant des fixs, des tests, des features ou en complétant les différentes documentations par exemple**. Vous pouvez me conctacter à l'adresse mail  .

Introduction
------------

[](#introduction)

### Pourquoi faire SafePHP

[](#pourquoi-faire-safephp)

SafePHP est une librairie PHP qui permet d'implémenter des moyens de cybersécurité facilement !
Cela rend le développement de moyens de cybersécurité rapide, efficace et facile à maintenir.

### Avant toute chose

[](#avant-toute-chose)

Ce projet a été fait par un étudiant en informatique, avec le moins d'utilisation d'IA possible (Pas même pour la documentation), et vérification auprès de communautées certifiées quand c'est le cas. Je vous remercie d'être indulgent sur la qualité de code mais en étant pédagogique sur l'apport d'améliorations (dans le code ou simplement la manière de faire, tous les avis sont bon à prendre), ce projet a pour but de faciliter la vie des développeurs pour la cybersécurité. J'espère évidement que SafePHP sera utilisé par le plus grand nombre de développeurs et/ou qu'il sera maintenu par les plus enthousiastes de la libraire.

### Contenu de la librairie

[](#contenu-de-la-librairie)

Cette librairie contient plusieurs fichiers de configuration qui sont à disposition dans le dossier **config** comme :

- Un fichier de configuration Apache **.htaccess**
- Un fichier **.env.example** où mettre vos variables d'environnement
- Un fichier **php.ini** avec des modules activés/désactivés par défault

### Outils requis

[](#outils-requis)

Composer : Version 2.9.3
PHP : Version 8.0.0 minimum
Serveur LAMP ou XAMP

### Installation

[](#installation)

Vous pouvez l'installer avec composer :

```
composer require thomas-thony/safephp
```

N'oubliez pas d'installer les dépendences associées pour assurer le bon fonctionnement du la librairie:

Windows :

```
composer update; if ($?) { composer install }
```

Linux :

```
composer update && composer install
```

### Configuration générale

[](#configuration-générale)

Avant de pouvoir utiliser pleinement SafePHP, pensez à importer les fichiers de configuration présents dans **./config** à la racine de votre projet et de mettre vos variables d'environnement à jour dans le fichier .env .

#### Utiliser les variables d'environnement

[](#utiliser-les-variables-denvironnement)

La classe [Secret](https://safephp.alwaysdata.net/docs/classes/SafePHP-Secret.html) permet de gérer l'importation de votre fichier .env .

### Utilisation générale

[](#utilisation-générale)

La documentation détaillée des classes est disponible à cette adresse :

[SafePHP](#safephp) (Alpha Version) [![PHP](https://camo.githubusercontent.com/bbeaca4ecdd74d3fde840f711ebb8a5def2ff801187623f9bc365761b3b66f86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/bbeaca4ecdd74d3fde840f711ebb8a5def2ff801187623f9bc365761b3b66f86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#safephp-alpha-version-)

[![](./Components/Img/fra.svg)](#sommaire) [![](./Components/Img/eng.svg)](#summary)

Summary
-------

[](#summary)

- [Summary](#summary)
- [Project contribution](#project-contribution)
- [Introduction-Bis](#introduction-bis)
    - [Why make SafePHP](#why-make-safephp)
    - [Before anything](#before-anything)
    - [Library's content](#librarys-content)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Global configuration](#global-configuration)
        - [Use envrionnement variables](#use-environnement-variables)
    - [General usage](#general-usage)

Project contribution
--------------------

[](#project-contribution)

The SafePHP project is in open-source and free of usage, for personal or educative purpose. **You can of course contribute by doing fixes, tests, creating new features or documentation**. To join me, you can e-mail me at .

Introduction-Bis
----------------

[](#introduction-bis)

### Why make SafePHP

[](#why-make-safephp)

SafePHP is a PHP library that allows to implement cybersecurity means easily!
This makes the development of cybersecurity means fast, effective and easy to maintain.

### Before anything

[](#before-anything)

This project was made by a student in computer science, with the least AI as possible (not even for documentation), and verification with certified communities when it was used. Thank you for being lenient on the quality of the code but by being educational about making improvements (in the code or simply the way to do it, all opinions are good), this project aims to facilitate developers for cyber-security. Of course, I hope SafePHP will be used by the most of people and/or will be maintenend by the most enthousiats of the library.

### Library's content

[](#librarys-content)

Even more, a couple of configuration's files are aviables in the folder config like :

A file for Apache configuration nammed .htaccess A .env.example file where use your's environnement variables A php.ini file with modules enables &amp; disabled by default

### Requirements

[](#requirements)

Composer : Version 2.9.3
PHP : Version 8.0.0 at least
LAMP or XAMP server

### Installation

[](#installation-1)

You can install the library with composer like this :

```
composer require thomas-thony/safephp
```

Don't forget to install all dependences linked to the library to ensure the good utility :

Windows :

```
composer update; if ($?) { composer install }
```

Linux :

```
composer update && composer install
```

### Global configuration

[](#global-configuration)

Before fully use SafePHP, don't forget to import your files of configuration in **./config** in the root folder of your project and update your environnement variables in the .env file.

#### Use environnement variables

[](#use-environnement-variables)

The class [Secret](https://safephp.alwaysdata.net/docs/classes/SafePHP-Secret.html) can manage importation of .env file.

### Global usage

[](#global-usage)

The detailled documentation of classes is aviable here :

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance63

Regular maintenance activity

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

8

Last Release

135d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.3.0

v1.0.3PHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/df834af9852beb9dc563f16a4e16217583dd0ad2c5f719838cf29cee4c2b28d5?d=identicon)[Thomas.Th](/maintainers/Thomas.Th)

---

Top Contributors

[![Thomas-Thony](https://avatars.githubusercontent.com/u/175692991?v=4)](https://github.com/Thomas-Thony "Thomas-Thony (112 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![Epsiloog](https://avatars.githubusercontent.com/u/169810320?v=4)](https://github.com/Epsiloog "Epsiloog (3 commits)")

---

Tags

cyber-securitycybersecuritycybersecurity-toolsphpphp-libraryphp8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thomas-thony-safephp/health.svg)

```
[![Health](https://phpackages.com/badges/thomas-thony-safephp/health.svg)](https://phpackages.com/packages/thomas-thony-safephp)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[laravel/framework

The Laravel Framework.

34.8k543.8M19.9k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[doppar/framework

The Doppar Framework

4012.4k14](/packages/doppar-framework)[lion/bundle

Lion-framework configuration and initialization package

122.3k4](/packages/lion-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
