Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
50caea6
Добавил контейнер с Postgres
Sep 7, 2024
507fb9f
- Добавил контейнер с nginx,php-fpm и postgres.
KarlsonComplete Sep 24, 2024
6473c92
- Добавил расширения mbstring,zip,curl,bcmath
KarlsonComplete Oct 6, 2024
4c2f9b9
Merge pull request #12 from KarlsonComplete/add-docker-structure
mesilov Oct 6, 2024
ef8ab43
Add PHP CLI service and improve Docker setup
mesilov Oct 6, 2024
5cff2ea
- Добавил глобальные переменные
KarlsonComplete Oct 6, 2024
6d8d5bd
Add UUID and member ID properties to Bitrix24Account
mesilov Oct 6, 2024
85dafa1
Refactor Docker setup and Bitrix24Account entity
mesilov Oct 6, 2024
1eed785
Update .gitignore to exclude /docker/postgres directory.
mesilov Oct 6, 2024
1ecbe1c
Add custom repository to Bitrix24Account
mesilov Oct 6, 2024
ace9189
Add functional test for Bitrix24AccountRepository
mesilov Oct 6, 2024
85ceeb4
Remove /docker/postgres from .gitignore
mesilov Oct 6, 2024
e6c002b
Refactor repository and entity manager usage.
mesilov Oct 6, 2024
f442bad
Update PHPStan command in GitHub Actions workflow
mesilov Oct 6, 2024
5817e70
Update Rector command in GitHub workflow
mesilov Oct 6, 2024
93ad32a
Create functional test workflow and update configurations
mesilov Oct 10, 2024
1a9bb10
Switch to direct phpunit command for unit tests
mesilov Oct 10, 2024
5aaedd7
Update functional test workflow to include DB setup
mesilov Oct 10, 2024
6fce03d
Update DB env variables in workflow configuration
mesilov Oct 10, 2024
9030702
Add database configuration to functional test workflow
mesilov Oct 10, 2024
00d16ba
Add new use cases for Bitrix24 account management
mesilov Oct 10, 2024
32803bd
Remove redundant flush argument from save method
mesilov Oct 10, 2024
57be1b9
Refactor repository methods to include PHPStan type hints
mesilov Oct 10, 2024
c096193
Refactor account handling logic in multiple use cases
mesilov Oct 10, 2024
58c1672
- Стянул изменения из основного репозитория
KarlsonComplete Oct 10, 2024
cd2d460
- Добавил мапинг на столбцы: isBitrix24UserAdmin,domain_url,updatedAt…
KarlsonComplete Oct 12, 2024
01ad508
- Добавил мапинг на столбец: accountStatus.
KarlsonComplete Oct 13, 2024
ce7121f
Merge pull request #14 from KarlsonComplete/add-docker-structure
mesilov Oct 14, 2024
1e56504
- Добавил Flusher.php
KarlsonComplete Oct 15, 2024
04c6547
- Добавил в тестах при создании экземпляра Bitrix24AccountRepository …
KarlsonComplete Oct 16, 2024
22baa6e
- Добавил отображения структуры бд (где это отображается?)
KarlsonComplete Oct 16, 2024
a29c2e6
- Создал xml файл для маппинга.
KarlsonComplete Oct 20, 2024
5f2d755
Merge pull request #15 from KarlsonComplete/add-docker-structure
mesilov Oct 20, 2024
6a7b8a9
- Убрал из namespace sdk
KarlsonComplete Oct 21, 2024
5327b7b
- Переименовал xml файлы для маппинга
KarlsonComplete Oct 21, 2024
ba737ec
- Перенес Flusher
KarlsonComplete Oct 24, 2024
0546e6d
- Добавил маппинг AuthToken для сущности Bitrix24Account
KarlsonComplete Oct 26, 2024
7eef687
Merge pull request #16 from KarlsonComplete/add-docker-structure
mesilov Oct 27, 2024
22e2931
Update bitrix24/b24phpsdk dependency version
mesilov Oct 27, 2024
a0135c2
Add PHP-CS-Fixer configuration and update dependencies
mesilov Oct 27, 2024
f4992ab
Add GitHub Actions for PHP CS-Fixer
mesilov Oct 27, 2024
0ec7bbc
Enhance PHP-CS-Fixer configuration with additional rules
mesilov Oct 27, 2024
9c99e2a
- Добавил маппинг Scope для сущности Bitrix24Account
KarlsonComplete Oct 28, 2024
0ba4a98
- Поменял название id на uuid в сущности и в маппинге
KarlsonComplete Oct 30, 2024
4aa62ae
Merge pull request #17 from KarlsonComplete/add-docker-structure
mesilov Oct 30, 2024
984c7a1
- Получается добавлять в таблицу
KarlsonComplete Oct 30, 2024
f3bf322
Merge pull request #18 from KarlsonComplete/add-docker-structure
mesilov Nov 2, 2024
620a437
Add environment variable loading and debugging support
mesilov Nov 3, 2024
4ce759c
Add functional test for ChangeDomainUrl handler
mesilov Nov 3, 2024
dc596ea
Add flusher support to InstallFinish handler
mesilov Nov 3, 2024
04297f7
Add functional test for InstallStart handler
mesilov Nov 3, 2024
c365b9f
Remove custom exception and update handler logic
mesilov Nov 3, 2024
db13570
Remove SaveAccount use case and add proper Uninstall testing
mesilov Nov 3, 2024
87639e7
Add TraceableEventDispatcher to HandlerTests
mesilov Nov 3, 2024
3137510
Update test to check for domain URL change event
mesilov Nov 3, 2024
7467889
Remove unused import in HandlerTest.php
mesilov Nov 3, 2024
fc01b55
- Убрал автогенерацию
KarlsonComplete Nov 3, 2024
0d169d3
- Поменял тип в маппинге с datetime_immutable на carbon_immutable
KarlsonComplete Nov 4, 2024
11e381f
Merge pull request #19 from KarlsonComplete/add-docker-structure
mesilov Nov 4, 2024
37aea9a
- Убрал в аккаунте атрибуты
KarlsonComplete Nov 7, 2024
21f10f6
Merge pull request #20 from KarlsonComplete/add-docker-structure
mesilov Nov 8, 2024
5340ec8
Add FlusherDecorator for functional tests
mesilov Nov 10, 2024
33f6356
Refactor and enforce input validation in Bitrix24AccountRepository
mesilov Nov 10, 2024
e648cba
Fix formatting and simplify tests
mesilov Nov 10, 2024
9890d0a
- Добавил xdebug
KarlsonComplete Nov 14, 2024
15033e7
Merge pull request #21 from KarlsonComplete/add-docker-structure
KarlsonComplete Nov 14, 2024
969782e
Refactor repository methods and improve exception handling
mesilov Nov 16, 2024
21d34d3
Refactor exception formatting for readability
mesilov Nov 16, 2024
469e563
Refactor event dispatching mechanism
mesilov Nov 16, 2024
57153ae
Refactor `Handler.php` files for code clarity and maintainability
mesilov Nov 16, 2024
9ad0581
Refactor event dispatching mechanism
mesilov Nov 17, 2024
22b58ab
- Поменял подход к получению authToken
KarlsonComplete Nov 20, 2024
959aaaa
- Добавил сообщения для проверок в тестах
KarlsonComplete Nov 20, 2024
a67cb48
- Добавил Fetcher тест
KarlsonComplete Nov 24, 2024
e9817e1
Merge pull request #22 from KarlsonComplete/add-docker-structure
mesilov Nov 24, 2024
f082b16
- Война с AggregateRoot
KarlsonComplete Nov 25, 2024
e6a6977
- Внес правки для AggregateRoot
KarlsonComplete Nov 27, 2024
ba7575a
- Добавил исключение в метод getById
KarlsonComplete Nov 28, 2024
57a3f51
- Тест на фетчер
KarlsonComplete Nov 30, 2024
a27c75e
Merge pull request #23 from KarlsonComplete/add-docker-structure
mesilov Dec 1, 2024
9e936c7
- Правки на scope
KarlsonComplete Dec 2, 2024
899cae3
Merge pull request #24 from KarlsonComplete/add-docker-structure
mesilov Dec 3, 2024
59e34a5
Simplify application scope handling
mesilov Dec 3, 2024
d6b58a1
Update PHP SDK in test commands
mesilov Dec 3, 2024
9f5f133
Update Composer flags to prefer source in workflows
mesilov Dec 3, 2024
7e3727c
Add #[Override] attribute and refactor variable names
mesilov Dec 3, 2024
20b211a
Fix variable name in RenewAuthToken handler
mesilov Dec 3, 2024
ff81205
Update Composer flags and add specific package update
mesilov Dec 3, 2024
8fcc00d
Reorder composer update commands in CI workflow
mesilov Dec 3, 2024
c7ec28e
Reorder composer update commands.
mesilov Dec 3, 2024
b81e375
Reorder composer update commands.
mesilov Dec 3, 2024
bfd6256
Add step to install b24-php-sdk from source
mesilov Dec 3, 2024
28667e6
Update SDK installation method in GitHub Actions workflow
mesilov Dec 3, 2024
7059b84
Update SDK installation method in GitHub Actions workflow
mesilov Dec 3, 2024
84568ed
Update composer flags and install b24-php-sdk from source
mesilov Dec 3, 2024
d684661
Fix b24phpsdk installation naming and add to lint workflow
mesilov Dec 3, 2024
ff5fa2d
Refactor and streamline codebase
mesilov Dec 4, 2024
a70123d
Remove redundant b24phpsdk source installation steps.
mesilov Dec 4, 2024
a2b6dfd
Remove prefer-dist flag from Composer command
mesilov Dec 4, 2024
3b31045
Remove prefer-dist from COMPOSER_FLAGS in CI workflow.
mesilov Dec 4, 2024
f697703
Remove xdebug from PHPUnit command in Makefile
mesilov Dec 4, 2024
17555c1
Add GitHub workflow for license checking
mesilov Dec 4, 2024
bd63bba
Remove PHP 8.2 from license check workflow
mesilov Dec 4, 2024
b1cdf4e
- Починил Fetcher тест
KarlsonComplete Dec 7, 2024
be68b22
- Переписал flusher и переписал
KarlsonComplete Dec 8, 2024
65413da
Merge pull request #25 from KarlsonComplete/add-docker-structure
mesilov Dec 8, 2024
70f2c9f
- Поправил тест на изменения url домена
KarlsonComplete Dec 10, 2024
9f1ee0c
- Поправил тесты
KarlsonComplete Dec 13, 2024
50733f5
- Изменил нейминг фетчера для битрикс24аккаунта.
KarlsonComplete Dec 15, 2024
9a6e0e8
..
KarlsonComplete Dec 15, 2024
6046515
Merge pull request #27 from KarlsonComplete/add-docker-structure
mesilov Dec 15, 2024
64044c6
Поправил тесты и ошибки с phpstan
KarlsonComplete Dec 18, 2024
dde051e
.
KarlsonComplete Dec 21, 2024
47f3ffd
.
KarlsonComplete Dec 22, 2024
4d2bda7
Merge pull request #29 from KarlsonComplete/add-docker-structure
mesilov Dec 22, 2024
129e83b
Правки
KarlsonComplete Dec 25, 2024
ae0d1a5
Правки
KarlsonComplete Dec 27, 2024
2535f7b
Добавил 2 юнит теста
KarlsonComplete Dec 28, 2024
9a83c79
Добавил 2 юнит теста
KarlsonComplete Dec 28, 2024
98eb191
Правки в тест на повторную установку аккаунта
KarlsonComplete Jan 5, 2025
92347d8
Правки в тест на повторную установку аккаунта
KarlsonComplete Jan 5, 2025
bb8e9c7
Merge pull request #32 from KarlsonComplete/add-docker-structure
camaxtly Jan 6, 2025
56eb727
- Добавил датаправайдер в одном из тестов на команду.
KarlsonComplete Jan 9, 2025
a33d77f
- Добавил генератор для всех тестов
KarlsonComplete Jan 11, 2025
81a40a8
- юзанул cs-fixer
KarlsonComplete Jan 11, 2025
3fb5766
- юзанул cs-fixer для тестов
KarlsonComplete Jan 11, 2025
31e9be2
Merge pull request #34 from KarlsonComplete/add-docker-structure
camaxtly Jan 12, 2025
9b5f78c
- Правки для домена
KarlsonComplete Jan 16, 2025
0af10a0
- Правки для фукнциональных тестов
KarlsonComplete Jan 18, 2025
f109090
- Пытаюсь править для функциональных тестов в github actions
KarlsonComplete Jan 18, 2025
3a9b261
- Тест на проверку функции домена
KarlsonComplete Jan 18, 2025
8d149d4
Update tests-functional.yml
KarlsonComplete Jan 18, 2025
ecd22a6
- Правим github actions
KarlsonComplete Jan 18, 2025
9e04451
- Правим github actions
KarlsonComplete Jan 18, 2025
af668ea
- Правим github actions
KarlsonComplete Jan 18, 2025
c2bfeb6
- Юзанули ректор
KarlsonComplete Jan 18, 2025
b27b0cb
- Правки для github actions
KarlsonComplete Jan 19, 2025
1e993a4
- Правки для github actions
KarlsonComplete Jan 30, 2025
0c1e899
- Правки для github actions 2
KarlsonComplete Jan 30, 2025
86ff567
- Правки для github actions 3
KarlsonComplete Jan 30, 2025
2765344
- Правки для тестов
KarlsonComplete Feb 1, 2025
c7a4d8b
- Правки для сs fixer
KarlsonComplete Feb 1, 2025
33eb305
Merge pull request #36 from KarlsonComplete/add-docker-structure
camaxtly Feb 2, 2025
681a05e
- Перенес функцию на проверку домена в отдельный тест
KarlsonComplete Feb 6, 2025
48173d7
- Поправил тесты
KarlsonComplete Feb 8, 2025
d754288
- Поправил сущность аккаунта , добавил параметры для метода updateApp…
KarlsonComplete Feb 9, 2025
3363ca6
Merge pull request #37 from KarlsonComplete/add-docker-structure
camaxtly Feb 9, 2025
556720d
- Поправил домен
KarlsonComplete Feb 10, 2025
c80df26
- Поправил домен
KarlsonComplete Feb 15, 2025
024e691
- Добавил useCase на обновления версии и написал тесты
KarlsonComplete Feb 16, 2025
61f7293
Merge pull request #38 from KarlsonComplete/add-docker-structure
camaxtly Feb 16, 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
14 changes: 14 additions & 0 deletions .allowed-licenses.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

use Lendable\ComposerLicenseChecker\LicenseConfigurationBuilder;

return (new LicenseConfigurationBuilder())
->addLicenses(
// And other licenses you wish to allow.
'MIT',
'Apache-2.0',
'BSD-3-Clause',
)
->build();
18 changes: 18 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
DATABASE_HOST=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_NAME=
File renamed without changes.
50 changes: 50 additions & 0 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Allowed licenses checks"
on:
push:
pull_request:

jobs:
static-analysis:
name: "composer-license-checker"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "composer-license-checker"
run: "make lint-allowed-licenses"

- name: "is allowed licenses check succeeded"
if: ${{ success() }}
run: |
echo '✅ allowed licenses check pass, congratulations!'

- name: "is allowed licenses check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ allowed licenses check failed (╯°益°)╯彡┻━┻'
51 changes: 51 additions & 0 deletions .github/workflows/lint-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
pull_request:

name: Lint CS-Fixer

jobs:
static-analysis:
name: "CS-Fixer"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "CS-Fixer"
run: "vendor/bin/php-cs-fixer fix --dry-run --diff --verbose"

- name: "is CS-Fixer check succeeded"
if: ${{ success() }}
run: |
echo '✅ CS-Fixer check pass, congratulations!'

- name: "is CS-Fixer check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ CS-Fixer check failed (╯°益°)╯彡┻━┻'
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "PHPStan"
run: "make lint-phpstan"
run: "vendor/bin/phpstan --memory-limit=2G analyse"

- name: "is PHPStan check succeeded"
if: ${{ success() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Rector"
run: "make lint-rector"
run: "vendor/bin/rector process --dry-run"

- name: "is Rector check succeeded"
if: ${{ success() }}
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/tests-functional.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "Functional tests"

on:
push:
pull_request:

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress"
DATABASE_HOST: localhost
DATABASE_USER: b24phpLibTest
DATABASE_PASSWORD: b24phpLibTest
DATABASE_NAME: b24phpLibTest

jobs:
tests:
name: "Functional tests"

runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
dependencies: [ highest ]
operating-system: [ ubuntu-latest ]
services:
bitrix24-php-lib-test-database:
image: postgres:16-alpine
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U b24phpLibTest"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
POSTGRES_USER: b24phpLibTest
POSTGRES_PASSWORD: b24phpLibTest
POSTGRES_DB: b24phpLibTest

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring, pdo_pgsql, pdo

- name: "Install dependencies with Composer"
run: |
composer update ${{ env.COMPOSER_FLAGS }}

- name: "Install PostgreSQL client"
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client

- name: "Wait for PostgreSQL to be ready"
run: |
until pg_isready -h localhost -p 5432 -U b24phpLibTest; do
echo "Waiting for PostgreSQL to start..."
sleep 2
done

- name: "Run functional tests"
run: |
php bin/doctrine orm:schema-tool:drop --force
php bin/doctrine orm:schema-tool:create --dump-sql
php bin/doctrine orm:schema-tool:update --force
php bin/doctrine orm:info
# Запуск тестов с очисткой состояния между тестами
php vendor/bin/phpunit --testsuite=functional_tests --display-warnings --testdox --process-isolation

- name: "is functional tests succeeded"
if: ${{ success() }}
run: |
echo '✅ functional tests pass, congratulations!'

- name: "is functional tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ functional tests failed (╯°益°)╯彡┻━┻'
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: "PHPUnit tests"
name: "Unit tests"

on:
push:
pull_request:

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress"

jobs:
tests:
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
composer update ${{ env.COMPOSER_FLAGS }}

- name: "run unit tests"
run: "make test-unit"
run: "php vendor/bin/phpunit --testsuite=unit_tests --display-warnings --testdox"

- name: "is unit tests tests succeeded"
if: ${{ success() }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/.idea*
/vendor
/.cache
/docker/db
composer.phar
composer.lock
.phpunit.result.cache
*.log
.env.local
.env.local
*.cache
20 changes: 20 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$finder = Finder::create()
->in(__DIR__.'/src');

return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__.'/.php-cs-fixer.cache')
->setFinder($finder)
->setRules([
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'phpdoc_to_comment' => false,
]);
Loading
Loading