Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.4 to v.5.1.4 update #166

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
f1d5c2e
Update README.md
shenyman Jan 17, 2023
1a8e46b
Update Helpers.php
shenyman Jan 17, 2023
a587826
Update config.php
shenyman Jan 17, 2023
f2b2632
Update ConfigProvider.php
shenyman Jan 17, 2023
6dd97dc
Update DbProvider.php
shenyman Jan 17, 2023
11ae1a3
Update AssetsProvider.php
shenyman Jan 17, 2023
dff146c
Update UrlProvider.php
shenyman Jan 17, 2023
bffaa95
Update FlashProvider.php
shenyman Jan 17, 2023
20cfaa1
Update SignUpForm.php
shenyman Jan 17, 2023
01c81f5
Update SecurityProvider.php
shenyman Jan 17, 2023
146ccd9
Update Users.php
shenyman Jan 17, 2023
eedd01c
Update LoginForm.php
shenyman Jan 17, 2023
75070e8
Update ProfilesForm.php
shenyman Jan 17, 2023
1f5fb87
Update ChangePasswordForm.php
shenyman Jan 17, 2023
285b894
Update ForgotPasswordForm.php
shenyman Jan 17, 2023
05657a3
Update UsersForm.php
shenyman Jan 17, 2023
31c723f
Update LoggerProvider.php
shenyman Jan 17, 2023
0323d15
Update ViewProvider.php
shenyman Jan 17, 2023
e46fbc9
Update composer.json
shenyman Jan 17, 2023
8c395f2
Update search.volt
shenyman Jan 17, 2023
b22744b
Update search.volt
shenyman Jan 17, 2023
aca97aa
Update composer.json
shenyman Jan 18, 2023
7efdb31
Update README.md
shenyman Jan 18, 2023
346562b
Update SessionBagProvider.php
shenyman Jan 18, 2023
30c74a5
Update PermissionsController.php
shenyman Jan 18, 2023
11fa395
Update PermissionsController.php
shenyman Jan 18, 2023
429d7fb
Update PermissionsController.php
shenyman Jan 18, 2023
573b45e
Update LoggerProvider.php
shenyman Jan 26, 2023
f281eb7
Update Application.php
shenyman Jan 28, 2023
73371ec
Update Acl.php
shenyman Jan 28, 2023
ff0615c
Update CryptProvider.php
shenyman Jan 28, 2023
bc36edc
Update LoggerProvider.php
shenyman Jan 28, 2023
f4f77ff
v.5 update
shenyman Jan 28, 2023
49e222b
Update validations.yml
shenyman Jan 28, 2023
fac2150
Update composer.json
shenyman Jan 28, 2023
11dae1d
Add files via upload
shenyman Jan 28, 2023
029a137
Add files via upload
shenyman Jan 28, 2023
95711de
Delete Dockerfile
shenyman Jan 28, 2023
11a3421
Update README.md
shenyman Jan 28, 2023
acf22a3
Add files via upload
shenyman Jan 28, 2023
ab34fae
Create .env.example
shenyman Jan 28, 2023
69ab838
Create .env.ci
shenyman Jan 28, 2023
ae3d79c
Delete install-phalcon.sh
shenyman Jan 28, 2023
d90c50b
Update Mail.php
shenyman Jan 28, 2023
cbe6441
Update docker-build.yml
shenyman Jan 28, 2023
0af48d4
Update providers.php
shenyman Jan 28, 2023
e505482
Update routes.php
shenyman Jan 28, 2023
551b078
Update config.php
shenyman Jan 28, 2023
145909b
Update acl.php
shenyman Jan 28, 2023
01b2dc0
Update index.php
shenyman Jan 28, 2023
7d6781f
Update phinx.php
shenyman Jan 28, 2023
fadcaac
Update codeception.yml
shenyman Jan 28, 2023
c0682ed
Update phpstan.neon.dist
shenyman Jan 28, 2023
592813b
Update psalm.xml.dist
shenyman Jan 28, 2023
576431b
Delete tests directory
shenyman Jan 28, 2023
585f2c4
Add files via upload
shenyman Jan 28, 2023
86afe28
Delete db directory
shenyman Jan 28, 2023
7ce13af
Add files via upload
shenyman Jan 28, 2023
5e4a23c
Update Acl.php
shenyman Jan 28, 2023
94a5243
Update AssetsProvider.php
shenyman Jan 28, 2023
20635e2
Update Acl.php
shenyman Jan 28, 2023
e923694
Update AclProvider.php
shenyman Jan 28, 2023
2ef3f9c
Update SessionBagProvider.php
shenyman Jan 28, 2023
53638a6
Update ModelsMetadataProvider.php
shenyman Jan 28, 2023
cada1f0
Update ModelsMetadataProvider.php
shenyman Jan 28, 2023
b64e891
Update providers.php
shenyman Jan 28, 2023
86dcad8
Update Application.php
shenyman Jan 29, 2023
21b25f3
Update DbProvider.php
shenyman Jan 29, 2023
99da5b9
Update FlashProvider.php
shenyman Jan 29, 2023
068be11
link_to -> tag.a with added url
shenyman Jan 30, 2023
6ce9293
Update private.volt
shenyman Jan 31, 2023
7fd83be
Update composer.json
shenyman Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/.env.test → .ci/.env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DB_ADAPTER=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=
DB_PASSWORD=secret
DB_NAME=vokuro

MAIL_FROM_NAME=Vokuro
Expand All @@ -22,4 +22,4 @@ MAIL_SMTP_USERNAME=
MAIL_SMTP_PASSWORD=

CODECEPTION_URL=127.0.0.1
CODECEPTION_PORT=8888
CODECEPTION_PORT=80
25 changes: 25 additions & 0 deletions .ci/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
APP_CRYPT_SALT=eEAfR|_&G&f,+vU]:jFr!!A&+71w1Ms9~8_4L!<@[N@DyaIP_2My|:+.u>/6m,$D
APP_BASE_URI=/
APP_PUBLIC_URL=dev.vokuro.phalcon.io

# Supported adapters are:
# - mysql
# - sqlite
# - pgsql
DB_ADAPTER=mysql
DB_HOST=vokuro-mysql
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=secret
DB_NAME=phalcon_vokuro

MAIL_FROM_NAME=Vokuro
[email protected]
MAIL_SMTP_SERVER=smtp.gmail.com
MAIL_SMTP_PORT=587
MAIL_SMTP_SECURITY=tls
MAIL_SMTP_USERNAME=
MAIL_SMTP_PASSWORD=

CODECEPTION_URL=127.0.0.1
CODECEPTION_PORT=8888
2 changes: 1 addition & 1 deletion .ci/create-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

set -e

: "${DB_NAME:=vokuro}"
: "${DB_NAME:=phalcon_vokuro}"

case "$DB_ADAPTER" in
"mysql")
Expand Down
34 changes: 0 additions & 34 deletions .ci/install-phalcon.sh

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build Vokuro image
run: docker build -t phalconphp/vokuro:4.1.2 -f docker/Dockerfile .
- name: Build Vokuro image 8.0
run: docker build -t phalconphp/vokuro:5.0.0-8.0 -f docker/8.0/Dockerfile .

- name: Build Vokuro image 8.1
run: docker build -t phalconphp/vokuro:5.0.0-8.1 -f docker/8.1/Dockerfile .
132 changes: 71 additions & 61 deletions .github/workflows/validations.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,98 @@
name: "Validations"
on: [push, pull_request]
jobs:
validate-code-style:
name: PSR-12 Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Validate composer.json and composer.lock
run: composer validate
name: Testing Suite

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
on: [push, pull_request]

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
env:
DB_HOST: '127.0.0.1'

- name: Install PHP_CodeSniffer composer package
run: composer global require "squizlabs/php_codesniffer=*"
jobs:
run:
runs-on: ubuntu-latest
name: Workflow - PHP-${{ matrix.php }}

- name: Validate PSR-12 Code Style
run: ~/.composer/vendor/bin/phpcs
services:
mysql:
image: mysql:5.7
ports:
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: phalcon
MYSQL_DATABASE: vokuro
MYSQL_PASSWORD: secret

validate-code-static:
name: Static Code with PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, psr, phalcon-4.0.5
key: cache-v2.0~14.05.2020
needs: validate-code-style
strategy:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4']
php: ['8.0', '8.1']

steps:
- name: Checkout the code
uses: actions/checkout@v1

- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}

- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
php-version: ${{ matrix.php }}
tools: pecl
extensions: mbstring, intl, json, phalcon-5.0.1
coverage: xdebug

- name: Get Composer Cache Directory
- name: Init Database
run: |
mysql -uroot -h127.0.0.1 -psecret -e 'CREATE DATABASE IF NOT EXISTS `vokuro`;'
- name: Validate composer.json and composer.lock
run: composer validate

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-composer-

- name: Install Composer dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Install Composer dependencies with PHPStan
run: composer require --prefer-dist --no-progress --no-suggest --dev phpstan/phpstan
- name: Run PHPCS
if: always()
run: vendor/bin/phpcs

- name: Run Psalm
if: always()
run: vendor/bin/psalm --show-info=false

- name: Run PHPStan
- name: Env file
if: always()
run: vendor/bin/phpstan analyse -l 5 src
run: cp -v ./.ci/.env.ci ./.env

# - name: Run migrations
# if: always()
# run: |
# vendor/bin/phinx migrate
#
# - name: Run seeds
# if: always()
# run: |
# vendor/bin/phinx seed:run

- name: Run tests
if: always()
run: |
sudo php -S 0.0.0.0 -t ./.htrouter.php &
vendor/bin/codecept build
vendor/bin/codecept run unit --coverage-xml=unit-coverage.xml
# vendor/bin/codecept run functional --coverage-xml=functional-coverage.xml
# vendor/bin/codecept run acceptance --coverage-xml=acceptance-coverage.xml

# - name: Upload to codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# directory: ./tests/_output/
# files: unit-coverage.xml,functional-coverage.xml,acceptance-coverage.xml
# name: codecov-umbrella # optional
# fail_ci_if_error: false
# verbose: true # optional (default = false)
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ Thanks.

To run this application on your machine, you need at least:

* PHP >= 7.2
* Phalcon >= 4.0
* PHP >= 7.4
* Phalcon >= 5.0
* MySQL >= 5.5
* Apache Web Server with `mod_rewrite enabled`, and `AllowOverride Options` (or `All`) in your `httpd.conf` or Nginx Web Server
* Latest [Phalcon Framework](https://github.com/phalcon/cphalcon) extension installed/enabled

### Install Vökuró via composer create-project

```bash
composer create-project phalcon/vokuro /path/to/vokuro-folder "4.1.2" --prefer-dist
composer create-project phalcon/vokuro /path/to/vokuro-folder "5.0.0" --prefer-dist
```

### Installing Dependencies via Composer
Expand All @@ -44,7 +44,7 @@ Run the composer installer:
```bash
cd vokuro
composer install
cp .env.example .env
cp ./.ci/.env.example .env
vendor/bin/phinx migrate
vendor/bin/phinx seed:run
```
Expand All @@ -64,11 +64,11 @@ If you wish to check older versions or newer ones currently under development, p

Phalcon is an open source project and a volunteer effort.
Vökuró does not have human resources fully dedicated to the maintenance of this software.
If you want something to be improved or you want a new feature please submit a Pull Request.
If you want something to be improved, or you want a new feature please submit a Pull Request.

## Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/phalcon#sponsor)]
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/phalcon#sponsor)]

<a href="https://opencollective.com/phalcon/#contributors">
<img src="https://opencollective.com/phalcon/tiers/sponsors.svg?avatarHeight=48&width=800" alt="sponsors">
Expand Down
2 changes: 1 addition & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extensions:

# Get params from .env file
params:
- tests/.env.test
- .env

error_level: "E_ALL"

Expand Down
25 changes: 12 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
}
],
"require": {
"php": ">=7.2",
"php": ">=7.4",
"ext-openssl": "*",
"ext-phalcon": "~4.0.0",
"robmorgan/phinx": "^0.11.1",
"swiftmailer/swiftmailer": "^6.2",
"vlucas/phpdotenv": "^3.6"
"ext-phalcon": "^5.0.0",
"robmorgan/phinx": "^0.12.12",
"symfony/mailer": "^6.0",
"vlucas/phpdotenv": "^5.4"
},
"require-dev": {
"codeception/codeception": "^4.1.6",
"phalcon/ide-stubs": "4.0.6",
"phpunit/phpunit": "^8.4",
"squizlabs/php_codesniffer": "3.5.5",
"vimeo/psalm": "^3.7",
"codeception/module-phpbrowser": "^1.0",
"codeception/module-asserts": "^1.2"
"codeception/codeception": "^5.0",
"codeception/module-asserts": "^3.0",
"codeception/module-phpbrowser": "^3.0",
"phalcon/ide-stubs": "^v5.0.1",
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^4.27",
"phpstan/phpstan": "^1.8"
},
"suggest": {
"ext-apc": "Needed to support caching ACL"
Expand All @@ -56,7 +56,6 @@
"exclude": [
"/.ci",
".dockerignore",
".travis.yml",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md"
]
Expand Down
3 changes: 2 additions & 1 deletion config/acl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);

/**
* This file is part of the Vökuró.
Expand All @@ -10,6 +9,8 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

return [
'private' => [
'users' => [
Expand Down
Loading