Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
561 commits
Select commit Hold shift + click to select a range
6b061d9
chore: Code refactor
nuxsmin Dec 7, 2023
dc43228
chore(wip): Rework plugins architecture
nuxsmin Dec 8, 2023
9411122
chore(wip): Rework plugins architecture
nuxsmin Dec 8, 2023
05186e1
chore(tests): UT for AccountSearchRepository
nuxsmin Dec 8, 2023
17432e0
chore: Code refactoring
nuxsmin Dec 8, 2023
3d8891e
chore: Code refactoring
nuxsmin Dec 8, 2023
9d9fc63
chore: Fix syntax
nuxsmin Dec 9, 2023
efea16c
chore: Minor refactor
nuxsmin Dec 9, 2023
f519f6b
chore: Refactor AuthTokenRepository
nuxsmin Dec 9, 2023
ea72a0c
chore(tests): Change tests namespace
nuxsmin Dec 9, 2023
5c5dc57
chore(tests): UT for AuhToken
nuxsmin Dec 10, 2023
1426331
fix(tests): UT for AuthTokenRepository
nuxsmin Dec 10, 2023
add54d5
chore: Accept any extra data
nuxsmin Dec 16, 2023
a76610f
fix(tests): UT for CategoryRepository
nuxsmin Dec 16, 2023
31d78fb
fix(tests): UT for Category service
nuxsmin Dec 16, 2023
799829f
chore: Semantic naming
nuxsmin Dec 16, 2023
6e4f532
chore(tests): UT for ClientRepository
nuxsmin Jan 12, 2024
28dc47f
chore(tests): UT for Client service
nuxsmin Jan 12, 2024
739f40b
chore(tests): UT for Config service & repository
nuxsmin Jan 14, 2024
78de6f9
chore(tests): UT for ConfigFile service
nuxsmin Jan 15, 2024
49805d6
chore(tests): UT for UpgradeConfig service
nuxsmin Jan 15, 2024
7eee87b
chore: Refactor Account interfaces naming
nuxsmin Jan 16, 2024
37b49d6
chore: Refactor Api interfaces naming
nuxsmin Jan 16, 2024
f68de1f
chore: Refactor AuthToken interfaces naming
nuxsmin Jan 16, 2024
f697f70
chore(test): Refactor test naming
nuxsmin Jan 16, 2024
c87f3ab
chore: Refactor Category naming
nuxsmin Jan 16, 2024
24fcc0a
chore: Refactor Client naming
nuxsmin Jan 16, 2024
162105d
chore(tests): Refactor ConfigBackup naming
nuxsmin Jan 16, 2024
c263a8b
chore(tests): UT for MasterPass service
nuxsmin Jan 16, 2024
35fa0f3
chore(tests): UT for TemporaryMasterPass service
nuxsmin Jan 20, 2024
3fd0072
chore(tests): UT for custom field repositories.
nuxsmin Jan 21, 2024
bf9ba8d
chore(tests): UT for CustomFieldCrypt service
nuxsmin Jan 22, 2024
38e84ca
chore(tests): UT for CustomFieldData service
nuxsmin Jan 27, 2024
c49f328
chore(tests): Naming and fix ID generators
nuxsmin Jan 28, 2024
37f1d9b
chore(tests): UT for CustomFieldDefinition service
nuxsmin Jan 28, 2024
e8173b7
chore(tests): UT for CustomFieldType service
nuxsmin Jan 28, 2024
054ee98
chore: Refactor UpgradeCustomFieldData service
nuxsmin Jan 28, 2024
535f114
chore(tests): UT for UpgradeCustomFieldData service
nuxsmin Jan 29, 2024
b5035f9
ci: Update codeclimate-action version
nuxsmin Jan 29, 2024
1205f42
chore: Remove unneeded classes
nuxsmin Feb 3, 2024
6f3ed10
chore(tests): UT for BackupFileHelper class
nuxsmin Feb 4, 2024
6543d3f
chore: Refactor XML export
nuxsmin Feb 10, 2024
b7284cb
chore(tests): UT for XmlAccountExport
nuxsmin Feb 10, 2024
735cb29
chore: Refactor XML text encoding
nuxsmin Feb 10, 2024
f6879b5
chore(tests): UT for XmlCategoryExport
nuxsmin Feb 10, 2024
5a55f4e
chore(tests): Fix test
nuxsmin Feb 10, 2024
f8220a3
chore(tests): UT for XmlClientExport
nuxsmin Feb 10, 2024
1d65e6a
chore(tests): UT for XmlTagExport
nuxsmin Feb 10, 2024
3e313e8
chore(tests): UT for XmlExport
nuxsmin Feb 11, 2024
d020963
chore(tests): UT for XmlVerify service
nuxsmin Feb 17, 2024
0d905b4
chore(tests): UT for XmlVerify service
nuxsmin Feb 17, 2024
0240b0a
chore(tests): UT for CsvImport service
nuxsmin Feb 21, 2024
65938e7
chore: Refactor import services
nuxsmin Feb 25, 2024
ddbbb05
fix: Wrong arguments
nuxsmin Feb 25, 2024
964944c
chore: Refactor import services
nuxsmin Feb 29, 2024
cb026b1
chore(tests): UT for Import service
nuxsmin Mar 2, 2024
7df5384
chore(tests): UT for ImportStrategy service
nuxsmin Mar 2, 2024
7f84c30
chore(tests): UT for ImportStrategy service
nuxsmin Mar 2, 2024
110604f
chore(tests): UT for KeepassImport service
nuxsmin Mar 3, 2024
2ffcaef
chore: Use generator instead of callback
nuxsmin Mar 3, 2024
d5d6a93
chore(tests): UT for SyspassImport service
nuxsmin Mar 4, 2024
155dd22
deps(php): Upgrade PhpUnit and PHP version
nuxsmin Mar 4, 2024
2c44b4f
chore(tests): UT for LdapImport service
nuxsmin Mar 8, 2024
6232c69
chore(tests): UT for XmlFile service
nuxsmin Mar 8, 2024
1b4de77
chore: Refactor Install services
nuxsmin Mar 8, 2024
2e4eca1
chore(tests): UT for ItemPreset
nuxsmin Mar 9, 2024
ff9bf9f
chore: Remove unneeded classes
nuxsmin Mar 9, 2024
d17b501
chore: Fix wrong classes naming
nuxsmin Mar 9, 2024
522bada
chore: Refactor encryptable models
nuxsmin Mar 9, 2024
5103fab
chore(tests): UT for Notification repository
nuxsmin Mar 9, 2024
db73e69
chore(tests): UT for Notification service
nuxsmin Mar 10, 2024
b3b83c1
chore(tests): UT for Mail service
nuxsmin Mar 10, 2024
0461d2e
chore(tests): fix
nuxsmin Mar 10, 2024
e850c5e
chore(tests): UT for Mail service
nuxsmin Mar 10, 2024
8640ada
chore(tests): UT for Plugin repository
nuxsmin Mar 10, 2024
8fb81f9
chore(tests): UT for PluginData repository
nuxsmin Mar 10, 2024
bbc4e64
chore(tests): UT for PluginData repository
nuxsmin Mar 10, 2024
4d72408
chore(tests): UT for PluginCompatility service
nuxsmin Mar 10, 2024
dd21f9c
chore(tests): UT for PluginData service
nuxsmin Mar 10, 2024
c1c0b00
chore(tests): UT for PluginLoader service
nuxsmin Mar 10, 2024
dc53935
chore(tests): UT for PluginRegister service
nuxsmin Mar 10, 2024
df9f31e
chore(tests): UT for PluginManager service
nuxsmin Mar 11, 2024
8b7a4dc
chore(tests): UT for PluginOperation service
nuxsmin Mar 11, 2024
cb9f393
chore(tests): UT for PluginUpgrader service
nuxsmin Mar 11, 2024
a797056
chore(tests): UT for Eventlog repository
nuxsmin Mar 11, 2024
11ae839
chore(tests): UT for Track repository
nuxsmin Mar 11, 2024
35f8687
chore(tests): UT for Track service
nuxsmin Mar 15, 2024
99cc02e
chore(tests): UT for Track service
nuxsmin Mar 15, 2024
b939800
chore(tests): UT for Eventlog service
nuxsmin Mar 15, 2024
8879da3
chore(tests): UT for Tag repository
nuxsmin Mar 16, 2024
12050e6
chore(tests): Locales and PHP version on CI
nuxsmin Mar 16, 2024
95c1e5d
ci(tests): Setup locales
nuxsmin Mar 16, 2024
86d9ebb
ci(tests): Setup locales
nuxsmin Mar 16, 2024
94d5c3c
ci(tests): Fix tests
nuxsmin Mar 17, 2024
0e228f3
ci(tests): Remove abstract mocks
nuxsmin Mar 17, 2024
c2f149e
chore(tests): Configure PHPUnit
nuxsmin Mar 17, 2024
015996e
chore(tests): Configure PHPUnit
nuxsmin Mar 17, 2024
cd7a150
chore(tests): Configure PHPUnit
nuxsmin Mar 17, 2024
9dafac2
chore(tests): Remove deprecations
nuxsmin Mar 17, 2024
a766de8
chore(tests): Refactor TransactionAware callback
nuxsmin Mar 17, 2024
dabac68
chore(tests): UT for User repository
nuxsmin Mar 24, 2024
556ef08
chore(tests): UT for User repository
nuxsmin Mar 24, 2024
8bc7d87
chore(tests): UT for UserGroup repository
nuxsmin Mar 25, 2024
7c1bc26
chore(tests): UT for UserPassRecover repository
nuxsmin Mar 25, 2024
1505be6
chore(tests): UT for UserPassRecover repository
nuxsmin Mar 25, 2024
2e5f7a2
chore(tests): UT for UserProfile repository
nuxsmin Mar 25, 2024
624a717
chore(tests): UT for UserToUserGroup repository
nuxsmin Mar 25, 2024
5c3da6f
chore(tests): UT for Database service
nuxsmin Mar 29, 2024
d48f920
chore(tests): UT for MysqlFileParser
nuxsmin Mar 29, 2024
16d9d68
chore(tests): UT for MysqlFileParser
nuxsmin Mar 30, 2024
cc25090
chore(tests): UT for MysqlHandler
nuxsmin Mar 30, 2024
404f901
chore(tests): UT for PDOWrapper
nuxsmin Mar 30, 2024
22f7c6b
chore(tests): UT for XmlFileStorage service
nuxsmin Apr 1, 2024
963b4fa
chore(tests): UT for UserGroup service
nuxsmin Apr 1, 2024
eea34cf
chore(tests): UT for UserPassRecover service
nuxsmin Apr 1, 2024
1d2e991
chore(tests): UT for UserMasterPass service
nuxsmin Apr 7, 2024
6bfbd9f
chore(tests): UT for UserPass service
nuxsmin Apr 7, 2024
f8ce2f1
chore(tests): UT for UserPass service
nuxsmin Apr 7, 2024
1fd3946
chore(tests): UT for UserProfile service
nuxsmin Apr 7, 2024
465fec9
chore(tests): UT for User service
nuxsmin Apr 9, 2024
2b8b593
chore(tests): UT for UserToUserGroup service
nuxsmin Apr 11, 2024
43fe145
chore(tests): UT for UserToUserGroup service
nuxsmin Apr 11, 2024
fb68ff5
chore(tests): UT for LdapCheck service
nuxsmin Apr 13, 2024
04c49cb
chore(tests): UT for Login service
nuxsmin Apr 15, 2024
3cfd1b2
chore(tests): UT for LoginAuthHandler service
nuxsmin Apr 17, 2024
f093f04
chore(tests): UT for LoginMasterPass service
nuxsmin Apr 19, 2024
008532e
chore(tests): UT for LoginUser service
nuxsmin Apr 19, 2024
21f392b
chore(tests): UT for LoginBase service
nuxsmin Apr 19, 2024
03e4a57
chore(tests): UT for PluginBase service
nuxsmin Apr 19, 2024
4e346d9
chore: Bootstrap refactoring
nuxsmin Apr 20, 2024
5e1f4be
chore: Bootstrap refactoring
nuxsmin Apr 20, 2024
cda692d
chore: Relocate classes
nuxsmin Apr 21, 2024
92d7786
chore: Create Serde
nuxsmin Apr 27, 2024
c1a5b7f
chore(tests): Add null character
nuxsmin Apr 27, 2024
0ad9899
chore(tests): UT for CryptSessionHandler
nuxsmin Apr 27, 2024
0a8da5d
chore(tests): UT for RequestBasedPassword
nuxsmin Apr 27, 2024
ed1d454
chore(tests): UT for HttpUtil
nuxsmin Apr 27, 2024
e1dcf74
chore(tests): UT for Checks and DateUtil
nuxsmin Apr 27, 2024
ce7d02f
chore(tests): UT for Image
nuxsmin Apr 28, 2024
e916420
chore: Move ErrorUtil
nuxsmin Apr 28, 2024
04d2459
chore: Move Providers
nuxsmin Apr 28, 2024
6c131cb
chore: Rename classes
nuxsmin Apr 28, 2024
016aa1d
chore: Refactor structure
nuxsmin Apr 28, 2024
fc5afcc
chore: Refactor structure
nuxsmin Apr 28, 2024
602e054
chore: Refactor structure
nuxsmin Apr 28, 2024
5e96820
chore(tests): UT for adapters
nuxsmin Apr 29, 2024
5fd1a5c
chore: Remove Task
nuxsmin Apr 30, 2024
3ad267c
chore(tests): Change directory name and strict types
nuxsmin May 1, 2024
40c6cb1
chore: Use strict types
nuxsmin May 1, 2024
99c8e4c
chore(tests): UT for UpgradeDatabase
nuxsmin May 1, 2024
84f41f2
chore(tests): UT for UpgradeDatabase
nuxsmin May 2, 2024
7a11df9
chore(tests): UT for UpgradeDatabase
nuxsmin May 2, 2024
1aabbb0
chore(tests): Fix test
nuxsmin May 2, 2024
0304221
chore(tests): UT for UpgradeApp and UpgradeConfig services
nuxsmin May 2, 2024
10dedaa
chore: Refactor upgrade subsystem
nuxsmin May 3, 2024
ac8565b
style(php): Fix copyright comment
nuxsmin May 4, 2024
1a25c45
chore(php): Refactor Template handler
nuxsmin May 5, 2024
d61e935
test(tests): UT for OutputHandler class
nuxsmin May 6, 2024
c758b7f
test(tests): UT for TemplateResolver class
nuxsmin May 6, 2024
9b170b2
test(tests): UT for JsonResponse class
nuxsmin May 8, 2024
c6d2c4b
test(tests): Fix regex
nuxsmin May 9, 2024
acd3d06
refactor(php): Decouple view data from domain
nuxsmin May 9, 2024
9c27295
test(tests): UT for DatabaseHandler class
nuxsmin May 9, 2024
9fe1ad9
refactor(php): Rebuild logging setup
nuxsmin May 9, 2024
814d1e0
test(tests): UT for MailHandler class
nuxsmin May 11, 2024
e7f6d15
refactor(php): Relocate and rename classes
nuxsmin May 11, 2024
2328597
refactor(php): Use attribute to handle events.
nuxsmin May 11, 2024
b477fb6
test(tests): UT for NotificationEvent service
nuxsmin May 11, 2024
a00002b
test(tests): UT for PhpMailerService service
nuxsmin May 11, 2024
6d75b99
test(tests): UT for RouteContext handler
nuxsmin May 12, 2024
0e43458
refactor(php): Improve session handling
nuxsmin May 13, 2024
d0adf93
refactor(php): Improve session handling
nuxsmin May 13, 2024
2ee21ac
refactor(php): Improve crypted session handling
nuxsmin May 16, 2024
a6dad33
test(DI): Implement definitions test
nuxsmin Jun 7, 2024
5e81f2e
test(AccountPreset): Add missing method test
nuxsmin Jun 8, 2024
5673c1d
test(AccountItems): Add UT
nuxsmin Jun 9, 2024
67ec55d
test(Event): Add UT
nuxsmin Jun 9, 2024
1ca9ccf
test(ConfigFile): Rework config mapper
nuxsmin Jun 9, 2024
0c200ab
test(LogHandler): Add UT
nuxsmin Jun 10, 2024
545631a
chore(YAML): Use YAML instead of XML
nuxsmin Jul 13, 2024
d3c6448
test(IT): Setup integration tests
nuxsmin Jul 27, 2024
1ce5e0d
test(IT): Test account copy
nuxsmin Jul 28, 2024
6a9dae7
test(IT): Test account pass copy
nuxsmin Jul 30, 2024
d1a3764
test(IT): Test account history pass copy
nuxsmin Aug 2, 2024
64a238e
test(IT): Test account create
nuxsmin Aug 3, 2024
630aa0d
test(IT): Refactor common code
nuxsmin Aug 3, 2024
ad5135a
test(IT): Test account delete view
nuxsmin Aug 4, 2024
e7782c5
test(IT): Test account edit pass
nuxsmin Aug 4, 2024
3f2f708
test(IT): Test account edit pass
nuxsmin Aug 4, 2024
95c98ae
test(IT): Rework output handler call
nuxsmin Aug 4, 2024
c8471a6
test(IT): Rework output handler exceptions
nuxsmin Aug 4, 2024
3f8f52d
test(IT): Test account index
nuxsmin Aug 4, 2024
a01693a
test(IT): Test account request
nuxsmin Aug 5, 2024
1fb90bc
test(IT): Test account copy
nuxsmin Aug 5, 2024
1879e58
test(IT): Test account copy
nuxsmin Aug 6, 2024
47e3112
test(IT): Test account create
nuxsmin Aug 6, 2024
7e9342b
test(IT): Test account delete
nuxsmin Aug 6, 2024
3307e92
test(IT): Test account edit
nuxsmin Aug 7, 2024
4613c00
test(IT): Test account edit pass
nuxsmin Aug 7, 2024
bbc9b6a
test(IT): Test account restore
nuxsmin Aug 9, 2024
8e762f8
test(IT): Test account request
nuxsmin Aug 12, 2024
fd666c9
test(IT): Test account search
nuxsmin Aug 12, 2024
83a6c61
test(IT): Test account view
nuxsmin Aug 13, 2024
e513a7f
test(IT): Test account history view
nuxsmin Aug 14, 2024
9cec4be
test(IT): Test account link view
nuxsmin Aug 15, 2024
6299fa9
test(IT): Test account pass view
nuxsmin Aug 15, 2024
200e955
test(IT): Test account pass history view
nuxsmin Aug 15, 2024
ff9e041
test(IT): Test account favorite use cases
nuxsmin Aug 16, 2024
7cad0e4
test(IT): Test account file use cases (WIP)
nuxsmin Aug 20, 2024
62e4116
test(UT): Fix AccountHistory test
nuxsmin Aug 21, 2024
9c8001f
test(UT): Fix AccountHistory test
nuxsmin Aug 21, 2024
3e9ca83
Merge remote-tracking branch 'origin/feat/code_refactoring' into feat…
nuxsmin Aug 21, 2024
0dc169b
test(UT): Fix AccountHistory datetime
nuxsmin Aug 21, 2024
f602c79
test(IT): Test account file use cases (WIP)
nuxsmin Aug 21, 2024
b85fbdc
test(IT): Test account file use cases (WIP)
nuxsmin Aug 21, 2024
d270ec6
test(IT): Test account history manager use cases
nuxsmin Aug 21, 2024
3165446
chore(Events): Simplify events
nuxsmin Aug 21, 2024
1a77249
test(UT): Fix Account History test
nuxsmin Aug 22, 2024
ef4b7b6
test(IT): Test account manager use cases (WIP)
nuxsmin Aug 22, 2024
e494119
test(IT): Refactor output checker
nuxsmin Aug 22, 2024
ed5ed78
test(IT): Test account manager use cases
nuxsmin Aug 23, 2024
5b0efb6
chore(Refactor): Use abstract instead of trait
nuxsmin Aug 23, 2024
b713771
chore(Refactor): Move output handling to bootstrap
nuxsmin Aug 28, 2024
8aa99c2
chore(Refactor): Pre-check controllers action
nuxsmin Aug 28, 2024
efec642
test(IT): Test auth token use cases
nuxsmin Aug 28, 2024
31fb6af
test(IT): Test bootstrap use cases
nuxsmin Aug 28, 2024
b89a585
test(IT): Test bootstrap use cases
nuxsmin Aug 28, 2024
fd7f0c2
test(AuthToken): Fix test
nuxsmin Aug 28, 2024
06dde34
test(Refactor): Replace output for body checker
nuxsmin Aug 29, 2024
f2e53de
test(IT): Test bootstrap use cases
nuxsmin Aug 29, 2024
04edbc3
test(IT): Test Category use cases
nuxsmin Aug 29, 2024
e2d67fe
test(IT): Test Client use cases
nuxsmin Aug 29, 2024
7b24cde
test(IT): Test Config Account use cases
nuxsmin Aug 29, 2024
332e2bf
test(IT): Test Config Backup use cases (WIP)
nuxsmin Aug 29, 2024
7a472d7
test(IT): Test Config Backup use cases
nuxsmin Aug 30, 2024
419915a
test(fix): Fix tests
nuxsmin Aug 30, 2024
4d1708e
test(refactor): Extract duplicated code
nuxsmin Sep 1, 2024
2508f40
test(IT): Test Config Encryption use cases (WIP)
nuxsmin Sep 5, 2024
e264035
test(IT): Test Config Encryption use cases
nuxsmin Sep 5, 2024
04554ed
test(IT): Test Config General use cases (WIP)
nuxsmin Sep 6, 2024
7bd90d1
test(fix): Fix Config Backup UT
nuxsmin Sep 7, 2024
8350762
test(IT): Test Config General use cases (WIP)
nuxsmin Sep 7, 2024
61a6fc3
test(IT): Test Config General use cases
nuxsmin Sep 7, 2024
2d85d78
test(IT): Test Config Import use cases
nuxsmin Sep 14, 2024
f7aa81a
test(IT): Test Ldap Check use cases
nuxsmin Oct 16, 2024
8ab83ba
test(IT): Test Ldap Import check use cases
nuxsmin Oct 25, 2024
e5a5e01
test(IT): Test Ldap Import use cases
nuxsmin Oct 25, 2024
20d3ae4
test(IT): Test Ldap Dave use cases
nuxsmin Oct 26, 2024
c877d7d
test(IT): Test Mail save use cases
nuxsmin Dec 7, 2024
4b83c27
test(IT): Test Mail save use cases
nuxsmin Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
787 changes: 787 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Please, notice that this path could be outside the webserver root. You can move it and then update accordingly
# CONFIG_PATH="/var/www/html/syspass/app/config"

# This path should be accesible by the webserver since backups and export files could be downloaded from the UI
# BACKUP_PATH="/var/www/html/syspass/app/backup"

# This path could be outside the webserver root and preferably in a separate partition, because it will store a lot of small files for caching purposes
# CACHE_PATH="/var/www/html/syspass/app/cache"

# This path could be outside the webserver root
# TMP_PATH="/var/www/html/syspass/app/temp"

# The main configuration file
# CONFIG_FILE="config.xml"

# Actions file is meant to contain all the actions supported by the application
# ACTIONS_FILE="actions.xml"

# Mime types file is meant to contain all the mimetypes supported by the application (from https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types)
# MIMETYPES_FILE="mime.xml"

# The log file will be used to log all the actions and error messages from the application. It could outside the websever root.
# LOG_FILE="syspass.log"

# Whether to enable (true) or disable (false) the debug mode. It's useful when trying to solve some issues and developing
# DEBUG=true
140 changes: 140 additions & 0 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Feature Build & Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
unitary:
name: Build & Test (UT) ${{ matrix.php }}/${{ matrix.platform }}
strategy:
matrix:
platform: [ 'ubuntu-latest' ]
php: [ '8.2' ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3

- name: Setup locales
run: |
sudo locale-gen es_ES.UTF-8 en_US.UTF-8 && sudo update-locale

- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, gd, ldap, gettext, pdo_mysql
# tools: phpunit
coverage: xdebug
env:
fail-fast: true

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

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

- name: Install dependencies
run: |
composer install \
--prefer-dist \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist

- name: Unitary tests
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
XDEBUG_MODE: coverage
with:
coverageCommand: ./vendor/bin/phpunit -c ./tests/phpunit.xml --group unitary --testsuite core
coverageLocations: ./tests/_output/coverage-clover.xml:clover

integration:
name: Build & Test (IT) ${{ matrix.php }}/${{ matrix.platform }}
if: ${{ vars.TESTS_INTEGRATION_ENABLED == 'true' }}
needs: [ unitary ]
strategy:
matrix:
platform: [ 'ubuntu-latest' ]
php: [ '8.1', '8.2' ]
runs-on: ${{ matrix.platform }}
env:
DB_SERVER: 127.0.0.1
DB_NAME: syspass
DB_USER: root
DB_PASS: syspass
DB_PORT: 3306
services:
mariadb:
image: mariadb:10.3
env:
MYSQL_DATABASE: ${{ env.DB_NAME }}
MYSQL_ROOT_PASSWORD: ${{ env.DB_PASS }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3

- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, gd, ldap, gettext, pdo_mysql
# tools: phpunit
coverage: xdebug
env:
fail-fast: true

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

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

- name: Install dependencies
run: |
composer install \
--prefer-dist \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist

- name: Setup database
run: |
set -euo pipefail

MYSQL_OPTS="-h ${DB_SERVER} -P ${DB_PORT} -u ${DB_USER} -p${DB_PASS}"

mysql ${MYSQL_OPTS} -e 'DROP DATABASE IF EXISTS `'"$DB_NAME"'`;'
mysql ${MYSQL_OPTS} -e 'CREATE DATABASE `'"${DB_NAME}"'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;'
mysql ${MYSQL_OPTS} ${DB_NAME} < ./schemas/dbstructure.sql

- name: Integration tests
uses: paambaati/codeclimate-action@v4
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
XDEBUG_MODE: coverage
with:
coverageCommand: ./vendor/bin/phpunit -c ./tests/phpunit.xml --testsuite core
coverageLocations: ./tests/_output/coverage-clover.xml:clover
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ doc/*
build/*
tests/_output/*

.phpstorm.meta.php
composer.phar

.env

!.blank
28 changes: 28 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/*
* sysPass
*
* @author nuxsmin
* @link https://syspass.org
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/

namespace PHPSTORM_META {

override(\Psr\Container\ContainerInterface::get(0), type(0));
}
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: xenial
dist: bionic

language: php

Expand All @@ -11,6 +11,7 @@ php:
branches:
only:
- master
- develop
- /^v?\d+\.\d+(\.\d+)?(-\S*)?$/

addons:
Expand Down
27 changes: 21 additions & 6 deletions api.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
/*
* sysPass
*
* @author nuxsmin
* @link https://syspass.org
* @copyright 2012-2019, Rubén Domínguez nuxsmin@$syspass.org
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
Expand All @@ -19,10 +19,25 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/

define('APP_ROOT', __DIR__);
define('APP_MODULE', 'api');
use Psr\Container\ContainerInterface;
use SP\Domain\Core\Bootstrap\BootstrapInterface;
use SP\Domain\Core\Bootstrap\ModuleInterface;
use SP\Infrastructure\File\FileSystem;
use SP\Modules\Api\Bootstrap;

use function SP\processException;

const APP_ROOT = __DIR__;
const APP_MODULE = 'api';

try {
$dic = FileSystem::require(FileSystem::buildPath(APP_ROOT, 'lib', 'Base.php'), ContainerInterface::class);

Bootstrap::run($dic->get(BootstrapInterface::class), $dic->get(ModuleInterface::class));
} catch (Throwable $e) {
processException($e);
}

require APP_ROOT . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'Base.php';
Binary file modified app/locales/es_ES/LC_MESSAGES/messages.mo
Binary file not shown.
Loading