Skip to content

Commit 2627531

Browse files
committed
Update php to 8.3.7
Update readme Update license year
1 parent 7352a6a commit 2627531

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 8ctopus
3+
Copyright (c) 2024 8ctopus
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# php sandbox
22

3-
A lightweight sandbox for learning, testing and debugging php code based on Docker containers.
3+
A lightweight `php` sandbox for learning, testing and debugging code.
44

55
![php sandbox screenshot](https://github.com/8ctopus/php-sandbox/raw/master/screenshot.png)
66

77
## features
88

9-
- Linux, Apache, php-fpm and MariaDB (LAMP)
10-
- php 8.3, 8.2, 8.1, 8.0, 7.4 along with the most commonly used extensions
9+
- Alpine Linux, Apache, php-fpm and MariaDB (LAMP)
10+
- php `8.3`, `8.2`, `8.1`, `8.0`, `7.4` along with the most commonly used extensions
1111
- Just works with any domain name and https is configured out of the box
1212
- Support for multiple virtual hosts
13-
- Apache and php configuration files are exposed on the host for easy edit
14-
- All changes to configuration files are automatically applied (hot reload)
15-
- Xdebug is configured for step by step debugging and profiling in Visual Studio Code
1613
- PHP code cleanup
1714
- PHP code static analysis
1815
- Profile php code with [SPX profiler](https://github.com/NoiseByNorthwest/php-spx) or Xdebug
16+
- Apache and php configuration files are exposed on the host for easy edit
17+
- All changes to configuration files are automatically applied inside the container (hot reload)
18+
- Xdebug is configured for step by step debugging and profiling in Visual Studio Code
1919
- Javascript step by step debugging in Visual Studio Code
2020

2121
## architecture
2222

2323
The setup consists of 2 Docker images with a combined size of approximately 110 MB.
2424

2525
- web server ![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/8ct8pus/apache-php-fpm-alpine?sort=semver)
26-
- Apache 2.4.58 with SSL
27-
- php-fpm 8.3.0
28-
- Xdebug 3.3.0 - debugger and profiler
29-
- [SPX prolifer dev-master](https://github.com/NoiseByNorthwest/php-spx)
30-
- composer 2.6.5
26+
- `Apache` 2.4.59 with SSL
27+
- `php-fpm` 8.3.7
28+
- `Xdebug` 3.3.2 - debugger and profiler
29+
- [`SPX` prolifer dev-master](https://github.com/NoiseByNorthwest/php-spx)
30+
- `composer` 2.6.5
3131
- zsh 5.9
32-
- Alpine 3.18.5 with edge repositories
32+
- Alpine 3.19.1 with edge repositories
3333

3434
- database server ![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/8ct8pus/mariadb-alpine?sort=semver)
3535
- MariaDB 10.6.12
@@ -42,7 +42,7 @@ You can either [download the latest version](https://github.com/8ctopus/php-sand
4242

4343
git clone --depth 1 https://github.com/8ctopus/php-sandbox.git
4444

45-
For php version 8.2 or 8.1, select the image in `docker-compose.yml`. For older php version, you need to download an [older version of php-sandbox](https://github.com/8ctopus/php-sandbox/releases/tag/1.2.8) and then choose the correct php version in `docker-compose.yml` as the architecture changed since.
45+
For php `8.2` or `8.1`, select the image in `docker-compose.yml`. For older php version, you need to download an [older version of php-sandbox](https://github.com/8ctopus/php-sandbox/releases/tag/1.2.8) and then choose the correct php version in `docker-compose.yml` as the architecture changed since.
4646

4747
## start coding
4848

@@ -56,11 +56,11 @@ Start `Docker Desktop` then:
5656
# start containers in detached mode on linux and mac in shell
5757
docker-compose up &
5858

59-
_Note_: On Windows [hot reload doesn't work with WSL 2](https://github.com/microsoft/WSL/issues/4739), you need to use the legacy Hyper-V.
59+
_Note_: On Windows [file changes notification to the container doesn't work with the WSL 2 engine](https://github.com/8ctopus/apache-php-fpm-alpine/issues), you need to use the `Hyper-V` engine. Uncheck `Use WSL 2 based engine`. What this means, is that files you update on Windows are not updated inside the container unless you use `Hyper-V`.
6060

6161
## access sites
6262

63-
There are 2 sites you can access from your browser
63+
By default, there are 2 sites you can access from your browser
6464

6565
http(s)://localhost/
6666
http(s)://(www.)test.com/
@@ -111,21 +111,21 @@ If `host.docker.internal` does not resolve within the container, update the xdeb
111111
xdebug.client_host = 192.168.65.2
112112
```
113113

114-
## Code cleanup
114+
## code cleanup
115115

116116
[PHP Coding Standards Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) is a tool to automatically fix PHP coding standards issues.
117117

118118
cd sites/localhost/html
119119
composer fix(-risky)
120120

121-
## Check code for issues
121+
## check code for issues
122122

123123
[PHPStan](https://github.com/phpstan/phpstan) is a PHP static analysis tool, it can discover bugs in your code without running it
124124

125125
cd sites/localhost/html
126126
composer phpstan
127127

128-
## Code profiling
128+
## code profiling
129129

130130
Code profiling comes in 2 variants.
131131

@@ -185,7 +185,7 @@ docker exec -it sandbox zsh
185185
docker exec -it sandbox-db zsh
186186
```
187187

188-
## extend docker image
188+
## extend the docker image
189189

190190
In this example, we add the `php-curl` extension.
191191

docker-compose.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ services:
1212
# save mariadb databases to named volume
1313
- database:/var/lib/mysql/
1414
web:
15+
# php 8.3.7
16+
image: 8ct8pus/apache-php-fpm-alpine:2.3.0
1517
# php 8.3.0
16-
image: 8ct8pus/apache-php-fpm-alpine:2.2.0
18+
#image: 8ct8pus/apache-php-fpm-alpine:2.2.0
1719
# php 8.2.11 with virtual hosts with new self-signed certificates generator
1820
#image: 8ct8pus/apache-php-fpm-alpine:2.1.3
1921
# php 8.2.10 with virtual hosts with new self-signed certificates generator

0 commit comments

Comments
 (0)