Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 7900c19

Browse files
committed
- Striptag issue
- Docker support
1 parent 7c1c188 commit 7900c19

File tree

12 files changed

+99
-6
lines changed

12 files changed

+99
-6
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
vendor/
22
.idea/
33
.vs/
4-
.vscode/
54
.DS_Store
65
composer.lock
76
debug.log

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"log": true,
6+
"name": "XDebug",
7+
"type": "php",
8+
"request": "launch",
9+
"port": 9002,
10+
"pathMappings": {
11+
"/var/www/html": "${workspaceRoot}"
12+
},
13+
"ignore": [
14+
"**/vendor/**/*.php"
15+
],
16+
"hostname": "localhost"
17+
}
18+
]
19+
}

.vscode/tasks.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Docker compose Up",
8+
"type": "shell",
9+
"command": "cd docker && docker-compose --env-file .env up -d"
10+
}
11+
]
12+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Output:
130130

131131
## Mode of use Laravel
132132

133-
Laravel 8 or superior
133+
Laravel 5.8 or superior
134134

135135
```php
136136
<?php
@@ -274,7 +274,7 @@ Output:
274274

275275
Strip HTML and PHP tags from a string.
276276

277-
`striptags(array|string $allowable_tags = "")`
277+
`striptags(string $allowable_tags = "")`
278278

279279
```php
280280
use FzPhpSanitize\Sanitize;

docker/.env-example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#PHP
2+
PHP_CONTAINER_NAME="php-sanitize"
3+
PHP_PORT=80
4+
XDEBUG_REMOTE_PORT=9000
5+
6+
NETWORK_NAME="php-sanitize"

docker/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

docker/docker-compose.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: "3.5"
2+
services:
3+
4+
php:
5+
container_name: ${PHP_CONTAINER_NAME}
6+
image: ${PHP_CONTAINER_NAME}
7+
build:
8+
context: ./php
9+
volumes:
10+
- "../.:/var/www/html"
11+
ports:
12+
- "${PHP_PORT}:80"
13+
restart: always
14+
environment:
15+
XDEBUG_CONFIG: remote_port=${XDEBUG_REMOTE_PORT}
16+
networks:
17+
- backend
18+
19+
networks:
20+
backend:
21+
name: ${NETWORK_NAME}
22+
driver: bridge

docker/php/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM php:7.3-apache
2+
3+
RUN apt-get update & apt-get install -y
4+
5+
#composer
6+
RUN apt-get update
7+
RUN apt-get install -y git zip unzip zlib1g-dev libzip-dev
8+
RUN apt-get -y autoremove & apt-get clean & rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
9+
RUN docker-php-ext-install zip pcntl bcmath
10+
RUN cd /tmp && curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
11+
12+
#xdebug
13+
RUN pecl install xdebug-2.9.4 && docker-php-ext-enable xdebug
14+
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

docker/php/xdebug.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
xdebug.remote_host="host.docker.internal"
2+
3+
xdebug.remote_autostart=1
4+
xdebug.remote_enable=1
5+
xdebug.cli_color=1
6+
7+
xdebug.remote_handler=dbgp
8+
xdebug.remote_mode=req

docker/readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
## up containers
3+
4+
```bash
5+
docker-compose --env-file .env up -d
6+
```
7+
8+
## down containers
9+
10+
```bash
11+
docker-compose down
12+
```

0 commit comments

Comments
 (0)