Skip to content

Commit 2315b34

Browse files
authored
Merge pull request #1 from niden/main
Initial release
2 parents 9ffdbcc + 3676cc4 commit 2315b34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3814
-3
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
DB_ADAPTER=mysql
2+
DB_HOST=127.0.0.1
3+
DB_NAME=phalcon
4+
DB_USERNAME=root
5+
DB_PASSWORD=password
6+
DB_PORT=3306

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Exclude files that don't need to be present in packages (so they're not downloaded by Composer)
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/Robofile.php export-ignore
5+
/*.md export-ignore
6+
/*.yml export-ignore

.github/workflows/main.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
9+
services:
10+
mysql:
11+
image: mysql:5.7
12+
env:
13+
MYSQL_ROOT_PASSWORD: password
14+
MYSQL_DATABASE: phalcon
15+
ports:
16+
- 3306:3306
17+
options: >-
18+
--health-cmd "mysqladmin ping"
19+
--health-interval 10s
20+
--health-timeout 5s
21+
--health-retries 5
22+
strategy:
23+
matrix:
24+
php: [7.4, 8.0]
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
extensions: phalcon-5.0.0beta1, pdo, mysql
35+
coverage: none
36+
37+
- name: Validate composer.json and composer.lock
38+
run: composer validate
39+
40+
- name: Install dependencies
41+
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
42+
43+
- name: Run test suite
44+
run: |
45+
php -r "file_exists('.env') || copy('.env.example', '.env');"
46+
php vendor/bin/codecept build
47+
php vendor/bin/codecept run unit
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Static Code Analysis
2+
# This workflow is triggered on pushes to the repository.
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpcs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2-beta
10+
with:
11+
fetch-depth: 1
12+
- name: Run PHP_CodeSniffer
13+
run: docker run --rm -v $(pwd):/data cytopia/phpcs --standard=./phpcs.xml

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.idea/
2+
/vendor/
3+
/framework-tests
4+
.env
5+
composer.lock

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## [1.0.0](https://github.com/Codeception/module-phalcon5/releases/tag/1.0.0) (12-11-2021)
2+
3+
- Support Phalcon 5.0.0beta1

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2011 Michael Bodnarchuk and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

Robofile.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
require __DIR__ . '/vendor/autoload.php';
4+
5+
use Codeception\Module\Phalcon5;
6+
use Codeception\Util\DocumentationHelpers;
7+
8+
class RoboFile extends \Robo\Tasks
9+
{
10+
use DocumentationHelpers;
11+
12+
public function buildDocs()
13+
{
14+
$className = Phalcon5::class;
15+
$classPath = str_replace('\\', '/', $className);
16+
$source = "https://github.com/Codeception/module-phalcon5/tree/master/src/$classPath.php";
17+
$sourceMessage = '<p>&nbsp;</p><div class="alert alert-warning">Module reference is taken from the source code. <a href="' . $source . '">Help us to improve documentation. Edit module reference</a></div>';
18+
$documentationFile = 'documentation.md';
19+
$this->generateDocumentationForClass($className, $documentationFile, $sourceMessage);
20+
}
21+
}

codeception.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
paths:
2+
tests: tests
3+
output: tests/_output
4+
data: tests/_data
5+
support: tests/_support
6+
envs: tests/_envs
7+
actor_suffix: Tester
8+
bootstrap: _bootstrap.php
9+
extensions:
10+
enabled:
11+
- Codeception\Extension\RunFailed
12+
params:
13+
- .env
14+
modules:
15+
enabled:
16+
- Db:
17+
dsn: 'mysql:host=%DB_HOST%;dbname=%DB_NAME%;port=%DB_PORT%'
18+
user: '%DB_USERNAME%'
19+
password: '%DB_PASSWORD%'
20+
populate: no
21+
cleanup: true
22+
dump: 'tests/_data/structure.sql'

0 commit comments

Comments
 (0)