From fa89e09df0c551e381918930ad98fcf033328440 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:27:27 -0500 Subject: [PATCH 01/11] Updating license years --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index e9a74a6..cec7c50 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 The Phalcon PHP Framework +Copyright (c) 2012-present The Phalcon PHP Framework Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 6013498f44a9f93a3c81cb5524c01bf89a5414b9 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:27:36 -0500 Subject: [PATCH 02/11] adjusting .gitignore --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6ffe3aa..4bb08c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/cache/ -/config/development/ +.composer +.bash_history +vendor From e5186e9794a85eb8ec2cebc03ef813cb860efed7 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:27:56 -0500 Subject: [PATCH 03/11] adding test folder structure --- tests/_output/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/_output/.gitkeep diff --git a/tests/_output/.gitkeep b/tests/_output/.gitkeep new file mode 100644 index 0000000..e69de29 From f68ca7f9299037af309c846417a74a4d536ddd74 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:28:17 -0500 Subject: [PATCH 04/11] added phpunit config files --- phpunit.php | 15 +++++++++++++++ phpunit.xml.dist | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 phpunit.php create mode 100644 phpunit.xml.dist diff --git a/phpunit.php b/phpunit.php new file mode 100644 index 0000000..39cfdb6 --- /dev/null +++ b/phpunit.php @@ -0,0 +1,15 @@ + + + + + ./tests/Unit/ + + + + + ./src + + + From 664a03698106aa8ade67d49d7b5c2d266a2ef57c Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:28:30 -0500 Subject: [PATCH 05/11] added phpstan config --- phpstan.neon | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 phpstan.neon diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..776ccd8 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: max + paths: + - src From e93a3850cf6e059cc8ef7468bfa7cb2aec80dea9 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:28:38 -0500 Subject: [PATCH 06/11] added code sniffer config --- phpcs.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 phpcs.xml diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..0af51b5 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,12 @@ + + + Phalcon REST API v6 Coding Standards + + + + + + + src + tests/Unit + From fd564b8033505da34fb3d931bf9e3b96c38efe45 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:34:15 -0500 Subject: [PATCH 07/11] adding github actions support with sonarqube --- .github/workflows/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..35fbaac --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: REST API v6 CI +on: + push: + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 3d44dfa08c7a9be17e0026fad1d131fbf98c89bc Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:45:42 -0500 Subject: [PATCH 08/11] added sonar config --- sonar-project.properties | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..f3412ca --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=niden-code_phalcon-rest-api-v6 +sonar.organization=niden + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=phalcon-rest-api-v6 +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 From 2d8e12ffe2c7c05ea2fe2ffd254cf6351e3d309b Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 26 Aug 2025 11:47:20 -0500 Subject: [PATCH 09/11] added composer with initial packages --- composer.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..9e16378 --- /dev/null +++ b/composer.json @@ -0,0 +1,51 @@ +{ + "name": "phalcon/rest-api", + "type": "library", + "description": "Sample REST API application implemented with Phalcon v6", + "keywords": [ + "phalcon", + "framework", + "sample app", + "rest-api", + "rest", + "api" + ], + "homepage": "https://phalcon.io", + "license": "MIT", + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/phalcon/rest-api/graphs/contributors" + } + ], + "require": { + "php": ">=8.2", + "ext-json": "*", + "ext-mbstring": "*", + "robmorgan/phinx": "^0.16.10", + "vlucas/phpdotenv": "^5.6" + }, + "require-dev": { + "pds/composer-script-names": "^1.0", + "pds/skeleton": "*", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^10.5", + "squizlabs/php_codesniffer": "^3.13" + }, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true + }, + "replace": { + "symfony/polyfill-php80": "*", + "symfony/polyfill-ctype": "*", + "symfony/polyfill-mbstring": "*" + }, + "scripts": { + "analyze": "phpstan analyse -c phpstan.neon --memory-limit=512M", + "cs": "vendor/bin/phpcs --standard=phpcs.xml", + "cs-fix": "vendor/bin/phpcbf --standard=phpcs.xml", + "test-unit": "vendor/bin/phpunit -c phpunit.xml.dist --display-all-issues" + } +} From f3f961fe8b26de8f5f38232a39102e70be219438 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Thu, 6 Nov 2025 13:29:15 +0000 Subject: [PATCH 10/11] Update phpcs.xml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- phpcs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index 0af51b5..d06467d 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,7 +1,7 @@ Phalcon REST API v6 Coding Standards - + From 383b89dc454929388abdc06262fafcf67c94fe75 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Thu, 6 Nov 2025 13:29:48 +0000 Subject: [PATCH 11/11] Update composer.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 9e16378..725d63d 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,8 @@ }, "replace": { "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*", + "symfony/polyfill-php82": "*", "symfony/polyfill-ctype": "*", "symfony/polyfill-mbstring": "*" },