Skip to content

Commit e5a0f6e

Browse files
authored
Merge pull request #1503 from BeMySlaveDarlin/feature/preps-for-v4.1
Feature/preps for v4.1
2 parents b4bee99 + 9d9559e commit e5a0f6e

23 files changed

+561
-195
lines changed

.editorconfig

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22

33
# top-most EditorConfig file
44
root = true
5-
charset = utf-8
6-
trim_trailing_whitespace = true
75

86
[*]
7+
charset = utf-8
98
indent_style = space
109
indent_size = 4
1110
end_of_line = lf
1211
insert_final_newline = true
12+
trim_trailing_whitespace = true
1313

1414
[*.md]
1515
trim_trailing_whitespace = false
1616

1717
[*.sh]
18-
indent_style = tab
18+
indent_style = tab
19+
20+
[*.yml]
21+
indent_size = 2

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# [4.1.0](https://github.com/phalcon/cphalcon/releases/tag/v4.1.0)
2+
## Fixed
3+
- Fixed column annotation bugs on model creation [1425](https://github.com/phalcon/phalcon-devtools/issues/1425)
4+
5+
## Changed
6+
- Migrated phalcon-migrations dependency up to v2 [1464](https://github.com/phalcon/phalcon-devtools/issues/1464)
7+
8+
## Added
9+
- Added docker environment for devtools isolated development
10+
11+
112
# [4.0.7](https://github.com/phalcon/cphalcon/releases/tag/v4.0.7)
213
## Fixed
314
- Fixed not found error on webtools [#1500](https://github.com/phalcon/phalcon-devtools/issues/1500)

Makefile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
all: build composer-install
2+
3+
build:
4+
@docker-compose build
5+
@docker-compose up -d
6+
composer-install:
7+
@docker-compose exec -T service_php composer install
8+
clean:
9+
@docker-compose down
10+
@docker system prune -af
11+
@docker volume prune -f
12+
13+
help:
14+
@docker-compose exec -T service_php phalcon --help
15+
create-dummy:
16+
@docker-compose exec -T service_php phalcon create-project dummy --enable-webtools --force

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Create the composer.json file as follows:
3737
```json
3838
{
3939
"require-dev": {
40-
"phalcon/devtools": "~4.0"
40+
"phalcon/devtools": "~4.1"
4141
}
4242
}
4343
```
@@ -115,7 +115,7 @@ This command should display something similar to:
115115
```sh
116116
$ phalcon --help
117117

118-
Phalcon DevTools (4.0.4)
118+
Phalcon DevTools (4.1.0)
119119

120120
Help:
121121
Lists the commands available in Phalcon DevTools
@@ -169,7 +169,7 @@ By creating **config.json** or any other configuration file called **config** in
169169
}
170170
```
171171

172-
And then you can use use `phalcon migration run` or `phalcon controller SomeClass` and those commands will be executed with options from file. Arguments provided by developer from command line will overwrite existing one in file.
172+
And then you can use `phalcon migration run` or `phalcon controller SomeClass` and those commands will be executed with options from file. Arguments provided by developer from command line will overwrite existing one in a file.
173173

174174
## License
175175

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"ext-phalcon": "^4.0.0",
2828
"psy/psysh": "~0.9",
2929
"nikic/php-parser": "^4.2.4",
30-
"phalcon/migrations": "^1.1",
30+
"phalcon/migrations": "^2.0",
3131
"vlucas/phpdotenv": "^3.6|^4.0|^5.0"
3232
},
3333
"require-dev": {

composer.lock

+94-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: "3.6"
2+
services:
3+
service_php:
4+
build:
5+
context: ./docker/php
6+
working_dir: /app
7+
restart: always
8+
volumes:
9+
- ./:/app
10+
- ./docker/php/mods/psr.ini:/etc/php/7.4/fpm/conf.d/20-psr.ini
11+
- ./docker/php/mods/phalcon.ini:/etc/php/7.4/fpm/conf.d/50-phalcon.ini
12+
- ./docker/php/mods/psr.ini:/etc/php/7.4/cli/conf.d/20-psr.ini
13+
- ./docker/php/mods/phalcon.ini:/etc/php/7.4/cli/conf.d/50-phalcon.ini
14+
depends_on:
15+
- service_mysql
16+
- service_postgres
17+
18+
service_nginx:
19+
image: nginx:alpine
20+
restart: always
21+
ports:
22+
- 8081:80
23+
volumes:
24+
- ./:/app
25+
- ./docker/nginx/conf.d:/etc/nginx/conf.d
26+
- ./docker/nginx/fastcgi.conf:/etc/nginx/fastcgi.conf
27+
- ./docker/nginx/fastcgi-php.conf:/etc/nginx/fastcgi-php.conf
28+
depends_on:
29+
- service_php
30+
31+
service_mysql:
32+
image: mariadb
33+
restart: always
34+
environment:
35+
- MYSQL_DATABASE=devtools
36+
- MYSQL_USER=devtools
37+
- MYSQL_PASSWORD=password
38+
- MYSQL_ROOT_PASSWORD=password
39+
volumes:
40+
- db_mysql_data:/var/lib/mysql/
41+
- ./docker/mysql/config:/etc/mysql/conf.d/
42+
43+
service_postgres:
44+
image: postgis/postgis:13-master
45+
restart: always
46+
environment:
47+
- POSTGRES_USER=devtools
48+
- POSTGRES_PASSWORD=password
49+
- POSTGRES_DB=devtools
50+
volumes:
51+
- db_postgres_data:/var/lib/postgresql/data
52+
healthcheck:
53+
test: pg_isready -q -d devtools -U devtools
54+
timeout: 5s
55+
56+
volumes:
57+
db_mysql_data:
58+
db_postgres_data:

docker/mysql/my.cnf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[mysqld]
2+
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
3+
max_connections = 500
4+
max_allowed_packet = 32mb
5+
skip-host-cache
6+
skip-name-resolve

docker/nginx/conf.d/default.conf

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
server {
2+
listen 80;
3+
listen [::]:80;
4+
5+
root /app/dummy/public/;
6+
index index.php index.html index.htm;
7+
8+
client_max_body_size 128M;
9+
10+
location / {
11+
try_files $uri $uri/ /index.php?_url=$uri&$args;
12+
}
13+
14+
location /webtools {
15+
try_files $uri $uri/ /webtools.php?_url=$uri&$args;
16+
}
17+
18+
location ~ \.php$ {
19+
fastcgi_pass service_php:8000;
20+
include fastcgi-php.conf;
21+
22+
fastcgi_buffers 16 32k;
23+
fastcgi_buffer_size 32k;
24+
25+
fastcgi_connect_timeout 600;
26+
fastcgi_send_timeout 600;
27+
fastcgi_read_timeout 600;
28+
}
29+
30+
location ~ /\.(ht|svn|git) {
31+
deny all;
32+
}
33+
}

docker/nginx/fastcgi-php.conf

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
2+
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
3+
4+
# Check that the PHP script exists before passing it
5+
try_files $uri /index.php =404;
6+
7+
# Bypass the fact that try_files resets $fastcgi_path_info
8+
# see: http://trac.nginx.org/nginx/ticket/321
9+
set $path_info $fastcgi_path_info;
10+
fastcgi_param PATH_INFO $path_info;
11+
12+
fastcgi_index index.php;
13+
include fastcgi.conf;

docker/nginx/fastcgi.conf

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
3+
fastcgi_param QUERY_STRING $query_string;
4+
fastcgi_param REQUEST_METHOD $request_method;
5+
fastcgi_param CONTENT_TYPE $content_type;
6+
fastcgi_param CONTENT_LENGTH $content_length;
7+
8+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
9+
fastcgi_param REQUEST_URI $request_uri;
10+
fastcgi_param DOCUMENT_URI $document_uri;
11+
fastcgi_param DOCUMENT_ROOT $document_root;
12+
fastcgi_param SERVER_PROTOCOL $server_protocol;
13+
fastcgi_param REQUEST_SCHEME $scheme;
14+
fastcgi_param HTTPS $https if_not_empty;
15+
16+
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
17+
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
18+
19+
fastcgi_param REMOTE_ADDR $remote_addr;
20+
fastcgi_param REMOTE_PORT $remote_port;
21+
fastcgi_param SERVER_ADDR $server_addr;
22+
fastcgi_param SERVER_PORT $server_port;
23+
fastcgi_param SERVER_NAME $server_name;
24+
25+
# PHP only, required if PHP was built with --enable-force-cgi-redirect
26+
fastcgi_param REDIRECT_STATUS 200;

0 commit comments

Comments
 (0)