Skip to content

Commit 74fdb4b

Browse files
authored
Merge pull request #26 from phalcon/1.x
Stable version to master
2 parents 2f07130 + 3e8d2aa commit 74fdb4b

File tree

290 files changed

+26831
-4
lines changed

Some content is hidden

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

290 files changed

+26831
-4
lines changed

.github/workflows/main.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
2+
# This file is part of Phalcon.
3+
#
4+
# (c) Phalcon Team <[email protected]>
5+
#
6+
# For the full copyright and license information, please view
7+
# the LICENSE file that was distributed with this source code.
8+
9+
name: REST API v6 CI
10+
on:
11+
push:
12+
paths-ignore:
13+
- '**.md'
14+
- '**.txt'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
env:
19+
fail-fast: true
20+
21+
# PHP extensions required by Composer
22+
EXTENSIONS: json, mbstring, pcov, pdo, pdo_mysql
23+
24+
permissions: { }
25+
jobs:
26+
27+
# PHP CodeSniffer inspection
28+
phpcs:
29+
name: "Quality gate"
30+
if: "!contains(github.event.head_commit.message, 'ci skip')"
31+
32+
permissions:
33+
contents: read
34+
35+
runs-on: ubuntu-22.04
36+
37+
strategy:
38+
fail-fast: true
39+
matrix:
40+
php:
41+
- '8.2'
42+
- '8.3'
43+
- '8.4'
44+
- '8.5'
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: "Setup PHP"
49+
uses: shivammathur/[email protected]
50+
with:
51+
php-version: ${{ matrix.php }}
52+
extensions: ${{ env.EXTENSIONS }}
53+
tools: pecl
54+
env:
55+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: "Install development dependencies with Composer"
58+
uses: "ramsey/composer-install@v3"
59+
with:
60+
composer-options: "--prefer-dist"
61+
62+
- name: "PHPCS"
63+
run: |
64+
composer cs
65+
66+
- name: "PHPStan"
67+
run: |
68+
composer analyze
69+
70+
unit-tests:
71+
needs: phpcs
72+
73+
permissions:
74+
contents: read # to fetch code (actions/checkout)
75+
76+
name: Unit tests / PHP-${{ matrix.php }}
77+
runs-on: ubuntu-22.04
78+
79+
strategy:
80+
matrix:
81+
php:
82+
- '8.2'
83+
- '8.3'
84+
- '8.4'
85+
- '8.5'
86+
87+
services:
88+
mariadb:
89+
image: mariadb:10.6
90+
ports:
91+
- "3306:3306"
92+
env:
93+
MYSQL_ROOT_PASSWORD: secret
94+
MYSQL_USER: phalcon
95+
MYSQL_DATABASE: phalcon
96+
MYSQL_PASSWORD: secret
97+
98+
redis:
99+
image: redis:8-alpine
100+
ports:
101+
- "6379:6379"
102+
103+
steps:
104+
- uses: actions/checkout@v4
105+
106+
- name: "Setup PHP"
107+
uses: shivammathur/[email protected]
108+
with:
109+
php-version: ${{ matrix.php }}
110+
extensions: ${{ env.EXTENSIONS }}
111+
tools: pecl
112+
env:
113+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
115+
- name: "Install development dependencies with Composer"
116+
uses: "ramsey/composer-install@v3"
117+
with:
118+
composer-options: "--prefer-dist"
119+
120+
- name: "Setup Tests"
121+
shell: bash
122+
run: |
123+
cp config/.env.ci .env
124+
mkdir -p tests/_output/coverage/
125+
126+
- name: "Run Migrations"
127+
if: always()
128+
run: |
129+
composer migrate
130+
131+
- name: "Run Unit Tests"
132+
if: always()
133+
run: |
134+
composer test-unit-coverage
135+
136+
- name: SonarCloud Scan
137+
uses: SonarSource/[email protected]
138+
env:
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
141+
with:
142+
projectBaseDir: ./
143+
args: >
144+
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }}
145+
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
146+
-Dsonar.sources=src/
147+
-Dsonar.exclusions=vendor/**,cv/**,tests/**
148+
-Dsonar.sourceEncoding=UTF-8
149+
-Dsonar.language=php
150+
-Dsonar.tests=tests/
151+
-Dsonar.php.coverage.reportPaths=tests/_output/cov.xml

.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
/cache/
2-
/config/development/
1+
.bash_history
2+
.cache
3+
.config
4+
.composer/
5+
composer.lock
6+
.env
7+
.local
8+
storage/logs/
9+
tests/_output
10+
vendor/

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 1.0.0
2+
3+
Under development

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing to Phalcon
2+
3+
Phalcon is an open source project and a volunteer effort. Phalcon welcomes contribution from everyone. Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
4+
5+
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
6+
7+
## Contributions
8+
9+
Contributions to Phalcon should be made in the form of GitHub pull requests. Each pull request will be reviewed by a core contributor (someone with permission to merge patches). Feedback can be provided and potentially changes requested or the pull request will be merged. All contributions should
10+
follow this format, even those from core contributors.
11+
12+
## Questions & Support
13+
14+
We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address all of them. Thus we only accept bug reports, new feature requests and pull requests in GitHub. Our great community and contributors are happy to help you though! Please use these community resources for obtaining help.
15+
16+
_Please use the [Documentation](https://phalcon.io/docs) before anything else. You can also use the search feature in our documents to find what you are looking for. If your question is still not answered, there are more options below._
17+
18+
* Questions should go to [GitHub Discussions](https://phalcon.io/discussions)
19+
* Come join the Phalcon [Discord](https://phalcon.io/discord)
20+
* Our social network accounts are:
21+
* [Telegram](https://phalcon.io/telegram)
22+
* [Gab](https://phalcon.io/gab)
23+
* [MeWe](https://phalcon.io/mewe)
24+
* [Twitter](https://phalcon.io/t)
25+
* [Facebook](https://phalcon.io/fb)
26+
* If you still believe that what you found is a bug, please
27+
[open an issue](https://github.com/phalcon/phalcon/issues/new)
28+
29+
Please report bugs when you've exhausted all of the above options.
30+
31+
## Bug Report Checklist
32+
33+
* Make sure you are using the latest released version of the composer packages.
34+
* If you have found a bug it is important to add relevant reproducibility information to your issue to allow us to reproduce the bug and fix it quicker. Add a script, small program or repository providing the necessary code to make everyone reproduce the issue reported easily.
35+
* Be sure that information such as OS, Phalcon version and PHP version are part of the bug report
36+
37+
## Pull Request Checklist
38+
39+
* Don't submit your pull requests to the `master` branch. Branch from the required branch and, if needed, rebase to the proper branch before submitting your pull request. If it doesn't merge cleanly with master you may be asked to rebase your changes
40+
* Don't put submodule updates in your pull request unless they are to landed commits
41+
* Add tests relevant to the fixed bug or new feature. Test classes should follow the [PSR-12 coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-coding-style-guide.md).
42+
43+
## Requesting Features
44+
45+
If you have a change or new feature in mind, please fill out an NFR on GitHub.
46+
47+
48+
Thanks!
49+
Phalcon Team

0 commit comments

Comments
 (0)