Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ad34f0b
[FEATURE] Make Core SDK generatable from OpenAPI spec URL
jantinnerezo Jun 30, 2025
23d65ed
Remove unwanted files and update .gitignore
jantinnerezo Jun 30, 2025
4611a5d
Reset .gitignore
jantinnerezo Jun 30, 2025
39ac946
Merge branch 'master' into feature/86c45g10g-generatable-core-sdk
jantinnerezo Jun 30, 2025
71dd1fb
[rector] Rector fixes
actions-user Jun 30, 2025
8240a9e
[php-cs-fixer] php-cs-fixer fixes
actions-user Jun 30, 2025
924ff88
phpstan fixes
jantinnerezo Jun 30, 2025
7876b63
Merge branch 'feature/86c45g10g-generatable-core-sdk' of github.com:a…
jantinnerezo Jun 30, 2025
bf11c07
CI test command
jantinnerezo Jun 30, 2025
85e8fb0
CI update
jantinnerezo Jun 30, 2025
6707fe4
Update connector name with backward compatibility
jantinnerezo Jun 30, 2025
a34f189
Cleanup
jantinnerezo Jul 1, 2025
8e1423e
Paginator generator
jantinnerezo Jul 1, 2025
33cfac3
[php-cs-fixer] php-cs-fixer fixes
actions-user Jul 1, 2025
1f17eda
Paginated response for paginated requests
jantinnerezo Jul 1, 2025
41feba1
Merge branch 'feature/86c45g10g-generatable-core-sdk' of github.com:a…
jantinnerezo Jul 1, 2025
c616c6a
Paginator response
jantinnerezo Jul 1, 2025
9dfa0d0
.editorconfig
mish-ka-mishka Jul 1, 2025
fc616ec
BaseResourceGenerator
mish-ka-mishka Jul 1, 2025
d445459
Added composer build command
jantinnerezo Jul 1, 2025
16646be
RequestGenerator
mish-ka-mishka Jul 1, 2025
04f40ba
Update composer build command
jantinnerezo Jul 1, 2025
f306a6f
-
mish-ka-mishka Jul 1, 2025
b620347
-
mish-ka-mishka Jul 1, 2025
9311aee
Update README.md
jantinnerezo Jul 1, 2025
8783356
Merge branch 'feature/86c45g10g-generatable-core-sdk' of github.com:a…
jantinnerezo Jul 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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{js,vue,xml,yml}]
indent_size = 2
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* text=auto eol=lf
/.github export-ignore
/src export-ignore
/storage export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/build.php export-ignore
/composer.lock export-ignore
/phpstan.php export-ignore
/phpunit.xml export-ignore
/rector.php export-ignore
176 changes: 162 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,179 @@
name: CI

env:
COMPOSE_INTERACTIVE_NO_CLI: 1
PHP_CS_FIXER_IGNORE_ENV: 1
LARAVEL_BYPASS_ENV_CHECK: 1

on:
push:
branches:
- master
pull_request:
branches:
- master
branches: [develop, main, master]

concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
rector:
name: Code style (rector)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none

- name: Install Composer dependencies
run: composer install --ignore-platform-reqs --no-scripts

- name: Check PSR-4 compliance
run: composer dump --strict-psr

- name: Cache Rector cache files
uses: actions/cache@v4
with:
path: storage/framework/cache/rector
key: ${{ github.base_ref }}-rector-${{ hashFiles('composer.lock') }}
restore-keys: ${{ github.base_ref }}-rector-

- name: Run rector
run: ./vendor/bin/rector

- name: Commit changes from rector
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[rector] Rector fixes'
commit_author: 'GitHub Action <actions@github.com>'
commit_user_email: 'action@github.com'

php-cs-fixer:
needs: [rector]
name: Code style (php-cs-fixer)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Set up PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Cache CS Fixer cache file
uses: actions/cache@v4
with:
path: .php-cs-fixer.cache
key: ${{ github.base_ref }}-csfixer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ github.base_ref }}-csfixer-

- name: Run PHPStan
run: composer phpstan
- name: Install Composer dependencies
run: composer install --ignore-platform-reqs --no-scripts

- name: Run php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php

- name: Commit changes from php-cs-fixer
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[php-cs-fixer] php-cs-fixer fixes'
commit_author: 'GitHub Action <actions@github.com>'
commit_user_email: 'action@github.com'

phpstan:
needs: [ php-cs-fixer ]
name: Static analysis (phpstan)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none

- name: Install Composer dependencies
run: composer install --ignore-platform-reqs --no-scripts

- name: Cache PHPStan cache files
uses: actions/cache@v4
with:
path: storage/framework/cache/phpstan
key: ${{ github.base_ref }}-phpstan-${{ hashFiles('composer.lock') }}
restore-keys: ${{ github.base_ref }}-phpstan-

- name: Run phpstan
run: ./vendor/bin/phpstan analyse -c phpstan.php --error-format=github

phpunit:
needs: [ phpstan ]
name: Tests (phpunit)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql, gd, exif, imagick
coverage: pcov

- name: Install Composer dependencies
run: composer install --no-scripts

- name: Run tests
run: composer test --env=ci --parallel --stop-on-failure

security:
name: Security Checker
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache database
uses: actions/cache@v4
with:
path: ~/.symfony/cache
key: security-checker

- name: Run PHPUnit
run: composer test
- name: Run security checker
uses: symfonycorp/security-checker-action@v5
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
/vendor
/.coverage
/.phpunit.cache
composer.lock
.phpunit.result.cache
.php-cs-fixer.cache
tests/file.xlsx
149 changes: 8 additions & 141 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,144 +2,11 @@

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'no_superfluous_phpdoc_tags' => true,
'blank_line_before_statement' => [
'statements' => ['return'],
],
'braces' => true,
'cast_spaces' => true,
'class_definition' => true,
'concat_space' => [
'spacing' => 'one',
],
'declare_equal_normalize' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'declare_strict_types' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'increment_style' => ['style' => 'post'],
'indentation_type' => true,
'linebreak_after_opening_tag' => true,
'line_ending' => true,
'lowercase_cast' => true,
'constant_case' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_method_casing' => true,
'magic_constant_casing' => true,
'method_argument_space' => true,
'native_function_casing' => true,
'no_alias_functions' => true,
'no_extra_blank_lines' => [
'tokens' => [
'extra',
'throw',
'use',
],
],
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
'trait_import' => 'none',
],
],
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => [
'use' => 'echo',
],
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_singleline' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_successor_space' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_indent' => true,
'general_phpdoc_tag_rename' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => true,
'phpdoc_to_comment' => false,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'psr_autoloading' => true,
'self_accessor' => true,
'short_scalar_cast' => true,
'simplified_null_return' => false,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'no_unused_imports' => true,
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'single_trait_insert_per_statement' => true,
];

$project_path = getcwd();
$finder = Finder::create()
->in([
$project_path . '/config',
$project_path . '/src',
$project_path . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new Config())
->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)
->setUsingCache(true);
$factory = new Airlst\PhpCsFixerConfig\Factory([
'src',
'build',
// 'tests',
]);

return $factory->create()
->setCacheFile('storage/framework/cache/php-cs-fixer/.php-cs-fixer.cache');
Loading