Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7701abe
Fix wrong variable check in scenario AJAX eqLogic validation
kwizer15 Sep 20, 2025
203b1c6
Fix duplicate position parameter in log::getDelta call
kwizer15 Sep 20, 2025
9959357
Fix duplicate position parameter in log::getDelta call (proApi)
kwizer15 Sep 20, 2025
60778c4
Fix PHP 8+ TypeError in cmd::formatValue() when round() receives non-…
kwizer15 Sep 21, 2025
b8768db
Merge pull request #3123 from kwizer15/fix/proapi-log
Salvialf Sep 21, 2025
9fb4d9b
Merge pull request #3120 from kwizer15/fix/jeeapi-log
Salvialf Sep 21, 2025
e607943
Update PHPStan baseline
Salvialf Sep 21, 2025
7c9b02b
Merge pull request #3126 from jeedom/update-phpstan-baseline
Sekiro-kost Sep 21, 2025
48d568b
Merge pull request #3119 from kwizer15/fix/scenario-ajax
Salvialf Sep 21, 2025
28169be
Update PHPStan baseline
Salvialf Sep 21, 2025
6515fe9
Merge pull request #3128 from jeedom/update-phpstan-baseline
Sekiro-kost Sep 21, 2025
818a8a3
Fix scenario report theme parameter: use $options instead of $_parame…
kwizer15 Sep 23, 2025
f9313dd
Merge pull request #3129 from kwizer15/fix/scenario-report-theme-para…
Sekiro-kost Sep 24, 2025
6f0382b
Update PHPStan baseline
Sekiro-kost Sep 24, 2025
2906e09
Merge pull request #3130 from jeedom/update-phpstan-baseline
Sekiro-kost Sep 24, 2025
ed0c9a0
Merge pull request #3124 from kwizer15/fix/cmd-format-value
Sekiro-kost Sep 25, 2025
96bea6c
Update PHPStan baseline
Sekiro-kost Sep 25, 2025
addac37
Merge pull request #3132 from jeedom/update-phpstan-baseline
Sekiro-kost Sep 25, 2025
a0fd920
[Jenkins] Updated translation
Sep 25, 2025
332049c
migrate to Composer autoloader
pifou25 Sep 22, 2024
82105a8
phpstan defined in composer.json
pifou25 Aug 2, 2025
6127534
Trad object
pifou25 Aug 1, 2025
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
44 changes: 18 additions & 26 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@ name: PHPStan

on:
push:
branches: [ alpha ]
branches: [ alpha, feat/object_config ]
pull_request:
branches: [ alpha ]

jobs:
phpstan:
runs-on: ubuntu-latest
# define every php version to test
strategy:
# do not stop at first fail
fail-fast: false
matrix:
php: [7.4, 8.2]

steps:
- uses: actions/checkout@v4

- name: Setup PHP 7.4 for dependencies
- name: Setup PHP ${{ matrix.php }} for dependencies
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: ${{ matrix.php }}

- name: Install Dependencies
run: composer update --ignore-platform-reqs

- name: Setup PHP 8.2 for PHPStan
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
run: |
# copy common.config.php for composer autoloader
cp core/config/common.config.sample.php core/config/common.config.php
# install composer dependencies
composer update --ignore-platform-reqs

- name: Restore PHPStan cache
id: cache-phpstan
Expand All @@ -32,12 +38,8 @@ jobs:
path: phpstan.phar
key: phpstan-1

- name: Download PHPStan
if: steps.cache-phpstan.outputs.cache-hit != 'true'
run: wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar

- name: Run PHPStan
run: php phpstan.phar analyse --configuration phpstan.neon
run: vendor/bin/phpstan analyse --configuration phpstan.neon

update-baseline:
needs: phpstan
Expand All @@ -50,9 +52,7 @@ jobs:

- name: Delete existing branch if exists
run: |
if git ls-remote --heads origin update-phpstan-baseline | grep update-phpstan-baseline; then
git push origin --delete update-phpstan-baseline
fi
git ls-remote --exit-code --heads origin update-phpstan-baseline && git push origin --delete update-phpstan-baseline

- name: Setup PHP 7.4 for dependencies
uses: shivammathur/setup-php@v2
Expand All @@ -62,19 +62,11 @@ jobs:
- name: Install Dependencies
run: composer update --ignore-platform-reqs

- name: Setup PHP 8.2 for PHPStan
uses: shivammathur/setup-php@v2
with:
php-version: 8.2

- name: Download PHPStan
run: wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar

- name: Generate new baseline
id: generate-baseline
run: |
cp phpstan-baseline.neon phpstan-baseline.neon.old
php phpstan.phar analyse --configuration phpstan.neon --generate-baseline
vendor/bin/phpstan analyse --configuration phpstan.neon --generate-baseline
if ! diff -q phpstan-baseline.neon phpstan-baseline.neon.old > /dev/null; then
echo "baseline_changed=true" >> $GITHUB_OUTPUT
fi
Expand Down
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,24 @@
"platform": {
"php": "7.4"
}
},
"require-dev": {
"phpstan/phpstan": "^2.1"
},
"autoload": {
"psr-4": {
"Jeedom\\plugins\\": "plugins/"
},
"files": [
"core/config/common.config.php",
"core/php/utils.inc.php",
"core/config/jeedom.config.php",
"core/config/compatibility.config.php"
],
"classmap": [
"core/class/",
"core/com/",
"core/repo/"
]
}
}
91 changes: 75 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/ajax/cache.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
include_file('core', 'authentification', 'php');

if (!isConnect('admin')) {
throw new Exception(__('401 - Accès non autorisé', __FILE__), -1234);
throw new Exception(new Trad('401 - Accès non autorisé', __FILE__), -1234);
}

ajax::init();
Expand Down Expand Up @@ -54,7 +54,7 @@
ajax::success();
}

throw new Exception(__('Aucune méthode correspondante à :', __FILE__) . ' ' . init('action'));
throw new Exception(new Trad('Aucune méthode correspondante à :', __FILE__) . ' ' . init('action'));
/* * *********Catch exeption*************** */
} catch (Exception $e) {
ajax::error(displayException($e), $e->getCode());
Expand Down
Loading