Skip to content

Commit c331afd

Browse files
authored
Merge pull request #6 from niden/main
Prep for v2 release
2 parents 9230056 + b2c0795 commit c331afd

File tree

18 files changed

+329
-58
lines changed

18 files changed

+329
-58
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ DB_HOST=127.0.0.1
33
DB_NAME=phalcon
44
DB_USERNAME=root
55
DB_PASSWORD=password
6-
DB_PORT=3306
6+
DB_PORT=3306

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
--health-retries 5
2222
strategy:
2323
matrix:
24-
php: [7.4, 8.0]
24+
php: [8.0, 8.1]
2525

2626
steps:
2727
- name: Checkout code
@@ -31,7 +31,7 @@ jobs:
3131
uses: shivammathur/setup-php@v2
3232
with:
3333
php-version: ${{ matrix.php }}
34-
extensions: phalcon-5.0.0beta1, pdo, mysql
34+
extensions: phalcon-5.0.0RC1, pdo, mysql
3535
coverage: none
3636

3737
- name: Validate composer.json and composer.lock

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=7.4.0",
21+
"php": ">=8.0",
2222
"ext-json": "*",
23-
"codeception/codeception": "^4.0",
24-
"codeception/lib-innerbrowser": "^1.0",
25-
"codeception/module-asserts": "^1.0",
26-
"codeception/module-phpbrowser": "^1.0",
27-
"codeception/module-db": "^1.0"
23+
"codeception/codeception": "^5.0.0-RC1",
24+
"codeception/module-asserts": "^3.0",
25+
"codeception/module-phpbrowser": "^3.0",
26+
"codeception/module-db": "^3.0"
2827
},
2928
"require-dev": {
3029
"codeception/util-robohelpers": "dev-master",
31-
"vlucas/phpdotenv": "^4.1",
32-
"squizlabs/php_codesniffer": "^3.4",
33-
"vimeo/psalm": "^3.6"
30+
"phalcon/ide-stubs": "^5.0.0RC1",
31+
"squizlabs/php_codesniffer": "^3.6",
32+
"vimeo/psalm": "^4.23",
33+
"vlucas/phpdotenv": "^5.4"
3434
},
3535
"autoload": {
3636
"classmap": [

docker-compose.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
version: '2.1'
1+
# For local development only.
2+
version: '3'
23

34
services:
5+
module-phalcon5-8.0:
6+
container_name: module-phalcon5-8.0
7+
hostname: module-phalcon5-80
8+
build: docker/8.0
9+
working_dir: /srv
10+
volumes:
11+
- .:/srv
12+
13+
module-phalcon5-8.1:
14+
container_name: module-phalcon5-8.1
15+
hostname: module-phalcon5-81
16+
build: docker/8.1
17+
working_dir: /srv
18+
volumes:
19+
- .:/srv
20+
421
mysql:
5-
restart: always
22+
container_name: module-phalcon5-mysql
623
image: mysql:5.7
7-
ports:
8-
- 3306:3306
924
environment:
10-
- MYSQL_DATABASE=phalcon
1125
- MYSQL_ROOT_PASSWORD=password
26+
- MYSQL_USER=phalcon
27+
- MYSQL_DATABASE=phalcon
28+
- MYSQL_PASSWORD=password

docker/8.0/.bashrc

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/bash
2+
3+
# Easier navigation: .., ..., ...., ....., ~ and -
4+
alias ..="cd .."
5+
alias ...="cd ../.."
6+
alias ....="cd ../../.."
7+
alias .....="cd ../../../.."
8+
alias ~="cd ~" # `cd` is probably faster to type though
9+
alias -- -="cd -"
10+
11+
# Shortcuts
12+
alias g="git"
13+
alias h="history"
14+
15+
# Detect which `ls` flavor is in use
16+
if ls --color > /dev/null 2>&1; then # GNU `ls`
17+
colorflag="--color"
18+
else # OS X `ls`
19+
colorflag="-G"
20+
fi
21+
22+
# List all files colorized in long format
23+
# shellcheck disable=SC2139
24+
alias l="ls -lF ${colorflag}"
25+
26+
# List all files colorized in long format, including dot files
27+
# shellcheck disable=SC2139
28+
alias la="ls -laF ${colorflag}"
29+
30+
# List only directories
31+
# shellcheck disable=SC2139
32+
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
33+
34+
# See: https://superuser.com/a/656746/280737
35+
alias ll='LC_ALL="C.UTF-8" ls -alF'
36+
37+
# Always use color output for `ls`
38+
# shellcheck disable=SC2139
39+
alias ls="command ls ${colorflag}"
40+
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
41+
42+
# Always enable colored `grep` output
43+
alias grep='grep --color=auto '
44+
45+
# Enable aliases to be sudo’ed
46+
alias sudo='sudo '
47+
48+
# Get week number
49+
alias week='date +%V'
50+
51+
# Stopwatch
52+
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
53+
54+
# Canonical hex dump; some systems have this symlinked
55+
command -v hd > /dev/null || alias hd="hexdump -C"
56+
57+
# vhosts
58+
alias hosts='sudo nano /etc/hosts'
59+
60+
# copy working directory
61+
alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard'
62+
63+
# copy file interactive
64+
alias cp='cp -i'
65+
66+
# move file interactive
67+
alias mv='mv -i'
68+
69+
# untar
70+
alias untar='tar xvf'
71+
72+
# Zephir related
73+
alias untar='tar xvf'
74+
75+
PATH=$PATH:./vendor/bin

docker/8.0/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM composer:latest as composer
2+
FROM php:8.0-fpm
3+
4+
ADD ./extra.ini /usr/local/etc/php/conf.d/
5+
6+
# User/Group globals
7+
ENV PHP_VERSION="8.0" \
8+
PHALCON_VERSION="5.0.0RC1"
9+
10+
# Update
11+
RUN apt update -y && \
12+
apt install -y \
13+
apt-utils \
14+
git \
15+
nano \
16+
sudo \
17+
wget \
18+
zip
19+
20+
# PECL Packages
21+
RUN pecl install phalcon-${PHALCON_VERSION}
22+
23+
RUN docker-php-ext-install \
24+
pdo_mysql
25+
26+
# Install PHP extensions
27+
RUN docker-php-ext-enable \
28+
phalcon
29+
30+
# Composer
31+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
32+
# Bash script with helper aliases
33+
COPY ./.bashrc /root/.bashrc
34+
35+
CMD ["php-fpm"]

docker/8.0/extra.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
memory_limit=512M
2+
apc.enable_cli="On"
3+
session.save_path="/tmp"

docker/8.1/.bashrc

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/bash
2+
3+
# Easier navigation: .., ..., ...., ....., ~ and -
4+
alias ..="cd .."
5+
alias ...="cd ../.."
6+
alias ....="cd ../../.."
7+
alias .....="cd ../../../.."
8+
alias ~="cd ~" # `cd` is probably faster to type though
9+
alias -- -="cd -"
10+
11+
# Shortcuts
12+
alias g="git"
13+
alias h="history"
14+
15+
# Detect which `ls` flavor is in use
16+
if ls --color > /dev/null 2>&1; then # GNU `ls`
17+
colorflag="--color"
18+
else # OS X `ls`
19+
colorflag="-G"
20+
fi
21+
22+
# List all files colorized in long format
23+
# shellcheck disable=SC2139
24+
alias l="ls -lF ${colorflag}"
25+
26+
# List all files colorized in long format, including dot files
27+
# shellcheck disable=SC2139
28+
alias la="ls -laF ${colorflag}"
29+
30+
# List only directories
31+
# shellcheck disable=SC2139
32+
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
33+
34+
# See: https://superuser.com/a/656746/280737
35+
alias ll='LC_ALL="C.UTF-8" ls -alF'
36+
37+
# Always use color output for `ls`
38+
# shellcheck disable=SC2139
39+
alias ls="command ls ${colorflag}"
40+
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
41+
42+
# Always enable colored `grep` output
43+
alias grep='grep --color=auto '
44+
45+
# Enable aliases to be sudo’ed
46+
alias sudo='sudo '
47+
48+
# Get week number
49+
alias week='date +%V'
50+
51+
# Stopwatch
52+
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
53+
54+
# Canonical hex dump; some systems have this symlinked
55+
command -v hd > /dev/null || alias hd="hexdump -C"
56+
57+
# vhosts
58+
alias hosts='sudo nano /etc/hosts'
59+
60+
# copy working directory
61+
alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard'
62+
63+
# copy file interactive
64+
alias cp='cp -i'
65+
66+
# move file interactive
67+
alias mv='mv -i'
68+
69+
# untar
70+
alias untar='tar xvf'
71+
72+
# Zephir related
73+
alias untar='tar xvf'
74+
75+
PATH=$PATH:./vendor/bin

docker/8.1/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM composer:latest as composer
2+
FROM php:8.1-fpm
3+
4+
ADD ./extra.ini /usr/local/etc/php/conf.d/
5+
6+
# User/Group globals
7+
ENV PHP_VERSION="8.1" \
8+
PHALCON_VERSION="5.0.0RC1"
9+
10+
# Update
11+
RUN apt update -y && \
12+
apt install -y \
13+
apt-utils \
14+
git \
15+
nano \
16+
sudo \
17+
wget \
18+
zip
19+
20+
# PECL Packages
21+
RUN pecl install phalcon-${PHALCON_VERSION}
22+
23+
RUN docker-php-ext-install \
24+
pdo_mysql
25+
26+
# Install PHP extensions
27+
RUN docker-php-ext-enable \
28+
phalcon
29+
30+
# Composer
31+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
32+
# Bash script with helper aliases
33+
COPY ./.bashrc /root/.bashrc
34+
35+
CMD ["php-fpm"]

docker/8.1/extra.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
memory_limit=512M
2+
apc.enable_cli="On"
3+
session.save_path="/tmp"

0 commit comments

Comments
 (0)